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 StringgetVersion()Get the version of deep being used.booleanisEnabled()Get the current state of deep.IRegistration<IDeepPlugin>registerPlugin(IDeepPlugin plugin)This allows the registration of custom plugins.ITracepoint.ITracepointRegistrationregisterTracepoint(String path, int line)Create a tracepoint that will only exist on this instance.ITracepoint.ITracepointRegistrationregisterTracepoint(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metricDefinitions)Create a tracepoint that will only exist on this instance.voidsetEnabled(boolean enabled)This method can be used to disabled or enable Deep.voidshutdown()voidstart()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:IDeepGet the version of deep being used.- Specified by:
getVersionin 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:IDeepThis allows the registration of custom plugins.- Specified by:
registerPluginin interfaceIDeep- Parameters:
plugin- the plugin that can be used to decorate snapshots- Returns:
- a
IRegistrationthat can be used to unregister the plugin
-
registerTracepoint
public ITracepoint.ITracepointRegistration registerTracepoint(String path, int line)
Description copied from interface:IDeepCreate a tracepoint that will only exist on this instance.- Specified by:
registerTracepointin interfaceIDeep- Parameters:
path- the path to the fileline- the line number- Returns:
- a
ITracepoint.ITracepointRegistrationthat 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:IDeepCreate a tracepoint that will only exist on this instance.- Specified by:
registerTracepointin 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.ITracepointRegistrationthat can be used to remove the tracepoint
-
isEnabled
public boolean isEnabled()
Description copied from interface:IDeepGet the current state of deep.
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:IDeepThis 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:
setEnabledin interfaceIDeep- Parameters:
enabled- the new state to become
-
shutdown
public void shutdown()
-
-