Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

### Features Added

- Added mapping for `enduser.pseudo.id` attribute to `user_AuthenticatedId` ([#46506](https://github.com/Azure/azure-sdk-for-java/pull/46506)

### Breaking Changes

- Updated mapping for `enduser.id` attribute from `user_Id` to `user_AuthenticatedId` ([#46506](https://github.com/Azure/azure-sdk-for-java/pull/46506)

### Bugs Fixed

### Other Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public final class SemanticAttributes {
*/
public static final AttributeKey<String> ENDUSER_ID = stringKey("enduser.id");

public static final AttributeKey<String> ENDUSER_PSEUDO_ID = stringKey("enduser.pseudo.id");

/**
* Actual/assumed role the client is making the request under extracted from token or application
* security context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,10 @@ private static void addLinks(AbstractTelemetryBuilder telemetryBuilder, List<Lin

static void applyCommonTags(MappingsBuilder mappingsBuilder) {
mappingsBuilder.exact(SemanticAttributes.ENDUSER_ID.getKey(), (telemetryBuilder, value) -> {
if (value instanceof String) {
telemetryBuilder.addTag(ContextTagKeys.AI_USER_AUTH_USER_ID.toString(), (String) value);
}
}).exact(SemanticAttributes.ENDUSER_PSEUDO_ID.getKey(), (telemetryBuilder, value) -> {
if (value instanceof String) {
telemetryBuilder.addTag(ContextTagKeys.AI_USER_ID.toString(), (String) value);
}
Expand Down