-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the DataDog primary operation name #137
Comments
What you may want to consider is setting |
Want to have a minimal example to test usecase. Relates #1337
I do actually already set the TraceLayer::new_for_http()
.make_span_with(|request: &Request<_>| {
let route = request
.extensions()
.get::<MatchedPath>()
.map(MatchedPath::as_str);
info_span!(
"http_request",
"http.method" = ?request.method(),
"http.route" = route,
"http.status_code" = Empty,
"http.version" = ?request.version(),
"otel.kind" = "server",
"headers" = ?request.headers(),
)
} I do not have a minimal working example as this is not code I can share in full, but if it helps it'd be relatively easy to extract the main parts, please let me know if there is anything in specific you'd want me to share. Thanks. |
I have a set of spans that I can use to monitor my HTTP services in DataDog, and I make use of a OTLP pipeline
I use
axum
as web server and add aTraceLayer
to create a new span every time I get a request. I can then see the trace and related spans in DataDog that are shown as followI couldn't find a way to change/update what I think is the primary operation of the services, that is displayed for each span as
opentelemetry_otlp.<kind>
, making the whole thing quite noisy, to the point where short span names are not displayed because the primary operation name takes all the space available.I was able to set the
kind
by setting the span attributeotel.kind
when this is created, for example:Is there a way to change what is shown in DataDog as
opentelemetry_otlp
(that seems to be theotel.library.name
)?The text was updated successfully, but these errors were encountered: