1

Right now, Application Insights shows the Operation Name including the casing, so if clients use different casing, I end up with multiple entries, like so:

POST /api/v1/myapi
POST /api/v1/myApi // Capital "A" in Api

I want all of them to appear under the lowercase Operation Name.

My app is a REST dotnet core 3.1 Api without Mvc.

I tried adding services.AddRouting(options => options.LowercaseUrls = true);, but this changed nothing.

David Gourde
  • 3,709
  • 2
  • 31
  • 65

1 Answers1

2

One way is to use ITelemetryInitializer and lowercase Operation Name there.

ZakiMa
  • 5,637
  • 1
  • 24
  • 48