Package com.intergral.deep.agent
Class DeepAgent
- java.lang.Object
-
- com.intergral.deep.agent.DeepAgent
-
-
Constructor Summary
Constructors Constructor Description DeepAgent(Settings settings, TracepointInstrumentationService tracepointInstrumentationService)
Create a new deep agent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getVersion()
Get the version of deep being used.boolean
isEnabled()
Get the current state of deep.IRegistration<IDeepPlugin>
registerPlugin(IDeepPlugin plugin)
This allows the registration of custom plugins.ITracepoint.ITracepointRegistration
registerTracepoint(String path, int line)
Create a tracepoint that will only exist on this instance.ITracepoint.ITracepointRegistration
registerTracepoint(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metricDefinitions)
Create a tracepoint that will only exist on this instance.void
setEnabled(boolean enabled)
This method can be used to disabled or enable Deep.void
shutdown()
void
start()
Start deep.
-
-
-
Constructor Detail
-
DeepAgent
public DeepAgent(Settings settings, TracepointInstrumentationService tracepointInstrumentationService)
Create a new deep agent.- Parameters:
settings
- the settingstracepointInstrumentationService
- the tracepoint instrumentation service
-
-
Method Detail
-
start
public void start()
Start deep.
-
getVersion
public String getVersion()
Description copied from interface:IDeep
Get the version of deep being used.- Specified by:
getVersion
in interfaceIDeep
- Returns:
- the sematic version of deep as a string e.g. 1.2.3
-
registerPlugin
public IRegistration<IDeepPlugin> registerPlugin(IDeepPlugin plugin)
Description copied from interface:IDeep
This allows the registration of custom plugins.- Specified by:
registerPlugin
in interfaceIDeep
- Parameters:
plugin
- the plugin that can be used to decorate snapshots- Returns:
- a
IRegistration
that can be used to unregister the plugin
-
registerTracepoint
public ITracepoint.ITracepointRegistration registerTracepoint(String path, int line)
Description copied from interface:IDeep
Create a tracepoint that will only exist on this instance.- Specified by:
registerTracepoint
in interfaceIDeep
- Parameters:
path
- the path to the fileline
- the line number- Returns:
- a
ITracepoint.ITracepointRegistration
that can be used to remove the tracepoint
-
registerTracepoint
public ITracepoint.ITracepointRegistration registerTracepoint(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metricDefinitions)
Description copied from interface:IDeep
Create a tracepoint that will only exist on this instance.- Specified by:
registerTracepoint
in interfaceIDeep
- Parameters:
path
- the path to the fileline
- the line numberargs
- the key value pairs that further define the tracepointwatches
- the list of watch expressionsmetricDefinitions
- the list of metric expressions- Returns:
- a
ITracepoint.ITracepointRegistration
that can be used to remove the tracepoint
-
isEnabled
public boolean isEnabled()
Description copied from interface:IDeep
Get the current state of deep.
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:IDeep
This method can be used to disabled or enable Deep.Changing the state to
false
(ie disabled) will cause deep to uninstall all the tracepoints and clear the current config. Meaning that when deep is enabled again it will have to reinstall the configuration. It is therefore advised to not call this function too frequently.- Specified by:
setEnabled
in interfaceIDeep
- Parameters:
enabled
- the new state to become
-
shutdown
public void shutdown()
-
-