Skip to content

tracing: Propagate span to tags #634

Closed as not planned
Closed as not planned
@frjonsen

Description

@frjonsen

This is related to what was solved in this PR: #629

Currently all spans are propagated to context. I feel what's missing is that spans named "tags" should instead be propagated to tags in Sentry.

At a glance it should be sufficient to add a check in the arms of this match

match &span_data.sentry_span {
TransactionOrSpan::Span(span) => {
for (key, value) in span.data().iter() {
if key != "message" {
let key = format!("{}:{}", name, key);
visitor.json_values.insert(key, value.clone());
}
}
}
TransactionOrSpan::Transaction(transaction) => {
for (key, value) in transaction.data().iter() {
if key != "message" {
let key = format!("{}:{}", name, key);
visitor.json_values.insert(key, value.clone());
}
}
}
}
where if the span name is tags, then the key should be formatted as tags.{}, rather than the current {}.{}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions