/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/cli/otel_basic/links.ts
40 строк
841 B
Kenta Moriuchi
chore: Happy New Year 2026 (#31748)
08 янв 2026, 18:28
Не верифицирован
08 янв 2026, 18:28
8193cf9
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. import { trace } from "npm:@opentelemetry/api@1.9.0"; const tracer = trace.getTracer("example-tracer"); const span1 = tracer.startSpan("example span", { links: [{ context: { traceId: "1234567890abcdef1234567890abcdef", spanId: "1234567890abcdef", traceFlags: 1, }, }], }); span1.end(); const span2 = tracer.startSpan("example span"); span2.addLink({ context: { traceId: "1234567890abcdef1234567890abcdef", spanId: "1234567890abcdef", traceFlags: 1, }, }); span2.end(); const span3 = tracer.startSpan("example span"); span3.addLink({ context: { traceId: "1234567890abcdef1234567890abcdef", spanId: "1234567890abcdef", traceFlags: 1, }, attributes: { key: "value", }, droppedAttributesCount: 1, }); span3.end();