Skip to content

docs: fix outdated OpenTelemetry api example#3051

Open
RYGRIT wants to merge 1 commit intodenoland:mainfrom
RYGRIT:fix/examples-opentelemetry
Open

docs: fix outdated OpenTelemetry api example#3051
RYGRIT wants to merge 1 commit intodenoland:mainfrom
RYGRIT:fix/examples-opentelemetry

Conversation

@RYGRIT
Copy link
Copy Markdown

@RYGRIT RYGRIT commented Apr 16, 2026

Problem

trace.SpanStatusCode.ERROR is not available in @opentelemetry/api 1.x.

deno check server.ts

TS2339 [ERROR]: Property 'SpanStatusCode' does not exist on type 'TraceAPI'.
          code: trace.SpanStatusCode.ERROR,
                      ~~~~~~~~~~~~~~

Changes

  • Import SpanStatusCode directly from @opentelemetry/api
  • Replace trace.SpanStatusCode.ERROR with SpanStatusCode.ERROR

@RYGRIT RYGRIT changed the title docs: fix outdated OpenTelemetry example docs: fix outdated OpenTelemetry api example Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant