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(metrics): Drop transaction tag for high-cardinality sources [INGEST-1437] #1339

Merged
merged 3 commits into from
Jul 14, 2022

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Jul 13, 2022

Drop the transaction tag for metrics extracted from transaction payload if the transaction source is url or unknown, because these might contain identifiers that blow up the number of different metrics buckets.

Note that this leads to differences between the transactions dataset and the metrics dataset, which the product will have to handle.

@jjbayer jjbayer marked this pull request as ready for review July 13, 2022 13:59
@jjbayer jjbayer requested a review from a team July 13, 2022 13:59
tags.insert("transaction".to_owned(), transaction.to_owned());
if keep_transaction_name(event.get_transaction_source()) {
tags.insert("transaction".to_owned(), transaction.to_owned());
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This unconditionally drops the transaction name for certain transaction sources. I have considered making this configurable, or even putting it in project config, but decided that that would be overkill at the moment.

// Any other value would be an SDK bug, assume high-cardinality and drop.
TransactionSource::Other(source) => {
// EnvelopeProcessor sets project and SDK on the scope, so no need to add sentry tags here.
relay_log::error!("Invalid transaction source: '{}'", source);
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if it really makes sense to log an error here. If an SDK adds a transaction source deliberately, we will have to ignore this error until Relay updates.

Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

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

good enough!

@jjbayer jjbayer merged commit 876f273 into master Jul 14, 2022
@jjbayer jjbayer deleted the feat/drop-transaction-tag branch July 14, 2022 07:46
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.

2 participants