Package com.intergral.deep.plugin
Class OtelPlugin
- java.lang.Object
-
- com.intergral.deep.plugin.OtelPlugin
-
- All Implemented Interfaces:
IMetricProcessor,ISnapshotDecorator,ITraceProvider,IConditional,IDeepPlugin,Ordered
public class OtelPlugin extends Object implements IDeepPlugin, ITraceProvider, IMetricProcessor, IConditional, ISnapshotDecorator
This plugin provides a connection between Deep and Otel. Allowing:- Metrics to be processed via Otel
- Traces to be created using Otel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.intergral.deep.agent.api.plugin.ITraceProvider
ITraceProvider.ISpan
-
-
Constructor Summary
Constructors Constructor Description OtelPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcounter(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)Process a counter type metric.ITraceProvider.ISpancreateSpan(String name)Create and return a new span.ITraceProvider.ISpancurrentSpan()Get the current span from the underlying provider.Resourcedecorate(ISettings settings, ISnapshotContext snapshot)This method is called by Deep after a snapshot is created.voidgauge(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)Process a gauge type metric.voidhistogram(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)Process a histogram type metric.booleanisActive()Should determine if the plugin is active.voidsummary(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)Process a summary type metric.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.intergral.deep.agent.api.spi.IDeepPlugin
configure
-
-
-
-
Method Detail
-
counter
public void counter(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Description copied from interface:IMetricProcessorProcess a counter type metric.- Specified by:
counterin interfaceIMetricProcessor- Parameters:
name- the name of the metriclabels- the labels attached to the metricnamespace- the namespace the metric should be inhelp- the help statement for the metricunit- the unit for the metricvalue- the value to post to the metric
-
gauge
public void gauge(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Description copied from interface:IMetricProcessorProcess a gauge type metric.- Specified by:
gaugein interfaceIMetricProcessor- Parameters:
name- the name of the metriclabels- the labels attached to the metricnamespace- the namespace the metric should be inhelp- the help statement for the metricunit- the unit for the metricvalue- the value to post to the metric
-
histogram
public void histogram(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Description copied from interface:IMetricProcessorProcess a histogram type metric.- Specified by:
histogramin interfaceIMetricProcessor- Parameters:
name- the name of the metriclabels- the labels attached to the metricnamespace- the namespace the metric should be inhelp- the help statement for the metricunit- the unit for the metricvalue- the value to post to the metric
-
summary
public void summary(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Description copied from interface:IMetricProcessorProcess a summary type metric.- Specified by:
summaryin interfaceIMetricProcessor- Parameters:
name- the name of the metriclabels- the labels attached to the metricnamespace- the namespace the metric should be inhelp- the help statement for the metricunit- the unit for the metricvalue- the value to post to the metric
-
createSpan
public ITraceProvider.ISpan createSpan(String name)
Description copied from interface:ITraceProviderCreate and return a new span.- Specified by:
createSpanin interfaceITraceProvider- Parameters:
name- the name of the span to create- Returns:
- the new span
-
currentSpan
public ITraceProvider.ISpan currentSpan()
Description copied from interface:ITraceProviderGet the current span from the underlying provider.- Specified by:
currentSpanin interfaceITraceProvider- Returns:
- the current active span, or
null
-
isActive
public boolean isActive()
Description copied from interface:IConditionalShould determine if the plugin is active.- Specified by:
isActivein interfaceIConditional- Returns:
trueif and only if the plugins is active, elsefalse
-
decorate
public Resource decorate(ISettings settings, ISnapshotContext snapshot)
Description copied from interface:ISnapshotDecoratorThis method is called by Deep after a snapshot is created.This method is executed inline with the tracepoint code.
- Specified by:
decoratein interfaceISnapshotDecorator- Parameters:
settings- the current settings of Deepsnapshot- theISnapshotContextdescribing the snapshot- Returns:
- a new
Resourceto be added to the snapshot, ornullto do nothing
-
-