Skip to content

feat(tracing): Gate create_span gen_ai attributes via data_collection - #7295

Open
ericapisani wants to merge 1 commit into
masterfrom
py-2749-update-create-span-helper-helper-methods
Open

feat(tracing): Gate create_span gen_ai attributes via data_collection#7295
ericapisani wants to merge 1 commit into
masterfrom
py-2749-update-create-span-helper-helper-methods

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Route input/output attribute collection for AI_AGENT, AI_CHAT, and AI_TOOL span templates through the data_collection.gen_ai option when enabled, falling back to send_default_pii otherwise. Prompts recorded via prompt/system_prompt kwargs stay ungated when data_collection is not configured, preserving pre-existing behavior.

Fixes PY-2749
Fixes #7293

Route input/output attribute collection for AI_AGENT, AI_CHAT, and
AI_TOOL span templates through the `data_collection.gen_ai` option
when enabled, falling back to `send_default_pii` otherwise. Prompts
recorded via `prompt`/`system_prompt` kwargs stay ungated when
`data_collection` is not configured, preserving pre-existing behavior.

Fixes PY-2749
Fixes #7293
@ericapisani
ericapisani requested a review from a team as a code owner August 28, 2026 18:52
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

PY-2749

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

119180 passed | ⏭️ 6762 skipped | Total: 125942 | Pass Rate: 94.63% | Execution Time: 423m 57s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +120
Passed Tests 📈 +120
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2493 uncovered lines.
❌ Project coverage is 90.27%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    90.30%    90.27%    -0.03%
==========================================
  Files          193       193         —
  Lines        25601     25611       +10
  Branches      9436      9440        +4
==========================================
+ Hits         23116     23118        +2
- Misses        2485      2493        +8
- Partials      1435      1435         —

Generated by Codecov Action

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.

Update underlying helper methods for create_span_decorator in tracing_utils.py to respect data collection settings

1 participant