Skip to content

fix(huggingface_hub): Stop setting transaction status when a child span fails#5952

Merged
alexander-alderman-webb merged 3 commits intogetsentry:masterfrom
Zenithatic:zenithatic/huggingfacehub/stop-set-transaction-status
Apr 13, 2026
Merged

fix(huggingface_hub): Stop setting transaction status when a child span fails#5952
alexander-alderman-webb merged 3 commits intogetsentry:masterfrom
Zenithatic:zenithatic/huggingfacehub/stop-set-transaction-status

Conversation

@Zenithatic
Copy link
Copy Markdown
Contributor

Description

  • Prevent the Hugging Face AI integration from changing root HTTP transaction status when API call fails

  • Keep error visibility on the integration span so failures are still captured and observable

Issues

Reminders

@sdk-maintainer-bot sdk-maintainer-bot bot added missing-maintainer-discussion Used for automated community contribution checks. violating-contribution-guidelines Used for automated community contribution checks. labels Apr 7, 2026
@sdk-maintainer-bot
Copy link
Copy Markdown

This PR has been automatically closed. The referenced issue does not show a discussion between you and a maintainer.

To avoid wasted effort on both sides, please discuss your proposed approach in the issue first and wait for a maintainer to respond before opening a PR.

Please review our contributing guidelines for more details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (ai) Redact base64 data URLs in image_url content blocks by ericapisani in #5953
  • (integrations) Instrument pyreqwest tracing by servusdei2018 in #5682

Bug Fixes 🐛

Anthropic

  • Capture exceptions for stream() calls by alexander-alderman-webb in #5950
  • Stop setting transaction status when child span fails by alexander-alderman-webb in #5717
  • Only finish relevant spans in .create() patches by alexander-alderman-webb in #5716

Huggingface Hub

  • Stop setting transaction status when a child span fails by Zenithatic in #5952
  • Stop setting transaction status when a child span fails by Zenithatic in #5952

Pydantic Ai

  • Adapt import for new library versions by alexander-alderman-webb in #5984
  • Use first-class hooks when available by alexander-alderman-webb in #5947

Other

  • (wsgi) Respect HTTP_X_FORWARDED_PROTO in request.url construction by sl0thentr0py in #5963

Internal Changes 🔧

  • (ai) Remove gen_ai.tool.type span attribute by ericapisani in #5964
  • (anthropic) Separate sync and async .create() patches by alexander-alderman-webb in #5715
  • (openai) Split token counting by API for easier deprecation by ericapisani in #5930
  • (opentelemetry) Ignore mypy error by alexander-alderman-webb in #5927
  • 🤖 Update test matrix with new releases (04/13) by github-actions in #5983
  • Fix license metadata in setup.py by sl0thentr0py in #5934
  • Update validate-pr workflow by stephanie-anderson in #5931

Other

  • Handle None span context in the span processor and pin tokenizers version for anthropic tests on Python 3.8 by alexander-alderman-webb in #5967

🤖 This preview updates automatically when you update the PR.

@alexander-alderman-webb alexander-alderman-webb removed violating-contribution-guidelines Used for automated community contribution checks. missing-maintainer-discussion Used for automated community contribution checks. labels Apr 8, 2026
@Zenithatic Zenithatic marked this pull request as ready for review April 8, 2026 18:19
@Zenithatic Zenithatic requested a review from a team as a code owner April 8, 2026 18:19
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb left a comment

Choose a reason for hiding this comment

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

Please set the span status by passing the exception tuple to span.__exit__() instead of adding logic to _capture_exception().

Otherwise LGTM!

@Zenithatic
Copy link
Copy Markdown
Contributor Author

Changes added!

@alexander-alderman-webb alexander-alderman-webb changed the title fix(huggingface_hub): Stop setting transaction status in huggingface_hub fix(huggingface_hub): Stop setting transaction status when a child span fails Apr 13, 2026
@alexander-alderman-webb alexander-alderman-webb merged commit af3a297 into getsentry:master Apr 13, 2026
152 of 153 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.

huggingface_hub: Stop setting transaction status

2 participants