feat:instrument browser document url full#237
Draft
mquentin wants to merge 4 commits intoopen-telemetry:mainfrom
Draft
feat:instrument browser document url full#237mquentin wants to merge 4 commits intoopen-telemetry:mainfrom
mquentin wants to merge 4 commits intoopen-telemetry:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Is this an approach we do for other instrumentations? I'm wondering if instead of trying to patch the existing logger provider we should instead just have a log processors package that users can use when they init the SDK. I don't like that we're depending on an internal API (_activeSpanProcessor) to add the processor
Contributor
Author
There was a problem hiding this comment.
So this is really a draft of a draft. I am actually up to any suggestion because I started this more as a demo than a PR proposal.
44c4f55 to
d011b42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Stacked on top
of #225 and open-telemetry/semantic-conventions#3633 providing a solution to this issue: #174 (comment)
Fixes # #174 (comment)
Short description of the changes
Adds
BrowserDocumentUrlInstrumentationthat stamps every OTel span and every OTel log record event withbrowser.document.url.fullderived fromlocation.hrefat creation time.Also add this new instrumentation to the sandbox testing environment
Note - comment about alternative approaches:
We just add a log/span processor classes that add this attribute to all logs/spans. There is already a precedent for session.id here.
We work towards making this a resource attribute.
The second option is ultimately what we want (for both this and session). However, the mechanism for this is not defined yet. My hope is to prototype this in the end-to-end demo that we have discussed. And I would like to prototype it in a way that it can support multiple different attributes, using entities, and show how updates would be handled by the SDK. I described this in the discussion topic.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: