feat: OpenTelemetry Tracing API and Exporting (#26710)

Initial import of OTEL code supporting tracing. Metrics soon to come.
Implements APIs for https://jsr.io/@deno/otel so that code using
OpenTelemetry.js just works tm.

There is still a lot of work to do with configuration and adding
built-in tracing to core APIs, which will come in followup PRs.

---------

Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
snek 2024-11-13 11:38:46 +01:00 committed by GitHub
parent 7becd83a38
commit aa546189be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 1742 additions and 124 deletions

View file

@ -99,18 +99,24 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
id: 7,
},
UnstableGranularFlag {
name: "otel",
help_text: "Enable unstable OpenTelemetry features",
show_in_help: false,
id: 8,
},
// TODO(bartlomieju): consider removing it
UnstableGranularFlag {
name: ops::process::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable process APIs",
show_in_help: false,
id: 8,
id: 9,
},
UnstableGranularFlag {
name: "temporal",
help_text: "Enable unstable Temporal API",
show_in_help: true,
id: 9,
id: 10,
},
UnstableGranularFlag {
name: "unsafe-proto",
@ -118,19 +124,19 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
// This number is used directly in the JS code. Search
// for "unstableIds" to see where it's used.
id: 10,
id: 11,
},
UnstableGranularFlag {
name: deno_webgpu::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable `WebGPU` APIs",
show_in_help: true,
id: 11,
id: 12,
},
UnstableGranularFlag {
name: ops::worker_host::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable Web Worker APIs",
show_in_help: true,
id: 12,
id: 13,
},
];