MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / makeTelemetryLive

Function makeTelemetryLive

apps/cloud/src/observability/telemetry.ts:163–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161};
162
163const makeTelemetryLive = (): Layer.Layer<never> =>
164 Layer.mergeAll(
165 // Redaction applies even when the exporter is not installed: Effect still
166 // builds spans (and their header attributes) in-memory, and any future
167 // consumer of those spans must never observe an unredacted credential.
168 SpanHeaderRedactionLive,
169 Layer.unwrap(
170 Effect.sync(() =>
171 ensureGlobalTracerProvider()
172 ? OtelTracer.layerGlobal.pipe(
173 Layer.provide(
174 Resource.layer({
175 serviceName: SERVICE_NAME,
176 serviceVersion: serviceVersion(),
177 attributes: resourceAttributes(),
178 }),
179 ),
180 )
181 : Layer.empty,
182 ),
183 ),
184 );
185
186export const WorkerTelemetryLive: Layer.Layer<never> = makeTelemetryLive();
187

Callers 1

telemetry.tsFile · 0.70

Calls 4

serviceVersionFunction · 0.85
resourceAttributesFunction · 0.85
syncMethod · 0.65

Tested by

no test coverage detected