Skip to content

fix(spans): Don't infer names during tag extraction#6080

Open
loewenheim wants to merge 3 commits into
masterfrom
sebastian/late-name-inference
Open

fix(spans): Don't infer names during tag extraction#6080
loewenheim wants to merge 3 commits into
masterfrom
sebastian/late-name-inference

Conversation

@loewenheim

Copy link
Copy Markdown
Contributor

Currently we synthesize names for V1 frames in the transaction pipeline (during tag extraction). On the one hand, this is wholly unnecessary: Names aren't used in V1 span processing, they are only required when we store spans as EAP items. On the other hand, it creates a PII problem—tag extraction happens before PII scrubbing, so we can leak PII by synthesizing the name.

The solution is to simply not do it, and instead rely on the name synthesis that happens later during the V1 -> V2 span conversion anyway. At that point, we actually do need the name because we want to write the span, and we can't leak PII because it has been scrubbed.

ref: INGEST-957

@loewenheim loewenheim requested a review from a team as a code owner June 11, 2026 11:51
@linear-code

linear-code Bot commented Jun 11, 2026

Copy link
Copy Markdown

INGEST-957

@loewenheim loewenheim self-assigned this Jun 11, 2026
Comment on lines -1145 to -1146
} else if let Some(name) = name_for_span(span) {
span_tags.name = name.into();

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 is the operative change in this PR.

"is_segment": False,
# Since `http.route` is redacted and the name is synthesized
# from it, it needs to be redacted too.
"name": "GET *******************",

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 shows that the name synthesis respects PII. It raises a question, though: is it actually useful to construct a name from scrubbed values? The alternative would be to fall through to the next rule until we find one where all required attributes are available and unredacted.

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.

1 participant