Trouble with OpenTelemetry Spans in Pipe
Given a scenario with an already existing otel instrumentation (e.g. @microlabs/otel-cf-workers) should something such as:
work? Unfortunately not seeing the spans added.
.pipe(
Effect.provide(LiveApp(env, context, request)),
Effect.withParentSpan(
Tracer.externalSpan({
// biome-ignore lint/style/noNonNullAssertion: We assume that there's already a span in the context
traceId: openTelemetryApi.trace.getActiveSpan()?.spanContext()
.traceId!,
// biome-ignore lint/style/noNonNullAssertion: We assume that there's already a span in the context
spanId: openTelemetryApi.trace.getActiveSpan()?.spanContext()
.spanId!,
}),
),
Effect.tapError(Effect.logError),
), .pipe(
Effect.provide(LiveApp(env, context, request)),
Effect.withParentSpan(
Tracer.externalSpan({
// biome-ignore lint/style/noNonNullAssertion: We assume that there's already a span in the context
traceId: openTelemetryApi.trace.getActiveSpan()?.spanContext()
.traceId!,
// biome-ignore lint/style/noNonNullAssertion: We assume that there's already a span in the context
spanId: openTelemetryApi.trace.getActiveSpan()?.spanContext()
.spanId!,
}),
),
Effect.tapError(Effect.logError),
),work? Unfortunately not seeing the spans added.
