Skip to content

fix(spans): Infer names PII-safely - #6112

Merged
loewenheim merged 7 commits into
masterfrom
sebastian/name-synthesis-pii
Jun 22, 2026
Merged

fix(spans): Infer names PII-safely#6112
loewenheim merged 7 commits into
masterfrom
sebastian/name-synthesis-pii

Conversation

@loewenheim

@loewenheim loewenheim commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

When inferring names for V1 spans, PII has to be taken into account. This means that unconditionally inferring names during V1 -> V2 conversion, as we do now, is unsafe—it's fine for spans that have gone through PII scrubbing (to wit, standalone spans that have gone through the legacy pipeline, as well as spans extracted from transactions), but for standalone spans we have to do it later.

This addresses the problem in the following ways:

  • It adds a flag to span_v1_to_span_v2 for whether to infer a name.
  • It adds an infer_name flag to span processing settings, controlling whether names should be inferred in the pipeline. This is disabled for V2 spans but enabled for legacy spans.

With this PR, name inference is now PII-safe in all cases:

  • transaction spans go through the transaction pipeline, are scrubbed, and have the name inferred at the very end during conversion;
  • the same for standalone spans in the legacy pipeline;
  • standalone spans in the V2 pipeline go through V2 scrubbing and have their name inferred after that;
  • V2 spans never have a name inferred.

Closes INGEST-957.

@loewenheim
loewenheim requested a review from a team as a code owner June 22, 2026 07:39
@loewenheim loewenheim self-assigned this Jun 22, 2026
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

INGEST-957

@loewenheim loewenheim changed the title ref(spans): Infer names PII-safely fix(spans): Infer names PII-safely Jun 22, 2026
@loewenheim
loewenheim added this pull request to the merge queue Jun 22, 2026
Merged via the queue into master with commit d85b1ca Jun 22, 2026
33 checks passed
@loewenheim
loewenheim deleted the sebastian/name-synthesis-pii branch June 22, 2026 09:15
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