(client: NodeClient, options: AdditionalOpenTelemetryOptions = {})
| 30 | * Initialize OpenTelemetry for Node. |
| 31 | */ |
| 32 | export function initOpenTelemetry(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): void { |
| 33 | if (client.getOptions().debug) { |
| 34 | setupOpenTelemetryLogger(); |
| 35 | } |
| 36 | |
| 37 | const [provider, asyncLocalStorageLookup] = setupOtel(client, options); |
| 38 | client.traceProvider = provider; |
| 39 | client.asyncLocalStorageLookup = asyncLocalStorageLookup; |
| 40 | } |
| 41 | |
| 42 | interface NodePreloadOptions { |
| 43 | debug?: boolean; |
no test coverage detected