Skip to content

Conversation

@PROFeNoM
Copy link
Contributor

@PROFeNoM PROFeNoM commented Dec 15, 2025

Motivation

Validate that tracers correctly emit prompt tracking tags for dd-go metric tagging.

Related PRs

Changes

Updates prompt tracking test assertions to validate new event tags instead of internal _dd fields:

  • Asserts prompt_tracking_instrumentation_method:auto tag for auto-instrumented prompts
  • Asserts prompt_multimodal:true tag for OpenAI prompts with image/file inputs

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

tests/integration_frameworks/llm/openai/test_openai_llmobs.py           @DataDog/ml-observability
tests/integration_frameworks/llm/utils.py                               @DataDog/ml-observability

- Assert prompt_tracking_source:auto tag instead of _dd.prompt_tracking_auto
- Add prompt_multimodal=True for multimodal input tests
- Update assert_prompt_tracking helper with keyword-only params
@PROFeNoM PROFeNoM force-pushed the alex/MLOB-4895_prompt-tracking-auto-marker branch from fc0a7ba to e3173c7 Compare December 15, 2025 11:11
…umentation_method in assertions

- Update assert_prompt_tracking helper to reflect new parameter name
- Adjust assertions to use the renamed tag for consistency
PROFeNoM added a commit to DataDog/dd-trace-py that referenced this pull request Dec 23, 2025
## Description

Adds prompt tracking telemetry tags for OpenAI integration:
- Adds `prompt_tracking_instrumentation_method:auto` tag for
auto-instrumented prompts (OpenAI, LangChain)
- Adds `prompt_tracking_instrumentation_method:annotated` tag for
annotated prompts (manual)
- Adds `prompt_multimodal:true` tag for OpenAI prompts containing
image/file inputs

### Motivation

Enable dd-go to emit statsd metrics tagged by prompt tracking source and
multimodal content for internal dashboard analytics.

## Testing

- Updated unit tests for OpenAI and LangChain integrations
- All existing tests pass with new tag assertions
- System tests

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->
🤷 

## Related PRs

- dd-trace-js: DataDog/dd-trace-js#7106
- dd-source: DataDog/dd-source#323345
- system-tests: DataDog/system-tests#5876
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.

2 participants