()
| 161 | }; |
| 162 | |
| 163 | const 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 | |
| 186 | export const WorkerTelemetryLive: Layer.Layer<never> = makeTelemetryLive(); |
| 187 |
no test coverage detected