Skip to content

Commit ed85896

Browse files
committed
session-id
1 parent 9a47e2c commit ed85896

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

.github/workflows/build-common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
env:
1111
# set this to <repo>:<branch/sha> to build and test with an unreleased
1212
# version of the azure-monitor-opentelemetry-autoconfigure dependency
13-
AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT: trask/azure-sdk-for-java:user-and-session-id
13+
AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT: trask/azure-sdk-for-java:session-id
1414

1515
jobs:
1616
spotless:

smoke-tests/apps/OpenTelemetryApiSupport/src/main/java/com/microsoft/applicationinsights/smoketestapp/TestController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public String testApi() {
2121
Span.current().setAttribute("myattr2", "myvalue2");
2222
Span.current().setAttribute("enduser.id", "myuser");
2323
Span.current().setAttribute("enduser.pseudo.id", "mypseudo");
24+
Span.current().setAttribute("session.id", "mysession");
2425
Span.current().updateName("myspanname");
2526
return "OK!";
2627
}

smoke-tests/apps/OpenTelemetryApiSupport/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/OpenTelemetryApiSupportControllerSpansEnabledTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void testApi() throws Exception {
5656
.hasEntrySatisfying("ai.internal.sdkVersion", v -> assertThat(v).startsWith("java:3."));
5757
assertThat(telemetry.rddEnvelope1.getTags()).containsEntry("ai.user.authUserId", "myuser");
5858
assertThat(telemetry.rddEnvelope1.getTags()).containsEntry("ai.user.id", "mypseudo");
59+
assertThat(telemetry.rddEnvelope1.getTags()).containsEntry("ai.session.id", "mysession");
5960

6061
SmokeTestExtension.assertParentChild(
6162
telemetry.rd,

smoke-tests/apps/OpenTelemetryApiSupport/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/OpenTelemetryApiSupportTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void testApi() throws Exception {
5252
.hasEntrySatisfying("ai.internal.sdkVersion", v -> assertThat(v).startsWith("java:3."));
5353
assertThat(telemetry.rdEnvelope.getTags()).containsEntry("ai.user.authUserId", "myuser");
5454
assertThat(telemetry.rdEnvelope.getTags()).containsEntry("ai.user.id", "mypseudo");
55+
assertThat(telemetry.rdEnvelope.getTags()).containsEntry("ai.session.id", "mysession");
5556
}
5657

5758
@Test

0 commit comments

Comments
 (0)