- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.6k
          feat(performance): Add tracesSampleRate and tracesSampler to JS docs
          #2376
        
          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
Conversation
| This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sentry/sentry-docs/5jpx3er1z/sentry.dev | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of edits, but primarily due to change around our language for lowering the rate in production ( which I'm very glad you captured all.of.them in this PR - makes the language update easier and more consistent.
I think the primary Performance Monitoring page here might be better if it was a primary page, with subpages of capturing xns manually and automatically. Also, that page is titled "Enabling Tracing" in the sidebar, but the file still includes the name "Performance Monitoring". I am uncertain that using the title "Enabling Tracing" is better than the current name, since we refer to the tracing package as enabling Performance Monitoring.
Thank you for all this work.
        
          
                src/includes/performance/default-sampling-context/javascript.mdx
              
                Outdated
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aspects related to tracesSampleRate and tracesSampler LGTM. Thanks @lobsterkatie! And thanks for all the accompanying grammar fixes and restructuring.
ec1a1fb    to
    b5c826c      
    Compare
  
    …ocs (#2376) Also a bunch of reorganization, and reworking of some (but not all) of the JS performance docs.
…ocs (#2376) Also a bunch of reorganization, and reworking of some (but not all) of the JS performance docs.
This PR adds docs for the
tracesSampleRateand newtracesSampleroption in the@sentry/browserfamily of SDKs.In order to do this in a way that made sense, and in order not to create an enormously long page, some of the surrounding material needed to be reorganized and/or rewritten slightly. At a high level:
The
tracesSampleRateandtracesSampleroptions were added to the common config options page. For the moment, I only listed "javascript" and "node" as supported platforms, even though support will be coming soon to both PHP and Python.The Performance Monitoring index page was split into 4:
The config page on filtering had material added about filtering transactions
In everything I did, I tried to do it in such a way that it could apply to both
@sentry/browserand@sentry/node, using platform includes where the material would have differed for each. For the moment, until we figure out the node/browser JS platorm inheritance problem*, once everything is good to go I'll just copy the browser material to the node platform (in a separate PR).*Specifically, that "javascript" (actually browser) and node are separate platforms, but really need to inherit most of their material from a common parent (but one that will never be common to any other platform, making the
commonfolder not a great place for such stuff). A question for another day, however.Because of limited time resources, I didn't do a full audit/edit/wordsmithing job on the pages I worked on, though I think at some point they could benefit from it. Instead, I tried to touch or not touch discrete sections, in hopes that it might be somewhat easier to do that full pass later (whether it's me or someone else who does it). Specifically:
Performance Monitoring index page
BrowserTracingintegration to the automatic capturing pagesentry-traceheaderAutomatic Capturing page
Manual Capturing page
Sampling page
performance/default-sampling-contextandperformance/custom-sampling-context, along with the requisite snippets for bothjavascript(browser) andnodeFiltering config page
javascript(browser) andnode, for the moment links straight to browser performance sampling docs (since node docs don't exist yet)The only other thing that happened here (other than sporadic language tweaks) is that everywhere we include
tracesSampleRatein a code snippet, with the commentBe sure to lower this in production, I added a mention of thetracesSampleroption.P.S. I tried to keep the commits pretty atomic, since I know there's a lot here.