(options: DenoOptions = {})
| 113 | * @see {@link DenoOptions} for documentation on configuration options. |
| 114 | */ |
| 115 | export function init(options: DenoOptions = {}): Client { |
| 116 | if (options.defaultIntegrations === undefined) { |
| 117 | options.defaultIntegrations = getDefaultIntegrations(options); |
| 118 | } |
| 119 | |
| 120 | const clientOptions: ServerRuntimeClientOptions = { |
| 121 | ...options, |
| 122 | stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser), |
| 123 | integrations: getIntegrationsToSetup(options), |
| 124 | transport: options.transport || makeFetchTransport, |
| 125 | }; |
| 126 | |
| 127 | const client = initAndBind(DenoClient, clientOptions); |
| 128 | |
| 129 | // Set up OpenTelemetry compatibility to capture spans from libraries using @opentelemetry/api |
| 130 | // Note: This is separate from Deno's native OTEL support and doesn't capture auto-instrumented spans |
| 131 | if (!options.skipOpenTelemetrySetup) { |
| 132 | setupOpenTelemetryTracer(); |
| 133 | } |
| 134 | |
| 135 | return client; |
| 136 | } |
nothing calls this directly
no test coverage detected