Skip to content

ref: Set PII to maybe for most non sentry.* attributes#127

Merged
lcian merged 12 commits intomainfrom
lcian/set-pii-to-maybe
Sep 9, 2025
Merged

ref: Set PII to maybe for most non sentry.* attributes#127
lcian merged 12 commits intomainfrom
lcian/set-pii-to-maybe

Conversation

@lcian
Copy link
Member

@lcian lcian commented Sep 8, 2025

Summary of changes

Set to pii = "true":

  • http.client_ip
  • and its replacement client.address

Left to pii: "false" or things could break:

  • id: "A unique identifier for the span."
  • profile_id
  • replay_id
  • type: "More granular type of the operation happening." e.g. "fetch"

Notable attributes changed to pii: "maybe":

  • transaction
  • release
  • environment: "The Sentry environment."

All of the remaining attributes have also been changed from PII false to maybe.
Some of these are not typed at all in Relay (which means pii: true), others are typed and have pii: false/maybe. I document the current value in Relay for some of them below.
Note that all of the pii: "true" cases are due to the fact that the attribute is not typed in Relay, explicit pii: "true" values are present only on SentryTags.

  • ai.ai__finish_reason - Relay: false
  • ai.ai__generation_id - Relay: false
  • ai.ai__metadata - Relay: false
  • ai.ai__model__provider - Relay: false
  • ai.ai__model_id - Relay: true
  • ai.ai__pipeline__name - Relay: false
  • ai.ai__response_format - Relay: true
  • ai.ai__responses - Relay: maybe
  • ai.ai__seed - Relay: false
  • ai.ai__tags - Relay: true
  • ai.ai__tools - Relay: maybe
  • app_start_type - Relay: maybe (in SentryTags)
  • browser.browser__name - Relay: maybe (typed in SentryTags)
  • browser.browser__report__type - Relay: maybe
  • browser.browser__script__invoker - Relay: maybe
  • browser.browser__script__invoker_type - Relay: maybe
  • browser.browser__version - Relay: false
  • cache.cache__operation - Relay: true
  • channel - Relay: true
  • client.client__address - Relay: false
  • code.code__function__name - Relay: maybe
  • db.db__collection__name - Relay: false
  • db.db__name - Relay: true
  • db.db__namespace - Relay: true
  • db.db__operation - Relay: false
  • db.db__operation__name - Relay: false
  • db.db__query__parameter__[key] - Relay: true
  • db.db__query__summary - Relay: true
  • db.db__query__text - Relay: true
  • db.db__redis__connection - Relay: true
  • db.db__statement - Relay: true
  • db.db__system - Relay: false
  • db.db__system__name - Relay: true
  • device.device__brand - Relay: maybe (typed in SentryTags)
  • device.device__family - Relay: maybe (SentryTags)
  • device.device__model - Relay: maybe (SentryTags)
  • error.error__type - Relay: true
  • event.event__name - Relay: true
  • exception.exception__message - Relay: true
  • exception.exception__stacktrace - Relay: true
  • exception.exception__type - Relay: true
  • faas.faas__cron - Relay: true
  • faas.faas__time - Relay: true
  • faas.faas__trigger - Relay: true
  • fs_error - Relay: true
  • gen_ai.gen_ai__agent__name
  • gen_ai.gen_ai__operation__name
  • gen_ai.gen_ai__operation__type
  • gen_ai.gen_ai__pipeline__name
  • gen_ai.gen_ai__request__available_tools
  • gen_ai.gen_ai__request__model
  • gen_ai.gen_ai__request__seed
  • gen_ai.gen_ai__response__finish_reasons
  • gen_ai.gen_ai__response__id
  • gen_ai.gen_ai__response__model
  • gen_ai.gen_ai__system
  • gen_ai.gen_ai__tool__description
  • gen_ai.gen_ai__tool__name
  • gen_ai.gen_ai__tool__type
  • graphql.graphql__operation__name
  • graphql.graphql__operation__type
  • http.http__client_ip
  • http.http__flavor
  • http.http__host
  • http.http__method
  • http.http__request__method
  • http.http__response__header__content-length
  • http.http__route
  • http.http__scheme
  • http.http__server_name
  • http.http__user_agent
  • jvm.jvm__gc__action
  • jvm.jvm__gc__name
  • jvm.jvm__memory__pool__name
  • jvm.jvm__memory__type
  • jvm.jvm__thread__state
  • lcp.lcp__element
  • lcp.lcp__id
  • lcp.lcp__url
  • logger.logger__name
  • messaging.messaging__destination__connection
  • messaging.messaging__destination__name
  • messaging.messaging__message__id
  • messaging.messaging__operation__type
  • messaging.messaging__system
  • method
  • navigation.navigation__type
  • net.net__host__ip
  • net.net__host__name
  • net.net__peer__ip
  • net.net__peer__name
  • net.net__protocol__name
  • net.net__protocol__version
  • net.net__sock__family
  • net.net__sock__host__addr
  • net.net__sock__peer__addr
  • net.net__sock__peer__name
  • net.net__transport
  • network.network__local__address
  • network.network__peer__address
  • network.network__protocol__name
  • network.network__protocol__version
  • network.network__transport
  • network.network__type
  • os.os__build_id
  • os.os__description
  • os.os__name
  • os.os__type
  • os.os__version
  • otel.otel__scope__name
  • otel.otel__scope__version
  • otel.otel__status_code
  • otel.otel__status_description
  • process.process__executable__name
  • process.process__runtime__description
  • process.process__runtime__name
  • process.process__runtime__version
  • resource.resource__render_blocking_status
  • rpc.rpc__service
  • server.server__address
  • service.service__name
  • service.service__version
  • thread.thread__name
  • ui.ui__component_name
  • url.url__domain
  • url.url__scheme
  • url.url__template
  • user_agent.user_agent__original

@lcian lcian changed the base branch from lcian/lint-pii to main September 9, 2025 09:03
@lcian lcian changed the title ref: Set PII to maybe for non sentry.* attributes ref: Set PII to maybe for most non sentry.* attributes Sep 9, 2025
@lcian lcian marked this pull request as ready for review September 9, 2025 09:16
@lcian lcian requested a review from AbhiPrasad as a code owner September 9, 2025 09:16
@lcian lcian requested a review from cleptric September 9, 2025 09:16
Copy link
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

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

One thing I noticed: http.client_ip was changed to true but its alias (and replacement) http.client.address was changed to maybe. We should probably make sure that all aliases of an attribute have the same PII value.

@lcian
Copy link
Member Author

lcian commented Sep 9, 2025

One thing I noticed: http.client_ip was changed to true but its alias (and replacement) http.client.address was changed to maybe. We should probably make sure that all aliases of an attribute have the same PII value.

Good point. I've handled this manually for now, but we should add this property to the lints.

@lcian lcian merged commit 8cc17b9 into main Sep 9, 2025
5 checks passed
@lcian lcian deleted the lcian/set-pii-to-maybe branch September 9, 2025 10:32
loewenheim added a commit to getsentry/relay that referenced this pull request Sep 9, 2025
This updates the `sentry-conventions` submodule to
8cc17b95c560aa3efa5537cb5e40a5734e34c6c8 to get access to
getsentry/sentry-conventions#127.
github-merge-queue bot pushed a commit to getsentry/relay that referenced this pull request Sep 9, 2025
This updates the `sentry-conventions` submodule from
getsentry/sentry-conventions@a57b7e3
to
[8cc17b95c560aa3efa5537cb5e40a5734e34c6c8](getsentry/sentry-conventions@8cc17b9)
to get access to
getsentry/sentry-conventions#127.

As of
getsentry/sentry-conventions@844fe66,
`deprecation.replacement` is no longer required, so we need to make the
field optional.

Fixes INGEST-542.
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.

3 participants