Skip to content

Improve bindToScope docs for Java#12263

Merged
adinauer merged 2 commits intofeat/java-v8-changesfrom
feat/improve-java-bind-to-scope-docs
Jan 8, 2025
Merged

Improve bindToScope docs for Java#12263
adinauer merged 2 commits intofeat/java-v8-changesfrom
feat/improve-java-bind-to-scope-docs

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Jan 7, 2025

Improve bindToScope docs for Java as some customers were confused by missing spans due to the transaction not being bound to the scope.

Closes getsentry/sentry-java#3760

DESCRIBE YOUR PR

Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.

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+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

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

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 Jan 7, 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 Jan 8, 2025 4:49am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 4:49am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 4:49am

@codecov
Copy link

codecov bot commented Jan 7, 2025

Bundle Report

Changes will decrease total bundle size by 255.65kB (-1.26%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.36MB 255.65kB (-2.41%) ⬇️


Our SDK can bind a transaction to the scope making it accessible to every method running within this scope by calling `Sentry#startTransaction` method with `bindToScope` parameter to `true`.

Our auto instrumentation, for example those instrumenting database requests or HTTP calls, require a transaction to be bound to the current scope in order to attach a new child span.
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC in order to attach messages/exceptions/breadcrumbs we also need to have the transaction on the scope, correct? In that case, should we mention that also?

Copy link
Member Author

Choose a reason for hiding this comment

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

Most confusion (customers opening issues / asking questions) seems to come from missing spans at the moment. If this comes up again we can add it, but it probably shouldn't be in Performance docs but somewhere else.

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! Thanks for the clarification 🫡

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
@adinauer adinauer merged commit 079671e into feat/java-v8-changes Jan 8, 2025
2 checks passed
@adinauer adinauer deleted the feat/improve-java-bind-to-scope-docs branch January 8, 2025 04:43
adinauer added a commit that referenced this pull request Jan 21, 2025
* Update Java SDK v8 deprecation removals (#11820)

* Update Java SDK v8 deprecation removals

* Update docs/platforms/android/configuration/options.mdx

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Add documentation on how to check-in to an environment with CheckInUtils (#11826)

* Remove `enableTracing` option from Java SDK as it has been removed in v8 (#11575)

* Update OpenTelemetry docs for Java v8 (#12209)

* Update OTel docs for Java v8

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Document `forceInit` for Java SDK (#12260)

* document forceInit option

* Apply suggestions from code review

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Improve `bindToScope` docs for Java (#12263)

* Improve bindToScope docs

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Docs for `sentry-graphql-22` (#12259)

* Duplicate docs for graphql-java v22

* link between graphql docs versions

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Update platform docs for v8 and use OpenTelemetry (#12232)

* Update OTel docs for Java v8

* Change platform docs for v8 and use OTel

* move includes to index file

* CR changes

* [getsentry/action-github-commit] Auto commit

* close ConfigKey tag

* replace link

* fix link

* Update Android SDK "Using Sentry within an SDK" section for Java SDK v8 (#12325)

* Update Using Sentry within an SDK for v8

* Update docs/platforms/android/configuration/shared-environments.mdx

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Add documentation on setting SpanKind and capture HttpHeaders with OTEL (#12328)

* wip add docs for capturing http headers as well as manual instrumentation using opentelemetry

* Update docs/platforms/java/common/tracing/instrumentation/opentelemetry.mdx

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>

---------

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>

* Replace `Hub` docs with `Scopes` (#12377)

* Replace hub docs with scopes docs

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Apply suggestions from code review

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Update docs/platforms/android/enriching-events/scopes/index.mdx

* duplicate java into android

* Update docs/platforms/android/enriching-events/scopes/index.mdx

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>
Co-authored-by: Max Hovens <14804474+maxhov@users.noreply.github.com>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
adinauer added a commit that referenced this pull request Jan 22, 2025
* Update Java SDK v8 deprecation removals (#11820)

* Update Java SDK v8 deprecation removals

* Update docs/platforms/android/configuration/options.mdx

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Add documentation on how to check-in to an environment with CheckInUtils (#11826)

* Remove `enableTracing` option from Java SDK as it has been removed in v8 (#11575)

* Update OpenTelemetry docs for Java v8 (#12209)

* Update OTel docs for Java v8

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Document `forceInit` for Java SDK (#12260)

* document forceInit option

* Apply suggestions from code review

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Improve `bindToScope` docs for Java (#12263)

* Improve bindToScope docs

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Docs for `sentry-graphql-22` (#12259)

* Duplicate docs for graphql-java v22

* link between graphql docs versions

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

* Update platform docs for v8 and use OpenTelemetry (#12232)

* Update OTel docs for Java v8

* Change platform docs for v8 and use OTel

* move includes to index file

* CR changes

* [getsentry/action-github-commit] Auto commit

* close ConfigKey tag

* replace link

* fix link

* Update Android SDK "Using Sentry within an SDK" section for Java SDK v8 (#12325)

* Update Using Sentry within an SDK for v8

* Update docs/platforms/android/configuration/shared-environments.mdx

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Add documentation on setting SpanKind and capture HttpHeaders with OTEL (#12328)

* wip add docs for capturing http headers as well as manual instrumentation using opentelemetry

* Update docs/platforms/java/common/tracing/instrumentation/opentelemetry.mdx

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>

---------

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>

* Replace `Hub` docs with `Scopes` (#12377)

* Replace hub docs with scopes docs

* Apply suggestions from code review

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Apply suggestions from code review

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Update docs/platforms/android/enriching-events/scopes/index.mdx

* duplicate java into android

* Update docs/platforms/android/enriching-events/scopes/index.mdx

---------

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>

* Restore Hub docs as versioned docs for v7 and prior

---------

Co-authored-by: Lukas Bloder <lukas.bloder@gmail.com>
Co-authored-by: Max Hovens <14804474+maxhov@users.noreply.github.com>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 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.

3 participants