A Deno-oriented build of opentelemetry-js, with extra Deno-specific integrations.
- Published on JSR since
v0.10.0
. - Also published to
/x/
(with one JSR dependency).
// set up the SDK:
import 'jsr:@cloudydeno/opentelemetry/register';
// Can also use `deno --unstable-otel` instead of the /register import.
// Wrap an async function in a span:
import { traceAsyncFunc } from 'jsr:@cloudydeno/opentelemetry/instrumentation/async.ts';
const doTheThing = traceAsyncFunction('DoTheThing', async () => {
const resp = await fetch(...);
/* ... */
});
await doTheThing();