From 2474b4370e9539a74fd2135d0f35965333c3cc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Th=C3=A9riault?= Date: Tue, 28 Nov 2023 14:57:52 -0800 Subject: [PATCH] even more logging --- packages/sdk/src/parent-info-processor.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/parent-info-processor.ts b/packages/sdk/src/parent-info-processor.ts index 15a36f13..5cad4f49 100644 --- a/packages/sdk/src/parent-info-processor.ts +++ b/packages/sdk/src/parent-info-processor.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { type Context, trace, TraceFlags } from "@opentelemetry/api" +import { type Context, diag, trace, TraceFlags } from "@opentelemetry/api" import { NoopSpanProcessor, type ReadableSpan, @@ -25,6 +25,8 @@ import { cache } from "./cache" export class SwParentInfoSpanProcessor extends NoopSpanProcessor { override onStart(span: Span, parentContext: Context): void { + diag.debug("span start", span) + const spanContext = span.spanContext() const parentSpanContext = trace.getSpanContext(parentContext) @@ -34,6 +36,8 @@ export class SwParentInfoSpanProcessor extends NoopSpanProcessor { } override onEnd(span: ReadableSpan): void { + diag.debug("span end", span) + const spanContext = span.spanContext() // clear here unless sampled in which case the exporter takes care of it if (!(spanContext.traceFlags & TraceFlags.SAMPLED)) {