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): Add target_project_id tag to root counter metrics #4170

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

jan-auer
Copy link
Member

Adds a new tag named target_project_id to the count_per_root_project
metrics in the spans and transactions namespace. The tag contains the numeric
identifier of the project where the transaction or spans are sent, in contrast
to the root project where the trace originated.

This tag is added so that we can track and display stats about the individual
data volume that flows from a root project into a specific target project.

The tag key will not be added to static strings in the metrics indexer.
Therefore, it will not be possible run cross-org queries that filter or group by
this tag.

Closes https://github.com/getsentry/projects/issues/224

@jan-auer jan-auer requested a review from a team as a code owner October 24, 2024 10:52
@jan-auer jan-auer self-assigned this Oct 24, 2024
@jan-auer jan-auer enabled auto-merge (squash) October 24, 2024 11:29
pub universal_tags: CommonTags,
}

impl From<TransactionCPRTags> for BTreeMap<String, String> {
fn from(value: TransactionCPRTags) -> Self {
let mut map: BTreeMap<String, String> = value.universal_tags.into();
map.insert("decision".to_string(), value.decision);
map.insert(
"target_project_id".to_string(),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"target_project_id".to_string(),
"target_project_id".to_owned(),

@jan-auer jan-auer merged commit 84993eb into master Oct 24, 2024
23 checks passed
@jan-auer jan-auer deleted the feat/root-counter-target-project-id branch October 24, 2024 12:31
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