An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello AlanStone
With Application Insights 3.x (OpenTelemetry‑based), you cannot override the “Operation name” the same way you did in 2.x, and there is no supported way today to arbitrarily rename it in the Azure portal. This is a known limitation of the OpenTelemetry migration, not a bug in your code.
In Application Insights 2.x, the portal’s Operation name was derived from:
-
RequestTelemetry.Name -
RequestTelemetry.Context.Operation.Name
These were mutable, so a TelemetryInitializer could rewrite them.
Application Insights 3.x is a shim on top of OpenTelemetry:
- Requests are represented as
Activity - The operation name is derived from the root
Activity -
Activity.OperationNameis read‑only by design -
Activity.DisplayNameis ignored by the Azure Monitor exporter
This is why:
-
BaseProcessor<Activity>cannot change it - Setting
DisplayNamehas no effect in the portal
This is by design, not an implementation gap.
Please have a look into below supported approach:
- Control the operation name at Activity creation time:
The only supported way to influence the operation name is when the Activity is started.
If you create your own server Activities:
private static readonly ActivitySource Source =
new("MyCompany.MyService");
using var activity = Source.StartActivity(
"OrdersController.CreateOrder",
ActivityKind.Server);
That name will appear as the operation name in Application Insights. This does not override the ASP.NET Core auto‑generated request Activity. It only works for custom server spans.
- Use route‑based naming via ASP.NET Core instrumentation
For HTTP requests, Azure Monitor derives the operation name from:
- HTTP method
- Route template (when available)
Example:
GET /api/orders/{id}
This is the only supported way to influence request operation names for ASP.NET Core.
Microsoft confirms that manual override is not supported in OTel mode.
- Add a custom dimension instead of renaming
The recommended replacement is:
- Keep the default operation name
- Add a custom tag
- Query/group by that tag in KQL
Example:
Activity.Current?.SetTag(
"app.operationAlias",
"CreateOrder");
This tag:
- Is fully supported
- Appears in
customDimensions - Can be used in queries and dashboards
With Application Insights 3.x, the SDK is built on OpenTelemetry. The “Operation name” shown in the Azure portal is derived from the root Activity and cannot be overridden after creation.
Unlike Application Insights 2.x, TelemetryInitializer is no longer available, Activity.OperationName is read‑only, and Activity.DisplayName is ignored by the Azure Monitor exporter.
At this time, overriding the operation name is not supported when using OpenTelemetry with Application Insights.
The supported alternatives are:
Control the name when starting custom Activities
Rely on ASP.NET Core route‑based naming for HTTP requests
Add a custom tag and query/group by it instead of renaming the operation
Thanks,
Suchitra.