Effect CommunityEC
Effect Community2y ago
7 replies
Sly

Attaching Existing Spans to OpenTelemetry Tracing

Given you use:

import { Tracer, Resource } from "@effect/opentelemetry"
import { Layer } from "effect"

const TracingLive = Tracer.layerGlobal.pipe(
  Layer.provide(Resource.layer({ serviceName: "my-service" })),
)


How would you attach the span, to spans already created outside? So at the point in time the effect is run, there's already an existing span otuside, that should be picked up as the parent span?
Was this page helpful?