Skip to content

Prometheus Exporer Dupplicate Tag error_type #5199

@vinh3c

Description

@vinh3c

Bug Report

  • OpenTelemetry.Exporter.Prometheus.AspNetCore 1.7.0-rc.1
  • net8.0

Symptom

=> Prometheus Pull Agent
label name "error_type" is not unique: invalid sample

image

When aspnetcore host nginx, Request has a Application Exception, after that the request connection is closed => aspnet core add more than one error tag

Reproduce

var tagsFeature = context
      .Features
      .Get<IHttpMetricsTagsFeature>();
tagsFeature.Tags.Add("error.type", "System.InvalidOperationException")
tagsFeature.Tags.Add("error.type", "MysqlConnector.MySqlException")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmetricsMetrics signal relatedpkg:OpenTelemetry.Exporter.Prometheus.AspNetCoreIssues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions