Skip to content
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

Write a more complete Custom Instrumentation documentation #9952

Open
pbernery opened this issue May 2, 2024 · 7 comments
Open

Write a more complete Custom Instrumentation documentation #9952

pbernery opened this issue May 2, 2024 · 7 comments
Assignees
Labels
Platform: Ruby Pull requests that update Ruby code Team: Web Backend SDKs team-web-sdk-backend

Comments

@pbernery
Copy link

pbernery commented May 2, 2024

Problem Statement

The https://docs.sentry.io/platforms/ruby/performance/instrumentation/custom-instrumentation/ documentation explains how to track custom transactions. However, it is not complete, calling start_transaction won't be enough, it has to be attached to the current scope.

One correct way to implement custom can be found in the Sentry client code, for instance https://github.com/getsentry/sentry-ruby/blob/6cdb1fc3b1a7f2f10f2783ba27010522d9bf0af5/sentry-rails/lib/sentry/rails/action_cable.rb, where we can see a creation of a scope, then a transaction, and several other things.

I spent many hours understanding why the sample provided in the first documentation did not show up on the Sentry front. I believe the documentation needs to be more complete.

This documentation should also inform about the limit of spans, which can be found on the SDK creation documentation https://develop.sentry.dev/sdk/performance/#maxspans, but is not mentioned on the client documentation.

Solution Brainstorm

No response

Product Area

Performance

@getsantry
Copy link
Contributor

getsantry bot commented May 2, 2024

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented May 2, 2024

Routing to @getsentry/product-owners-performance for triage ⏲️

@gggritso
Copy link
Member

gggritso commented May 6, 2024

@pbernery thanks for raising this! That's frustrating, sorry about the time waster—we'll take a look at fixing the error you found, and expanding the docs

As for attaching to the current scope, are you adding instrumentation in a threaded environment?

@pbernery
Copy link
Author

pbernery commented May 6, 2024

Hey @gggritso.
No I am not, or to be correct, I was not when I implemented my first custom transaction.
Now I also have custom transaction tracked in Sidekiq jobs, but now I know how to declare these transactions, it works well.

@sl0thentr0py
Copy link
Member

sl0thentr0py commented May 8, 2024

transferring this to docs, will update the custom instrumentation sample.
regarding truncation, we'll try to have a page on the product side more transparent about the limits but ultimately these are enforced on the server and can change so it's somewhat hard to keep such lists up to date.

@getsantry
Copy link
Contributor

getsantry bot commented May 8, 2024

Assigning to @getsentry/support for routing ⏲️

@sl0thentr0py sl0thentr0py transferred this issue from getsentry/sentry May 8, 2024
@sl0thentr0py sl0thentr0py added Team: Web Backend SDKs team-web-sdk-backend Platform: Ruby Pull requests that update Ruby code and removed Waiting for: Support Product Area: Performance labels May 8, 2024
@pbernery pbernery changed the title Write a more complete Custom Instrumentation Write a more complete Custom Instrumentation documentation May 8, 2024
@pbernery
Copy link
Author

pbernery commented May 8, 2024

transferring this to docs, will update the custom instrumentation sample. regarding truncation, we'll try to have a page on the product side more transparent about the limits but ultimately these are enforced on the server and can change so it's somewhat hard to keep such lists up to date.

I understand the limitations. I proposed some things here getsentry/sentry-ruby#2307, but still that would depend on the server. Maybe the server could return a status code directly when such content is posted? And thus the client could informed the developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Ruby Pull requests that update Ruby code Team: Web Backend SDKs team-web-sdk-backend
Projects
Status: No status
Status: No status
Development

No branches or pull requests

5 participants