Skip to content

ref(eap): Don't write sentry.browser attributes#5914

Open
loewenheim wants to merge 1 commit intomasterfrom
sebastian/brower-name-version
Open

ref(eap): Don't write sentry.browser attributes#5914
loewenheim wants to merge 1 commit intomasterfrom
sebastian/brower-name-version

Conversation

@loewenheim
Copy link
Copy Markdown
Contributor

Relay writes the attributes sentry.browser.name and sentry.browser.version in user agent detection. However, the official names of these attributes in conventions are actually browser.name and browser.version.

The sentry. variants have been declared as aliases of the correct versions in sentry-conventions for some time, and Snuba is able to coalesce them on this basis, so no part of the product should require the sentry. variants to work. Therefore, it is safe to write the correct versions of these attributes.

ref: INGEST-882.

Relay writes the attributes `sentry.browser.name` and
`sentry.browser.version` in user agent detection. However, the official
names of these attributes in conventions are actually `browser.name`
and `browser.version`.

The `sentry.` variants have been declared as aliases of the correct
versions in `sentry-conventions` for some time, and Snuba is able to
coalesce them on this basis, so no part of the product should require
the `sentry.` variants to work. Therefore, it is safe to write the
correct versions of these attributes.
@loewenheim loewenheim requested a review from a team as a code owner April 30, 2026 09:19
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 30, 2026

# Calculated byte size: name + value + attribute keys/values.
# This is a billing relevant number, do not just adjust this because it changed.
"quantity": 249,
"quantity": 235,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This does give me a little bit of pause; we're making a purely internal change here (the names of some attributes which we infer, not anything that the "user" sends) and it has an effect on a billing-relevant number. Is it correct that we take the names of attributes the user didn't send into account for billing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it correct that we take the names of attributes the user didn't send into account for billing?

I believe so, yes (but with the new ingest_settings the user should be able to opt in or out of these attributes).

My 2c is that this is fine as long as the byte size does not increase. @k-fish what's your opinion?

Copy link
Copy Markdown
Member

@Dav1dde Dav1dde Apr 30, 2026

Choose a reason for hiding this comment

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

These changes must not have an impact on that number. The size logic should be built in a way, that the first (trusted) Relay, counts the original payload size of a trace metric/log and this is then the value used as the billed value.

If an external/untrusted Relay makes these changes, all we can do is consider it an SDK (untrusted client) and we use the size our infrastructure received.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These changes must not have an impact on that number. The size logic should be built in a way, that the first (trusted) Relay, counts the original payload size of a trace metric/log and this is then the value used as the billed value.

Right, that's what I thought. I'll see if the sizing logic needs to be fixed for trace metrics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #5917. Fortunately it turns out that only the test was wrong, the logic is working as intended.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants