Skip to content

Conversation

@lucacasonato
Copy link
Member

This PR adds OpenTelemetry tracing support to Deno.cron() handlers. When OTEL
tracing is enabled, each cron handler invocation is wrapped in a span named
"deno.cron" with deno.cron.name and deno.cron.schedule attributes. The
span is properly entered so that any child spans created within the handler are
correctly parented. On successful execution, the span status is set to OK
(code 1); on error, the span captures exception details using OTel semantic
conventions (exception.type, exception.message, exception.stacktrace) and
sets the status to ERROR (code 2). This also updates updateSpanFromError in
the telemetry utils to use the standard OTel exception attributes instead of the
previous error.type attribute.

@bartlomieju bartlomieju merged commit 9855759 into main Jan 22, 2026
19 checks passed
@bartlomieju bartlomieju deleted the cron_otel branch January 22, 2026 13:55
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.

4 participants