FEAT: added user_email to pipelines for filtering - #64
Merged
michelle-hadfield-nava merged 11 commits intoOct 30, 2025
Merged
Conversation
…at we can filter our traces
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds user attribution to pipeline tracing by incorporating user identity into OpenTelemetry spans. The changes enable tracking which users are making requests to the AI pipelines for observability purposes.
- Adds
user_nameanduser_emailparameters to pipeline run_api methods - Implements OpenTelemetry span attributes using
using_attributescontext manager - Uses a special delimiter
%^&to prevent MS Presidio from redacting the combined user identifier
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/src/pipelines/generate_referrals/pipeline_wrapper.py | Adds user parameters and wraps pipeline execution with OpenTelemetry attributes for user tracking |
| app/src/pipelines/generate_action_plan/pipeline_wrapper.py | Adds user parameters and wraps pipeline execution with OpenTelemetry attributes for user tracking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lan_to_expect_user_info # Conflicts: # app/src/pipelines/generate_referrals/pipeline_wrapper.py
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lan_to_expect_user_info # Conflicts: # app/src/pipelines/generate_action_plan/pipeline_wrapper.py
… within PII filtering
…lan_to_expect_user_info
yoomlam
approved these changes
Oct 30, 2025
yoomlam
left a comment
Collaborator
There was a problem hiding this comment.
Left some refactoring suggestions
Co-authored-by: Yoom Lam <yoom@navapbc.com>
Co-authored-by: Yoom Lam <yoom@navapbc.com>
…ion and simplified including user_id
michelle-hadfield-nava
deleted the
mHadfield/1262_update_referrals_and_action_plan_to_expect_user_info
branch
October 30, 2025 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
https://navalabs.atlassian.net/browse/DST-1262
Changes
added the user_email as an attribute to be used for filtering in Phoenix Arize
Context for reviewers
I asked how we want to handle/ work around MS Presidio redaction preventing searching by name or email directly
Discussion here: https://nava.slack.com/archives/C06ETE82UHM/p1761682345787459
Testing
include the user_email in your requests in Hayhooks
go to Phoenix Arize and search for your API call like this
user.id == "user_email"Preview environment for frontend
♻️ Environment destroyed ♻️
Preview environment for app
♻️ Environment destroyed ♻️