Skip to content

Commit 529297e

Browse files
authored
Add mapping for session.id (#46535)
1 parent dfca76f commit 529297e

File tree

1 file changed

+4
-0
lines changed
  • sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation

1 file changed

+4
-0
lines changed

sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/SpanDataMapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,10 @@ static void applyCommonTags(MappingsBuilder mappingsBuilder) {
896896
if (value instanceof String) {
897897
telemetryBuilder.addTag(ContextTagKeys.AI_USER_ID.toString(), (String) value);
898898
}
899+
}).exact(SemanticAttributes.SESSION_ID.getKey(), (telemetryBuilder, value) -> {
900+
if (value instanceof String) {
901+
telemetryBuilder.addTag(ContextTagKeys.AI_SESSION_ID.toString(), (String) value);
902+
}
899903
}).exact(AiSemanticAttributes.PREVIEW_APPLICATION_VERSION.getKey(), (telemetryBuilder, value) -> {
900904
if (value instanceof String) {
901905
telemetryBuilder.addTag(ContextTagKeys.AI_APPLICATION_VER.toString(), (String) value);

0 commit comments

Comments
 (0)