use of org.commonjava.o11yphant.honeycomb.HoneycombTracePlugin in project indy by Commonjava.
the class TraceManagerProducer method init.
@PostConstruct
public void init() {
O11yphantTracePlugin<?> plugin;
if (config.getTracer() == TracerPlugin.opentelemetry) {
logger.info("Initializing Opentelemetry trace plugin");
plugin = new OtelTracePlugin(config, config);
} else {
logger.info("Initializing Honeycomb trace plugin");
if (config.isEnabled()) {
try {
config.validateForHoneycomb();
} catch (ConfigurationException e) {
logger.error("Invalid Honeycomb configuration detected!");
throw new RuntimeException(e);
}
}
plugin = new HoneycombTracePlugin(config, config, Optional.of(trafficClassifier));
}
traceManager = new TraceManager<>(plugin, new SpanFieldsDecorator(getRootSpanFields()), config);
traceThreadContextualizer = traceManager.getTraceThreadContextualizer();
}
Aggregations