BT

Facilitating the spread of knowledge and innovation in professional software development

Contribute

Topics

Choose your language

InfoQ Homepage News OpenTelemetry Moves Python and Swift Tracing API/SDKs to 1.0

OpenTelemetry Moves Python and Swift Tracing API/SDKs to 1.0

Bookmarks

OpenTelemetry released version 1.0 of the Python and Swift distributed tracing API and SDK. They both include OpenTelemetry API support, SDKs, exporters to common telemetry formats, and getting started materials. The Python release is considered stable whereas the Swift release is still in beta.

The APIs within each release include Tracing API, Baggage API, Context API, and Propagators API. A trace represents a set of events, generated from a single operation (such as clicking a button on a website), aggregated across the various components within the application. Within OpenTelemetry, a baggage represents a name/value pair. It is intended for indexing events in one service with details provided by a prior service in the same transaction. For example, a provider could include context about the API user that is responsible for the request.

A context is an immutable mechanism to propagate values across API boundaries. Processes that cut across boundaries are to access their data in-process using the same shared context object. State is sent to the next process using a propagator. These are objects that make use of the context to read and write data for each cross process concern, such as traces and baggage.

The SDK includes controls for sampling, processing, and exporting. The supported trace exporters include Jaeger, Zipkin, DataDog, and the OpenTelemetry Protocol (OTLP). The Jaeger exporter for Python supports sending traces using the Thrift compact protocol over UDP. For configurations where it isn't possible to deploy the Jaeger Agent next to the application, the collector can instead be configured to use Thrift over HTTP. The Swift SDK also has metrics exporters for Prometheus, Datadog, and the OpenTelemetry Collector.

The OpenTelemetry Collector can be used as a vendor-agnostic implementation to read and write telemetry data. It supports multiple open-source observability data formats such as Jaeger, Prometheus, and Fluent Bit.

Both OpenTracing and OpenCensus are to be superseded by OpenTelemetry. Users of OpenTracing will be able to make use of the OpenTracing Shim to migrate once the specification moves to stable. There is currently not a shim for OpenCensus users.

The vision of the OpenTelemetry project is to create a consistent standard for the three pillars of observability: distributed tracing, metrics, and logs. With these releases, both Python and Swift have support for distributed tracing. The roadmap over the next several months includes building the metrics and logs APIs and SDKs.

The Swift release is still considered to be in beta. According to Nacho Bonafonte, senior software engineer at Datadog, the "current APIs can be considered stable, but not all pieces have gone through rigorous beta testing".

There are some Swift-only components within the release. These include URLSession instrumentation for capturing network traffic, an SDK ResourceExtension for reporting system information, and an experimental integration with SwiftMetrics.

The SwiftMetricsShim integrates with the native Swift metrics API and redirects the data to the OpenTelemetry API functions:

let meter: Meter = // ... Your existing code to create a meter
let metrics = OpenTelemetrySwiftMetrics(meter: meter)
MetricsSystem.bootstrap(metrics)

More details can be found on the respective Python and Swift channels on the CNCF Slack instance. Both projects are also looking for support on GitHub.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.