OpenTelemetry Moves Python and Swift Tracing API/SDKs to 1.0

OpenTelemetry Moves Python and Swift Tracing API/SDKs to 1.0

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.

What is OpenTelemetry in Kubernetes?

OpenTelemetry makes robust, portable telemetry a built-in feature of cloud-native software.

According to the official site

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, baggage represents a name/value pair. It is intended for indexing events in one service with details provided by prior service in the same transaction. For example, a provider could include context about the API user that is responsible for the request.

OpenTelemetry is great but why is it so bloody complicated?
OpenTelemetry logo

What is context in OpenTelemetry?

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. The 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 JaegerZipkinDataDog, 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.

How is OpenTelemetry Collector used in DevOps

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.

According to the official site

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

OpenTelemetry Moves Python and Swift Tracing API/SDKs to 1.0 Also, Check Annotating Kubernetes Services For Humans

If you need help with your Website Development or Digital Marketing, discover our Services.

Amit Chaudhary

Helping Community at Civo. Co-founder hyCorve limited. Certified Checkbox Unchecker. Connecting bare metal to cloud.

All author posts
Write a comment