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 void
counter(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Process a counter type metric.ITraceProvider.ISpan
createSpan(String name)
Create and return a new span.ITraceProvider.ISpan
currentSpan()
Get the current span from the underlying provider.Resource
decorate(ISettings settings, ISnapshotContext snapshot)
This method is called by Deep after a snapshot is created.void
gauge(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Process a gauge type metric.void
histogram(String name, Map<String,Object> labels, String namespace, String help, String unit, Double value)
Process a histogram type metric.boolean
isActive()
Should determine if the plugin is active.void
summary(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:IMetricProcessor
Process a counter type metric.- Specified by:
counter
in 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:IMetricProcessor
Process a gauge type metric.- Specified by:
gauge
in 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:IMetricProcessor
Process a histogram type metric.- Specified by:
histogram
in 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:IMetricProcessor
Process a summary type metric.- Specified by:
summary
in 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:ITraceProvider
Create and return a new span.- Specified by:
createSpan
in interfaceITraceProvider
- Parameters:
name
- the name of the span to create- Returns:
- the new span
-
currentSpan
public ITraceProvider.ISpan currentSpan()
Description copied from interface:ITraceProvider
Get the current span from the underlying provider.- Specified by:
currentSpan
in interfaceITraceProvider
- Returns:
- the current active span, or
null
-
isActive
public boolean isActive()
Description copied from interface:IConditional
Should determine if the plugin is active.- Specified by:
isActive
in interfaceIConditional
- Returns:
true
if and only if the plugins is active, elsefalse
-
decorate
public Resource decorate(ISettings settings, ISnapshotContext snapshot)
Description copied from interface:ISnapshotDecorator
This method is called by Deep after a snapshot is created.This method is executed inline with the tracepoint code.
- Specified by:
decorate
in interfaceISnapshotDecorator
- Parameters:
settings
- the current settings of Deepsnapshot
- theISnapshotContext
describing the snapshot- Returns:
- a new
Resource
to be added to the snapshot, ornull
to do nothing
-
-