Skip to content

Commit 2f7ee16

Browse files
committed
Set ai.operation.name tag on request telemetry
1 parent 6872135 commit 2f7ee16

File tree

1 file changed

+3
-3
lines changed
  • agent/exporter/src/main/java/com/microsoft/applicationinsights/agent

1 file changed

+3
-3
lines changed

agent/exporter/src/main/java/com/microsoft/applicationinsights/agent/Exporter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ private void exportRequest(SpanData span) {
131131
String httpMethod = getString(span, "http.method");
132132
String name = span.getName();
133133
if (httpMethod != null && name.startsWith("/")) {
134-
telemetry.setName(httpMethod + " " + name);
135-
} else {
136-
telemetry.setName(span.getName());
134+
name = httpMethod + " " + name;
137135
}
136+
telemetry.setName(name);
137+
telemetry.getContext().getOperation().setName(name);
138138

139139
if (span.getName().equals("EventHubs.process")) {
140140
// TODO eventhubs should use CONSUMER instead of SERVER

0 commit comments

Comments
 (0)