Skip to content

OpenTelemetry middleware TSDoc says extensions["x.otel"] but code uses the full vendor namespace #84

@nficano

Description

@nficano

packages/middleware/otel/src/index.ts:9-13 and the withTracing TSDoc at packages/middleware/otel/src/index.ts:53 all describe trace context as living under extensions["x.otel"]. The actual key, defined at line 49 and used at lines 224 and 233, is "x-vendor.opentelemetry.tracecontext" — the spec-conformant x-vendor.<vendor>.<name> namespace, which the same comment block correctly explains on lines 46-48. The contradiction is internal: lines 46-49 explain why the long key is necessary, then lines 9-13 and 53 give the wrong short key to readers writing examples or integrating a non-SDK peer.

Fix prompt: replace every TSDoc reference to extensions["x.otel"] with extensions["x-vendor.opentelemetry.tracecontext"] in packages/middleware/otel/src/index.ts:9, packages/middleware/otel/src/index.ts:12, and packages/middleware/otel/src/index.ts:53. Where the wrapping prose gets cluttered, abbreviate as extensions[OTEL_EXTENSION_NAME] and add a one-line @see to the constant. Check that no other doc under docs/ cites the wrong key; update docs/packages/middleware-otel.md (if present) and any README example to match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:mediumMedium severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions