diff --git a/feat/dependencies-of/compute.ts b/feat/dependencies-of/compute.ts index 4da0ea5..63d73b1 100644 --- a/feat/dependencies-of/compute.ts +++ b/feat/dependencies-of/compute.ts @@ -1,4 +1,4 @@ -import { ModuleGraphJson, SubProcess, trace } from "../../deps.ts"; +import { context, ModuleGraphJson, SubProcess, trace } from "../../deps.ts"; import { computeDependencies } from "../../lib/module-map.ts"; const tracer = trace.getTracer('dependencies-of-compute'); @@ -32,8 +32,15 @@ export async function computeGraph( } export async function renderGraph(modUrl: string, dotArgs: string[], args: URLSearchParams) { - return tracer.startActiveSpan('Compute + Render Graph', span => - renderGraphInner(modUrl, dotArgs, args).finally(() => span.end())); + return tracer.startActiveSpan('Compute + Render Graph', { + attributes: { + 'render.mod_url': modUrl, + 'render.dot_args': dotArgs, + 'render.params': args.toString(), + }, + }, context.active(), span => + renderGraphInner(modUrl, dotArgs, args).finally(() => + span.end())); } async function renderGraphInner(modUrl: string, dotArgs: string[], args: URLSearchParams) { const dotText = await computeGraph(modUrl, args, 'dot');