Skip to content

Sentry span.description requires setting "message" field #879

@georgeboot

Description

@georgeboot

This issue (strongly) relates to #880

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

0.42.0

Steps to reproduce

As a Rust developer, I expect to be able to do something like:

let span = tracing::info_span!(
    "http.client",
    description = "GET https://google.com",
);
my_future.instrument(span).await;

Expected result

A span should created in sentry with these fields:

{
  "op": "http.client",
  "description": "GET https://google.com"
}

Actual result

A span is created in sentry with these fields:

{
  "op": "http.client",
  "description": "my_module::path::http.client", // this is unexpected!
  "data": {
    "description": "GET https://google.com"
  }
}

After checking the source code ourselves, we found that a field called message is checked (but only on span creation, see #880). When we set that, the description field in sentry is correctly set.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingRustSDK

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions