Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Jul 3, 2023

Pre-merge checklist

If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.

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

Description of changes

Describe your changes here. If your PR relates to or resolves an issue, add a link to that too.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Extra resources

@vercel
Copy link

vercel bot commented Jul 3, 2023

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 12, 2023 11:27am


### Inject Tracing Information Into HTTP Requests

If you are sending outgoing HTTP requests with <PlatformLink to="/guides/spring/performance/instrumentation/automatic-instrumentation/">RestTemplate</PlatformLink>, [WebClient](https://docs.spring.io/spring-framework/reference/web/webflux-webclient.html), <PlatformLink to="/configuration/integrations/okhttp/">OkHttp</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo/">Apollo</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo3/">Apollo 3</PlatformLink>, <PlatformLink to="/performance/instrumentation/open-feign/">OpenFeign</PlatformLink> and have our integration for it enabled, this tracing information is automatically added to outgoing requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revisit the links, some of them return a 404. Also, we should not point the users to the performance docs for the custom instrumentation, since it would mean they have to activate performance monitoring, right? And if they have activated it anyhow, they do not need the custom instrumentation docs. Or am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Please revisit the links, some of them return a 404
Build step was also failing for links

Yeah some links are for Android. That's probably why they're not working here since this is Java. Just wanted to wait for a review before starting to copy all the stuff.

Also, we should not point the users to the performance docs for the custom instrumentation, since it would mean they have to activate performance monitoring, right?

I only wanted to point them toward the right dependency to add to their project but yeah this would be confusing. Is it OK to just add another sentence like:

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
If you are sending outgoing HTTP requests with <PlatformLink to="/guides/spring/performance/instrumentation/automatic-instrumentation/">RestTemplate</PlatformLink>, [WebClient](https://docs.spring.io/spring-framework/reference/web/webflux-webclient.html), <PlatformLink to="/configuration/integrations/okhttp/">OkHttp</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo/">Apollo</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo3/">Apollo 3</PlatformLink>, <PlatformLink to="/performance/instrumentation/open-feign/">OpenFeign</PlatformLink> and have our integration for it enabled, this tracing information is automatically added to outgoing requests.
If you are sending outgoing HTTP requests with <PlatformLink to="/guides/spring/performance/instrumentation/automatic-instrumentation/">RestTemplate</PlatformLink>, [WebClient](https://docs.spring.io/spring-framework/reference/web/webflux-webclient.html), <PlatformLink to="/configuration/integrations/okhttp/">OkHttp</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo/">Apollo</PlatformLink>, <PlatformLink to="/performance/instrumentation/apollo3/">Apollo 3</PlatformLink>, <PlatformLink to="/performance/instrumentation/open-feign/">OpenFeign</PlatformLink> and have our integration for it enabled, this tracing information is automatically added to outgoing requests. NOTE: You do not have to enable Performance for distributed tracing to work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed the links for some of them for now. For Android we have https://docs.sentry.io/platforms/android/configuration/integrations/ but for Java that's pretty much empty. Maybe instead of linking performance subpages (which don't work for all guides anyways) we should add integrations to that page for Java at some point.


Your Android application is likely going to be the first in a chain of requests which means there probably won't be any tracing information to extract but instead your application starts a new trace and sends out tracing information so other applications in the chain can keep the trace going.

## Step 1) Extract Incoming Tracing Information
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we even want to display this section for Android as it'll probably be a very niche use case to extract tracing information on Android.

Copy link
Member Author

Choose a reason for hiding this comment

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

I also added a paragraph above explaining this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@markushi @romtsn may I have your opinion on ^

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me!

@adinauer adinauer marked this pull request as ready for review July 6, 2023 06:36
@adinauer adinauer requested review from markushi and romtsn July 6, 2023 08:34
Comment on lines +3 to +4
- [Spring](/platforms/java/guides/spring/usage/distributed-tracing/#how-to-use-distributed-tracing)
- [Spring Boot](/platforms/java/guides/spring-boot/usage/distributed-tracing/#how-to-use-distributed-tracing)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these link to the framework-specific pages of this page, and those pages don't have any different information, should we make these not links?

The current experience could be a little confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

It takes users to the guide for their framework which in some places has different content. So could be a way for people to get to the more specific guide if they landed here via a link or search result.

Copy link
Contributor

Choose a reason for hiding this comment

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

These pages have some typos/grammar issues that I know were copy/pasted in from the Python version. I will correct both in a separate PR :)

Copy link
Contributor

Choose a reason for hiding this comment

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

These pages have some typos/grammar issues that I know were copy/pasted in from the Python version. I will correct both in a separate PR :)

Co-authored-by: Markus Hintersteiner <[email protected]>
@adinauer
Copy link
Member Author

Going to merge this soon. If there's any changes you'd like to see, please let me know.

@adinauer adinauer merged commit ca980c3 into master Jul 12, 2023
@adinauer adinauer deleted the feat/twp-java branch July 12, 2023 11:33
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2023
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.

5 participants