swift-otel/swift-otel-semantic-conventions

Transform attribute mentions into DocC symbols

Offen

#20 geöffnet am 26.05.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Swift (6 Forks)auto 404
documentationgood first issuehelp wanted

Repository-Metriken

Stars
 (15 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Introduction

OpenTelemetry's semantic conventions have a lot of documentation paragraphs that mention other attributes, for example this line from http.request.header:

The User-Agent header is already captured in the user_agent.original attribute.

Proposed Feature

A nice UX improvement for our generated documentation could be to link to transform these attribute mentions into actual Swift symbol references, i.e.

/// The `User-Agent` header is already captured in the ``OTelAttribute/userAgent/original`` attribute.

... for the OTelAttribute documentation and ...

/// The `User-Agent` header is already captured in the ``Tracing/SpanAttributes/UserAgentAttributes/NestedSpanAttributes/original`` attribute.

... for the SpanAttributes documentation.

Proposed Solution

This feature can likely be built on top of @NeedleInAJayStack's excellent work in #19, which already collects the connection between OTel attribute names and generated Swift symbol names into a Context type.

Contributor Guide