Skip to content

Conversation

@sfanahata
Copy link
Contributor

@sfanahata sfanahata commented Mar 25, 2025

DESCRIBE YOUR PR

Closes issue: https://linear.app/getsentry/project/tracing-improvements-python-120f4a3d71f2/overview
improve the structure of the tracing docs to match the structure we built for the JavaScript ones.

  • Add span metrics section

    • Example instrumentation

    • Sending performance metrics

  • Reformat Python tracing section to mirror JS structure

    • trace propagation -> distributed tracing, review section docs

    • Add configure sampling doc

    • Review instrumentation section

       - Add new content to the index.mdx file to make more similar to the JS file  
      
    • Add troubleshooting doc

    • Delete performance-metrics.mdx file under instrumentation (was redundant to the span-netsed doc I created)

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@vercel
Copy link

vercel bot commented Mar 25, 2025

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

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2025 10:15pm
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2025 10:15pm
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2025 10:15pm


with sentry_sdk.start_span(op="task", name="Create User"):
# Your code here
# The span will automatically end when exiting this block
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not familiar enough with Python to know, but is there a way to illustrate what closing this code block would look like?

Copy link
Contributor Author

@sfanahata sfanahata Mar 26, 2025

Choose a reason for hiding this comment

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

It looks like the with statement is used to automatically close the block, hence the comment, but I extended the block to demonstrate what it would look like within a larger set of code. LMK if that helps with what you were thinking!


## Span Starting Options

The following options can be used when creating spans:
Copy link
Contributor

Choose a reason for hiding this comment

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

Great use of a table!

@codecov
Copy link

codecov bot commented Mar 26, 2025

Bundle Report

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

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

Affected Assets, Files, and Routes:

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 868.7kB -0.0%
static/chunks/8165-*.js -3 bytes 410.1kB -0.0%
static/a1vlX9JvnOnT3-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/a1vlX9JvnOnT3-*.js (New) 578 bytes 578 bytes 100.0% 🚀
static/5VjVU8szhtAqL5oYrnjhh/_buildManifest.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/5VjVU8szhtAqL5oYrnjhh/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.75MB -0.0%
../instrumentation.js -3 bytes 1.08MB -0.0%
9523.js -3 bytes 1.05MB -0.0%
../app/[[...path]]/page.js.nft.json 356 bytes 384.62kB 0.09%
../app/platform-redirect/page.js.nft.json 356 bytes 384.53kB 0.09%
../app/sitemap.xml/route.js.nft.json 356 bytes 382.5kB 0.09%

@sfanahata sfanahata changed the title [DRAFT] ShannonA python tracing docs refresh ShannonA python tracing docs refresh Mar 26, 2025
@sfanahata sfanahata marked this pull request as ready for review March 26, 2025 22:24
@sfanahata sfanahata requested a review from codyde March 26, 2025 22:24
@sentrivana sentrivana dismissed their stale review April 4, 2025 09:39

review addressed

@vercel vercel bot temporarily deployed to Preview – changelog April 4, 2025 20:35 Inactive
Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

Looks good!

@vercel vercel bot temporarily deployed to Preview – changelog April 4, 2025 21:17 Inactive
@sfanahata sfanahata merged commit 9fccf68 into master Apr 4, 2025
13 checks passed
@sfanahata sfanahata deleted the ShannonA-python-tracing-docs-refresh branch April 4, 2025 22:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 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.

6 participants