(tracesUrl: string)
| 26 | * OTLP endpoint (the exporter) goes untraced, everything else is traced. |
| 27 | */ |
| 28 | export const makeBrowserTracingLayer = (tracesUrl: string): Layer.Layer<never> => |
| 29 | Layer.mergeAll( |
| 30 | OtlpTracer.layer({ |
| 31 | url: tracesUrl, |
| 32 | resource: { serviceName: "executor-web" }, |
| 33 | // Browser sessions are short; the 5s default loses the tail spans when |
| 34 | // the tab closes. |
| 35 | exportInterval: "1 second", |
| 36 | }).pipe(Layer.provide(UrlRedactingOtlpSerializationJson), Layer.provide(FetchHttpClient.layer)), |
| 37 | Layer.succeed(HttpClient.TracerDisabledWhen, (request) => request.url.includes("/v1/traces")), |
| 38 | ); |
no outgoing calls
no test coverage detected