Loading

Elastic Distribution of OpenTelemetry iOS

The Elastic Distribution of OpenTelemetry iOS (EDOT iOS) is an APM agent based on OpenTelemetry. EDOT iOS provides built-in tools and configurations to make the OpenTelemetry-Swift SDK work with your Elastic Stack using as little code as possible.

The OpenTelemetry-Swift APIs configured by EDOT iOS remain available for you to use. This allows you to fulfill various use cases to better understand your app's performance, such as:

Distributed tracing allows you to see how long your app waits for backend services and where time is spent across the services that handle a request.

For example, a trace can contain:

  • A span created in your app for an outgoing URLSession request.
  • A span created in the backend service that receives the request.
  • Additional spans created when the backend calls another service or queries a database.

You can select any span in Kibana to view its timing, attributes, events, and relationship to the rest of the trace.

Note

For distributed tracing to show the complete request, configure your backend services to send telemetry to the same Elastic Stack.

EDOT iOS adds a session.id attribute to spans and log records generated by your app. This allows you to group the telemetry from one app session and reconstruct the events that led to an error or performance problem.

For example, you can create a log record when a user taps a button and a span when the destination screen appears. Both signals contain the same session.id, so you can find them together in Kibana and follow the user's journey.

A session is created when no previous session exists or the previous session has expired. Sessions expire after 30 minutes of inactivity.

EDOT iOS provides direct access to OpenTelemetry-Swift, so you can generate telemetry that represents your app's own features and workflows. You can then use your data to:

  • Create alerts when an error occurs or a performance threshold is exceeded.
  • Build dashboards that show the data most important to your app.
  • Use Discover to search spans, logs, and their attributes.

EDOT iOS provides additional features on top of the OpenTelemetry-Swift SDK.

Your app's telemetry is stored locally before it is sent to Elastic. Data is removed after it is exported successfully or when space is needed for newer telemetry. This minimizes data loss when network connectivity is interrupted.

You can tune this behavior with the persistent storage configuration.

EDOT iOS captures crashes and reports them as fatal log events the next time the app starts. Crash events contain exception, stack trace, and session information to help you correlate the crash with other telemetry from the same session.

Crash reporting is enabled by default. Refer to Crash reporting for testing instructions and limitations.

You can remotely manage supported EDOT iOS settings through Kibana. Refer to Central configuration for setup instructions and available settings.

Accurate timestamps are important when you compare telemetry from an app with telemetry from backend services. EDOT iOS synchronizes signal timestamps with a network time source and falls back to the device clock when a synchronized value is unavailable.

A session groups spans and log records from a period of app activity by adding a session.id attribute. You can also make one sampling decision per session, which preserves the relationship between sampled spans.

Refer to Session behavior to configure the sample rate.

EDOT iOS can automatically generate telemetry for supported iOS APIs and app lifecycle events. Automatic instrumentations are bundled with the SDK and are enabled by default.

Refer to Automatic instrumentation for supported instrumentations and configuration.

If you're ready to use EDOT iOS in your own app, continue with Get started.