Package 

Interface OTelApi


  • 
    public interface OTelApi
    
                        

    Methods that enable integration with the the large OTel ecosystem through standard OTel APIs and concepts.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit addLogRecordExporter(LogRecordExporter logRecordExporter) Add a LogRecordExporter that OTel Logs will be exported to after logging
      abstract Unit addSpanExporter(SpanExporter spanExporter) Adds a SpanExporter that OTel Spans will be exported to after completion
      abstract OpenTelemetry getOpenTelemetry() Returns an OpenTelemetry that provides working Tracer implementations that will record spans that fit into the Embrace data model.
      Unit setResourceAttribute(AttributeKey<String> key, String value) Set an attribute on the Resource used by the OTel SDK instance with the given AttributeKey key and String value.
      abstract Unit setResourceAttribute(String key, String value) Set an attribute on the Resource used by the OTel SDK instance with the given String key and value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addLogRecordExporter

         abstract Unit addLogRecordExporter(LogRecordExporter logRecordExporter)

        Add a LogRecordExporter that OTel Logs will be exported to after logging

      • addSpanExporter

         abstract Unit addSpanExporter(SpanExporter spanExporter)

        Adds a SpanExporter that OTel Spans will be exported to after completion

      • getOpenTelemetry

         abstract OpenTelemetry getOpenTelemetry()

        Returns an OpenTelemetry that provides working Tracer implementations that will record spans that fit into the Embrace data model.

      • setResourceAttribute

         Unit setResourceAttribute(AttributeKey<String> key, String value)

        Set an attribute on the Resource used by the OTel SDK instance with the given AttributeKey key and String value. The value set will override any value set previously or by the Embrace SDK. This must be called before the SDK is started in order for it to take effect.

      • setResourceAttribute

         abstract Unit setResourceAttribute(String key, String value)

        Set an attribute on the Resource used by the OTel SDK instance with the given String key and value. The value set will override any value set previously or by the Embrace SDK. This must be called before the SDK is started in order for it to take effect.