Loading

Elastic Distribution of OpenTelemetry iOS

Stack Serverless Observability EDOT iOS

The Elastic Distribution of OpenTelemetry iOS (EDOT iOS) measures the performance of your mobile applications in real time.

Note

The Elastic Distribution of OpenTelemetry iOS is not compatible with Elastic Cloud Serverless.

The Elastic Distribution of OpenTelemetry iOS uses the OpenTelemetry-Swift SDK. The agent automatically traces URLSessions and provides distributed traces annotated with device information along with your back-end services instrumented with OpenTelemetry.

The SDK also captures any custom OpenTelemetry traces or measurements created using the OpenTelemetry-Swift API.

The SDK configures the OpenTelemetry-Swift TracerProvider and MetricProvider, and sets them as the global OpenTelemetry providers. They can be accessed through the OpenTelemetry SDK as follows:

let tracerProvider = OpenTelemetry.instance.tracerProvider let meterProvider = OpenTelemetry.instance.meterProvider 

You can use these objects to acquire new tracers and meters that send their captured data to the Elastic APM Server. For more details on how to use OpenTelemetry to instrument your app, refer to the OpenTelemetry.io Swift manual instrumentation docs.

You can find examples in the opentelemetry-swift/examples repository.

EDOT SDKs work with the APM Server, Elasticsearch, and Kibana. The APM Guide provides details on how these components work together, and provides a matrix outlining Agent and Server compatibility.

The EDOT iOS SDK uses several OpenTelemetry-Swift libraries to provide automatic instrumentation of your applications and services. Details about these instrumentation libraries can be found in the official opentelementry.io Swift Libraries documentation.

For network instrumentation, the agent uses NSURLSessionInstrumentation. This provides network instrumentation in the form of spans and enables distributed tracing for all instrumented downstream services.

Detailed information on the device, operating system, and application is provided by SDKResourceExtension. More information on which data points are captured can be found in the opentelementry.io SDKResourceExtension documentation.

Elastic maps OpenTelemetry attributes to Elastic-specific fields. Details of these mappings can be found in the Elastic Mobile Agent Spec.