-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
packages/honeycomb-opentelemetry-web/src/console-trace-link-exporter.ts
Outdated
Show resolved
Hide resolved
…porter.ts Co-authored-by: Mustafa Haddara <[email protected]>
There was a problem hiding this 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)(.*)/; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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.