feat: add HTTP/URL resource attributes to OpenTelemetry resource #219
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.
Summary
Note: This PR direction changed significantly during development.
Initially added HTTP/URL resource attributes (
url.scheme
,url.domain
,url.path
,url.query
,url.full
,http.route
,url.port
) to the OpenTelemetry browser resource configuration. However, after receiving feedback pointing out conflicts with existing span attributes and investigating OpenTelemetry standards, I removed all URL resource attributes to ensure compliance.Key findings:
browser.brands
,browser.language
, etc.)window.location
) and spans (dynamic, from HTTP requests), creating semantic conflictsenhanceSpanWithHttpRequestAttributes
function correctly implements URL attributes for spansCurrent state: Resource configuration now only includes standard browser resource attributes per OpenTelemetry conventions. URL information remains available through existing span attributes.
How did you test this change?
yarn format:all
passedAre there any deployment considerations?
No deployment considerations. This change only affects the OpenTelemetry resource configuration in the browser SDK and maintains backward compatibility.
Human Review Checklist:
Link to Devin run: https://app.devin.ai/sessions/a7d3c99d04b9438984d7997b4deb1950
Requested by: @Vadman97