Skip to content

Fix include_content not working as expected #2206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

adtyavrdhn
Copy link
Contributor

@adtyavrdhn adtyavrdhn commented Jul 15, 2025

Fixes #1571

Fixes include_content = False not working as expected for instructions and final_result

)
if not instrumentation_settings or instrumentation_settings.include_content:
run_span.set_attribute(
'final_result',
Copy link
Contributor Author

@adtyavrdhn adtyavrdhn Jul 15, 2025

Choose a reason for hiding this comment

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

I think this should also be removed if the flag is set to False, let me know if you think otherwise

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed

Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't make sense to do this when not instrumentation_settings

Copy link
Contributor Author

@adtyavrdhn adtyavrdhn Jul 21, 2025

Choose a reason for hiding this comment

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

Yep, I've updated it.

@adtyavrdhn adtyavrdhn marked this pull request as ready for review July 15, 2025 14:47
@adtyavrdhn adtyavrdhn marked this pull request as draft July 15, 2025 14:50
@adtyavrdhn
Copy link
Contributor Author

@alexmojaki

Sorry about the missed parts, I think this covers everything now. Please take a look

@adtyavrdhn adtyavrdhn marked this pull request as ready for review July 15, 2025 14:56
@alexmojaki
Copy link
Contributor

Please rename the PR for the changelog

@adtyavrdhn adtyavrdhn changed the title either instrumentation setting include_content is set to False or it … Fix include_conent not working as expected Jul 15, 2025
@adtyavrdhn adtyavrdhn changed the title Fix include_conent not working as expected Fix include_content not working as expected Jul 15, 2025
@adtyavrdhn adtyavrdhn requested a review from alexmojaki July 21, 2025 13:03
@alexmojaki
Copy link
Contributor

Thanks!

@alexmojaki alexmojaki enabled auto-merge (squash) July 21, 2025 14:23
@alexmojaki alexmojaki merged commit 9ca4bca into pydantic:main Jul 21, 2025
16 checks passed
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.

Add a setting to remove prompts and completions from tracing
3 participants