`"unstable": ["otel"]` in deno.json doesn't trigger unstable otel flag
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
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.