Skip to content

FEAT: added user_email to pipelines for filtering - #64

Merged
michelle-hadfield-nava merged 11 commits into
mainfrom
mHadfield/1262_update_referrals_and_action_plan_to_expect_user_info
Oct 30, 2025
Merged

FEAT: added user_email to pipelines for filtering#64
michelle-hadfield-nava merged 11 commits into
mainfrom
mHadfield/1262_update_referrals_and_action_plan_to_expect_user_info

Conversation

@michelle-hadfield-nava

@michelle-hadfield-nava michelle-hadfield-nava commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

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 ♻️

Copilot AI review requested due to automatic review settings October 28, 2025 20:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_name and user_email parameters to pipeline run_api methods
  • Implements OpenTelemetry span attributes using using_attributes context 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.

Comment thread app/src/pipelines/generate_referrals/pipeline_wrapper.py Outdated
Comment thread app/src/pipelines/generate_action_plan/pipeline_wrapper.py Outdated
Comment thread app/src/pipelines/generate_referrals/pipeline_wrapper.py Outdated
…lan_to_expect_user_info

# Conflicts:
#	app/src/pipelines/generate_referrals/pipeline_wrapper.py
@michelle-hadfield-nava michelle-hadfield-nava changed the title FEAT: added user_name and user_email to pipelines for filtering FEAT: added user_email to pipelines for filtering Oct 29, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread app/src/pipelines/generate_referrals/pipeline_wrapper.py Outdated
Comment thread app/src/pipelines/generate_action_plan/pipeline_wrapper.py Outdated
Comment thread app/src/logging/presidio_pii_filter.py Outdated
Comment thread app/src/logging/presidio_pii_filter.py Outdated

@yoomlam yoomlam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some refactoring suggestions

Comment thread app/src/pipelines/generate_referrals/pipeline_wrapper.py Outdated
Comment thread app/src/pipelines/generate_action_plan/pipeline_wrapper.py Outdated
Comment thread app/src/logging/presidio_pii_filter.py Outdated
@michelle-hadfield-nava
michelle-hadfield-nava merged commit 157e3af into main Oct 30, 2025
13 of 14 checks passed
@michelle-hadfield-nava
michelle-hadfield-nava deleted the mHadfield/1262_update_referrals_and_action_plan_to_expect_user_info branch October 30, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants