From ccbed96561703d842785bfc0e65bf730a652bc19 Mon Sep 17 00:00:00 2001 From: devlasbe Date: Thu, 7 Aug 2025 14:54:27 +0900 Subject: [PATCH] feat: Modify the SDK initialization options to allow adding Exporter headers --- src/index.tsx | 2 ++ src/types.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index c27040c..17cd88c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -57,6 +57,7 @@ export function openTelemetrySDK(options: Options = {}) { url: `${options.url}/v1/traces`, headers: { "Content-Type": "application/json", + ...options.headers, }, }) ) @@ -105,6 +106,7 @@ export function openTelemetrySDK(options: Options = {}) { url: `${options.url}/v1/metrics`, headers: { "Content-Type": "application/json", + ...options.headers, }, }), }) diff --git a/src/types.ts b/src/types.ts index 18e87a3..8bc6685 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,6 +3,7 @@ export interface Options { name?: string; environment?: string; url?: string; + headers?: Record; debug?: boolean; native?: boolean; features?: {