Skip to content

Recognize "http.request.method" and "http.response.status_code" span attributes in dashboard #11684

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

OpenTelemetry semantic conventions v1.21.0 renamed the http.method attribute to http.request.method, and http.status_code to http.response.status_code. The .NET Aspire dashboard however recognizes only the old names http.method and http.status_code. Now when my service publishes telemetry using the current names http.request.method and http.response.status_code, the .NET Aspire dashboard does not understand that the span is for an HTTP client request, and does not show "HTTP" and the HTTP status code in the friendly summary.

Describe the solution you'd like

Recognize the http.request.method name in addition to http.method.

When a span has the http.request.method attribute, recognize the http.response.status_code name rather than http.status_code.

Additional context

.NET Aspire dashboard code that recognizes only the old names http.method and http.status_code:

if (!string.IsNullOrEmpty(OtlpHelpers.GetValue(span.Attributes, "http.method")))
{
var httpMethod = OtlpHelpers.GetValue(span.Attributes, "http.method");
var statusCode = OtlpHelpers.GetValue(span.Attributes, "http.status_code");
return $"HTTP {httpMethod?.ToUpperInvariant()} {statusCode}";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions