sentry-docs
sentry-docs copied to clipboard
Add details on span.op and span.description
Core or SDK?
Core Sentry product
Which part? Which one?
https://docs.sentry.io/product/sentry-basics/tracing/event-detail/
Description
There are details on span.set_tag
and span.set_data
. I expect details on span.op
and span.description
.
Suggested Solution
Provide details on ways to overwrite automatic instrumentation of op and description values with span.op and span.description. E.g. span.op = "fancy.operation"
; and span.description = "my new description"
;
@sdzhong - what SDK is this? Can you please update the description to reflect that? Also, you're always welcome to push up a docs PR and request a review from the relevant SDK engineers. I know from my time on support that I often had the most context on whatever the issue was, because I'd been helping solve it.
Thanks!
@sdzhong - what SDK is this? Can you please update the description to reflect that? Also, you're always welcome to push up a docs PR and request a review from the relevant SDK engineers. I know from my time on support that I often had the most context on whatever the issue was, because I'd been helping solve it.
Thanks!
@sdzhong, in Slack, you mentioned React Native. Is this issue specific to that SDK? Or are you looking for a generalized answer (not sure if that's a possibility or not, but want to make sure we're clear on the ask)?
@lobsterkatie @imatwawana It looks like the code example here (https://docs.sentry.io/product/sentry-basics/tracing/event-detail/#adding-query-information-and-parameters-to-spans) is using the python SDK, which might not be useful for anyone looking to use any other SDK.
This section might lack information on how to set custom operation and description.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
@Zylphrex - Is this something you can help with? I think you worked on this feature.
Hi @sdzhong, I 100% agree we have more details explaining the span op and span description in the docs, I'll get that process going.
As for your other ask to overwrite the span op and span description, I don't believe there is a way to do so right now in the SDKs. Can you explain what your use case for this is? Perhaps we can advise you a better way to accomplish it.
Routing to @getsentry/visibility for triage. ⏲️
As for your other ask to overwrite the span op and span description, I don't believe there is a way to do so right now in the SDKs.
Actually, you can do it, just after the fact (using an event processor to go through all of the spans in the event and change their data before the event is sent) rather than at the time the span is created.
It looks like the code example here (docs.sentry.io/product/sentry-basics/tracing/event-detail/#adding-query-information-and-parameters-to-spans) is using the python SDK, which might not be useful for anyone looking to use any other SDK.
This is really a larger philosophical question, of how okay we are with having the code snippets in product docs be in only one language (mostly but not always JS), knowing that there are obviously users using other languages. In a perfect world, every code snippet would exist in every language and users would get to choose, but that would also likely be a whole lot of work (that I don't see anyone or any team likely to have bandwidth for in the near future).
As for your other ask to overwrite the span op and span description, I don't believe there is a way to do so right now in the SDKs.
Actually, you can do it, just after the fact (using an event processor to go through all of the spans in the event and change their data before the event is sent) rather than at the time the span is created.
Hey Katie, is this the relevant doc for overwriting span data with an Event Processor? https://docs.sentry.io/platforms/react-native/enriching-events/event-processors/ This is under the react-native platform which I believe might be most relevant to @sdzhong
We've also backlogged a ticket to expand on explaining span op and span description in our docs.
It looks like the code example here (docs.sentry.io/product/sentry-basics/tracing/event-detail/#adding-query-information-and-parameters-to-spans) is using the python SDK, which might not be useful for anyone looking to use any other SDK.
This is really a larger philosophical question, of how okay we are with having the code snippets in product docs be in only one language (mostly but not always JS), knowing that there are obviously users using other languages. In a perfect world, every code snippet would exist in every language and users would get to choose, but that would also likely be a whole lot of work (that I don't see anyone or any team likely to have bandwidth for in the near future).
Right now, we don't have a way of allowing users to choose their platform on the product side of the docs (that functionality doesn't work on the product side), so we're stuck with one flavour when using an example code snippet in product docs.
Right now, we don't have a way of allowing users to choose their platform on the product side of the docs (that functionality doesn't work on the product side), so we're stuck with one flavour when using an example code snippet in product docs.
Yup, I know. That's part of why I think it'd be a major undertaking, because someone would first have to fix the docs system to allow this, and then collect language-specific versions of all of the code snippets (which would be a big enough project in and of itself!).