|
1 |
| -import { ModuleGraphJson, SubProcess, trace } from "../../deps.ts"; |
| 1 | +import { context, ModuleGraphJson, SubProcess, trace } from "../../deps.ts"; |
2 | 2 | import { computeDependencies } from "../../lib/module-map.ts";
|
3 | 3 |
|
4 | 4 | const tracer = trace.getTracer('dependencies-of-compute');
|
@@ -32,8 +32,15 @@ export async function computeGraph(
|
32 | 32 | }
|
33 | 33 |
|
34 | 34 | export async function renderGraph(modUrl: string, dotArgs: string[], args: URLSearchParams) {
|
35 |
| - return tracer.startActiveSpan('Compute + Render Graph', span => |
36 |
| - renderGraphInner(modUrl, dotArgs, args).finally(() => span.end())); |
| 35 | + return tracer.startActiveSpan('Compute + Render Graph', { |
| 36 | + attributes: { |
| 37 | + 'render.mod_url': modUrl, |
| 38 | + 'render.dot_args': dotArgs, |
| 39 | + 'render.params': args.toString(), |
| 40 | + }, |
| 41 | + }, context.active(), span => |
| 42 | + renderGraphInner(modUrl, dotArgs, args).finally(() => |
| 43 | + span.end())); |
37 | 44 | }
|
38 | 45 | async function renderGraphInner(modUrl: string, dotArgs: string[], args: URLSearchParams) {
|
39 | 46 | const dotText = await computeGraph(modUrl, args, 'dot');
|
|
0 commit comments