deno icon indicating copy to clipboard operation
deno copied to clipboard

`"unstable": ["otel"]` in deno.json doesn't trigger unstable otel flag

Open knotbin opened this issue 7 months ago • 1 comments

Problem

Specifying "unstable": ["otel"] in deno.json does not enable otel signals while specifying --unstable-otel in the run command does.

A similar issue was raised in #27273 but otel enabling was since refactored in #27333 so I believe this is a different problem.

Expected behavior

both "unstable": ["otel"] and --unstable otel should work to trigger the otel unstable feature flag

Actual behavior

"unstable": ["otel"] does not seem to do anything while --unstable otel works.

Environment

Deno v2.3.3

knotbin avatar May 28 '25 03:05 knotbin

To reproduce:

Run deno init in an empty folder and change deno.json to:

{
  "tasks": {
    "dev": "OTEL_DENO=true deno run main.ts"
  },
  "imports": {
    "@std/assert": "jsr:@std/assert@1"
  },
  "unstable": ["otel"]
}

Run deno task dev, open Grafana and observe no logs are sent.

Now add the --unstable-otel flag to the dev task and run deno task dev. Open Grafana and observe that logs are now being sent.

knotbin avatar May 28 '25 14:05 knotbin