Skip to content

Conversation

srothh
Copy link
Member

@srothh srothh commented Jul 15, 2025

Examples for metric spans in the Python SDK set data for spans using a dictionary, which does not work when tested locally. Change this to set the span_data indivually instead.

Fixes GH-14359

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

EXTRA RESOURCES

…idually rather than using a dict

Examples for metric spans in the Python SDK set data for spans using a dictionary, which does not actually work. Change this to set
the span_data indivually instead.

Fixes GH-14359
@srothh srothh requested a review from a team July 15, 2025 09:26
Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 9:55am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 15, 2025 9:55am

Copy link

codecov bot commented Jul 15, 2025

Bundle Report

Changes will increase total bundle size by 1.35kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.83MB -6 bytes (-0.0%) ⬇️
sentry-docs-server-cjs 11.92MB 1.36kB (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.67MB -0.0%
../instrumentation.js -3 bytes 996.78kB -0.0%
9523.js -3 bytes 972.72kB -0.0%
../app/[[...path]]/page.js.nft.json 455 bytes 705.9kB 0.06%
../app/platform-redirect/page.js.nft.json 455 bytes 705.82kB 0.06%
../app/sitemap.xml/route.js.nft.json 455 bytes 703.79kB 0.06%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 879.57kB -0.0%
static/chunks/1831-*.js -3 bytes 422.11kB -0.0%
static/tGHmfxEP-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/tGHmfxEP-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/Ap7M7O8Gdl4nOH5dq67Hv/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/Ap7M7O8Gdl4nOH5dq67Hv/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

See one typo before merging, otherwise looks good. Thanks for fixing!

})
span.set_data("memory.heap_used", 1024000)
span.set_data("queue.length", 15)
span.set_data("processing.duration_ms", 127s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
span.set_data("processing.duration_ms", 127s)
span.set_data("processing.duration_ms", 127)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that, fixed it!

@srothh srothh merged commit d6420e1 into master Jul 15, 2025
13 checks passed
@srothh srothh deleted the srothh/fix-span-metrics-examples branch July 15, 2025 10:05
lucas-zimerman pushed a commit that referenced this pull request Jul 29, 2025
#14360)

Examples for metric spans in the Python SDK set data for spans using a
dictionary, which does not work when tested locally. Change this to set
the span_data indivually instead.

Fixes GH-14359


## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracing metrics examples try to set span data using dicts
2 participants