﻿---
title: Elastic Distribution of OpenTelemetry iOS
description: The Elastic Distribution of OpenTelemetry iOS (EDOT iOS) is an APM agent based on OpenTelemetry. It provides built-in tools and configurations to make the OpenTelemetry SDK work with Elastic using as little code as possible while fully leveraging the combined forces of Elasticsearch and Kibana for your iOS application.
url: https://www.elastic.co/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios
products:
  - APM Agent
  - Elastic Cloud Serverless
  - Elastic Distribution of OpenTelemetry SDK
  - Elastic Distribution of OpenTelemetry iOS
  - Elastic Observability
applies_to:
  - Serverless Observability projects: Generally available
  - Elastic Stack: Generally available
  - Elastic Distribution of OpenTelemetry iOS: Generally available
---

# Elastic Distribution of OpenTelemetry iOS
The Elastic Distribution of OpenTelemetry iOS (EDOT iOS) is an APM agent based on [OpenTelemetry](https://opentelemetry.io/). EDOT iOS provides built-in tools and configurations to make the [OpenTelemetry-Swift SDK](https://github.com/open-telemetry/opentelemetry-swift) 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](#distributed-tracing)
- [Session review](#session-review)
- [Alerts and dashboards](#alerts-and-dashboards)


## Distributed tracing

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.
</note>


## Session review

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.

## Alerts and dashboards

EDOT iOS provides [direct access](https://www.elastic.co/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/manual-instrumentation) 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](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3764/explore-analyze/alerting/alerts) when an error occurs or a performance threshold is exceeded.
- [Build dashboards](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3764/explore-analyze/dashboards) that show the data most important to your app.
- Use [Discover](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3764/explore-analyze/discover) to search spans, logs, and their attributes.


## Features

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

### Disk buffering

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](/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/configuration#withPersistentStorageConfiguration).

### Crash reporting

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](/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/automatic-instrumentation#crash-reporting) for testing instructions and limitations.

### Central configuration

<applies-to>
  - Elastic Distribution of OpenTelemetry iOS: Preview since 1.4
</applies-to>

You can remotely manage supported EDOT iOS settings through Kibana. Refer to [Central configuration](/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/configuration#central-configuration) for setup instructions and available settings.

### Time synchronization

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.

### Sessions

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](/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/configuration#session-behavior) to configure the sample rate.

### Automatic instrumentation

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](https://www.elastic.co/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/automatic-instrumentation) for supported instrumentations and configuration.

## Try it out

If you're ready to use EDOT iOS in your own app, continue with [Get started](https://www.elastic.co/elastic/docs-builder/docs/3764/reference/opentelemetry/edot-sdks/ios/getting-started).