Skip to content

Make sure user data is set on all spans #6201

@sentrivana

Description

@sentrivana

Check that we set user.* attrs https://develop.sentry.dev/sdk/telemetry/spans/span-protocol/#common-attribute-keys on all spans if user info is available.

Should be checked in all integrations that can set user data (e.g. web frameworks). We should verify whether setting the user on scope actually materializes that data onto spans. (It should, see https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/scope.py#L1729-L1746)

Also, note that user.ip_address is usually handled differently from the rest of the user attributes as it can be known even without the user being logged in.

  • Django (+ Django ASGI)
  • Flask (in progress, see PY-2528)
  • Starlette
  • Litestar
  • Starlite
  • Tornado
  • Pyramid
  • Quart
  • WSGI

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions