Open CrazyBaran opened 2 months ago
Hi @CrazyBaran thank you for filing this issue. We plan to address this inconsistency soon and will link to this issue once the appropriate PR is up.
@JacksonWeber My main problem was that ai.user.id is not showing up in application insights. This inconsistency is some minor issue.
@CrazyBaran Ah, I see. Yes, this issue will be resolved by #28965 as it provides support for the User Id property.
@CrazyBaran Please let me know if the above PR resolved the issue for you, and let me know if you have any other issues!
Hi @CrazyBaran. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hi @CrazyBaran, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
@JacksonWeber Hey, right now it is working like expected. User showing in App Insight. Still in my opinion should be other semantic key (SEMATTRS_ENDUSER_ID), but this is small thing.
Describe the bug I setup in span atributes:
span.attributes[SEMATTRS_ENDUSER_ID] = 'test';
, but on Application Insights I gotenduser.id
in Custom Properties not in Request Properties as User ID as it is on browser with application insight SDK. In my opinion this code line should do that, but it didnt work: https://github.com/Azure/azure-sdk-for-js/blob/8d1d94acaea0ea6559a82a956d7c4fe95c0a7f86/sdk/monitor/monitor-opentelemetry-exporter/src/utils/spanUtils.ts#L64 Maybe it is related to https://github.com/Azure/azure-sdk-for-js/pull/28965 ?Expected behavior When using
SEMATTRS_ENDUSER_ID
value should go to Request, Internal, etc properties as User Id, not to Custom Properties asenduser.id
Additionally in my opinion it should show up as Authenticated User Id as description ofSEMATTRS_ENDUSER_ID
say: "Username or client_id extracted from the access token or Authorization header in the inbound request from outside the system."Screenshots Code: As is from OpenTelemetry from nodejs backend: As is from Angular SPA from browser with use of ApplicationInsights JS SDK:
Additional Context In docs it is also mention this way. Docs are little outdated as SemanticAttributes are deprecated to consts. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=nodejs#set-the-user-id-or-authenticated-user-id