Skip to content

Conversation

@matthgt
Copy link

@matthgt matthgt commented Nov 21, 2025

Description

LLMObs allows users to register a processor for LLMObsSpan in order to redact sensitive information being sent to datadog. However, if you wish to store this sensitive information and allow it to be linked from datadog there is no readily available way to do that. URLs in the input/output get redacted by sensitive data scanner (as we want them to) and they probably don't belong there anyway.

This change allows the registered processor to optionally add metadata to the LLMObsSpan. When they do, it is merged into the span's metadata. This eventually is shown in the datadog UI for LLMObs:

Screenshot 2025-11-21 at 10 40 18 AM

Testing

I've added tests to test_llmobs.py and tested the changes locally with our codebase.

Risks

clashing metadata keys with existing/expected ddtrace metadata?

Additional Notes

None

@matthgt matthgt force-pushed the mr/llmobs-allow-user-set-metadata branch 2 times, most recently from 2d68aa9 to b863e9c Compare November 21, 2025 20:10
@matthgt matthgt marked this pull request as ready for review November 21, 2025 20:10
@matthgt matthgt requested review from a team as code owners November 21, 2025 20:10
@matthgt matthgt force-pushed the mr/llmobs-allow-user-set-metadata branch from b863e9c to 05b2ea8 Compare November 21, 2025 20:11
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.

1 participant