getsentry / sentry-rust

Official Sentry SDK for Rust
https://sentry.io/
Apache License 2.0
620 stars 153 forks source link

sentry-tracing: Fields prefixed with tags. are not sent as tags within spans #653

Closed DoumanAsh closed 3 weeks ago

DoumanAsh commented 7 months ago

Environment

What version are you running? Etc.

0.32.2

Steps to Reproduce

  1. Create tracing span:
tracing::span!(
    tracing::level::INFO
    "request",
    tags.http.url = field::Empty,
    tags.protocol = field::Empty,
    tags.request_id = field::Empty,
    user_agent = field::Empty,
    tags.http.method = field::Empty,
    tags.http.status_code = field::Empty,
)
  1. For the duration of requests, these fields will be filled with data
  2. Unfortunately when I open sentry to see event, it shows no tags and instead all fields are sent as Additional Data

I see in code how it checks for tags presence https://github.com/getsentry/sentry-rust/blob/1df2e4ca3cc678695bc47e90489c3f83847b9abb/sentry-tracing/src/converters.rs#L155-L179

But it seems not to be applied to transactions?

Expected Result

See tags in sentry

Actual Result

Fields are sent as additional data