apple / apple/swift-distributed-tracing

Add Resource type to Tracing API

Open
#39 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
320
Forks
57
Avg merge
4d 5h
Merged PRs (30d)
1

Description

OpenTelemetry defines a `Resource` as part of its spec: https://github.com/open-telemetry/opentelemetry-specification/blob/v0.7.0/specification/resource/sdk.md

> Resource captures information about the entity for which telemetry is recorded. For example, metrics exposed by a Kubernetes container can be linked to a resource that specifies the cluster, namespace, pod, and container name.

A resource is passed along when sending spans to the Otel collector.

Resources also have attributes with semantic conventions similar to spans: https://github.com/open-telemetry/opentelemetry-specification/blob/v0.7.0/specification/resource/semantic_conventions/README.md

It might be a good idea to expose the resource API as well as part of the `Tracing` library, but as the resources (e.g. which cloud provider the app is running on or whether it's running in a Docker container) are usually unknown to frameworks and instead known by the application developer, this API could also live in a specific tracer implementation.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked OpenTelemetry Resource specification and semantic conventions, then inspect the existing Tracing API and tracer implementations. Resolve whether Resource belongs in the shared Tracing library or a specific tracer implementation, and define how it is passed with spans to the Otel collector. Done means the chosen API supports application-provided resource attributes and propagation is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
distributed-systems, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.