Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(honeycomb-opentelemetry-web): Add support for differing subdomains for debug link exporter. #406

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

wolfgangcodes
Copy link
Contributor

Which problem is this PR solving?

This will enable this to work with EU deployments.

Short description of the changes

Infers the ui and auth URL roots from the supplied endpoint.

How to verify that this has the expected result

Pointing an example app to https://api.eu1.honeycomb.io/v1/traces as suggested in the sample apps should link to EU traces.

@wolfgangcodes wolfgangcodes changed the title feat(): Add support for differing subdomains for debug link exporter. feat(honeycomb-opentelemetry-web): Add support for differing subdomains for debug link exporter. Dec 6, 2024
Copy link
Member

@martin308 martin308 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question or two inline, otherwise looks good to me 🚀

);
}

export const getUrlRoots = (endpoint = '') => {
const url = new URL(endpoint);
const subdomainRegex = /(api)([.|-])?(.*?)(\.?)(honeycomb\.io)(.*)/;
Copy link
Member

@martin308 martin308 Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we trying to capture with the (.*) group at the end, port?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's strictly needed, but it would match v1/traces at the end of the default endpoint value.

Copy link
Contributor

@arriIsHere arriIsHere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through some test apps against EU hc instance and was able to get events and the SDK seemed happy.

@wolfgangcodes wolfgangcodes marked this pull request as ready for review December 10, 2024 17:33
@wolfgangcodes wolfgangcodes requested a review from a team as a code owner December 10, 2024 17:33
@wolfgangcodes wolfgangcodes merged commit d70cef7 into main Dec 10, 2024
16 checks passed
@wolfgangcodes wolfgangcodes deleted the wg/fix-links-for-eu branch December 10, 2024 20:20
@wolfgangcodes wolfgangcodes restored the wg/fix-links-for-eu branch December 11, 2024 16:17
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.

4 participants