Skip to content

How to check if open telemetry is enabled #30106

@andykais

Description

@andykais

I am adding custom telemetry data for the open telemetry tools, and one of the first things I need is the ability to optionally do extra telemetry reporting work. What is the standard way to check if open telemetry is enabled for a particular deno run? I need to statically know if open telemetry is enabled, so the best tool I have right now is

const OTEL_ENABLED = Deno.env.get('OTEL_DENO')

The downside here is that the user needs to enable env OTEL_DENO permissions. Ideally, there would just be a deno global for this. Something like Deno.otel.enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions