Skip to content

Conversation

@devlasbe
Copy link

@devlasbe devlasbe commented Aug 7, 2025

Summary

modify the SDK initialization options to allow adding Exporter headers.

I added a header option to authenticate with a monitoring cloud system that follows the OpenTelemetry standard.

Test plan

After building the package, I added headers to the SDK initialization options in the example app and verified them in the Network tab of the web browser.

const sdk = openTelemetrySDK({
  // Use '10.0.2.2' instead of 'localhost' on Android emulators
  url: "http://localhost:4318",
  headers: {
    Authorization: "Test Access Token", // ADD
  },
  debug: true,
  name: "MyExampleApp",
  version: "1.0.0-alpha",
  environment: "development",
  features: {
    session: {
      getSessionId: () => "custom-session-id",
    },
  },
});
image

@devlasbe
Copy link
Author

devlasbe commented Aug 8, 2025

@adhorodyski review please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant