sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

Add details on span.op and span.description

Open sdzhong opened this issue 2 years ago • 12 comments

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 avatar Feb 28 '22 22:02 sdzhong

@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!

lobsterkatie avatar Feb 28 '22 22:02 lobsterkatie

@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)?

imatwawana avatar Mar 02 '22 13:03 imatwawana

@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.

dashed avatar Mar 02 '22 13:03 dashed

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 🥀

github-actions[bot] avatar Mar 24 '22 00:03 github-actions[bot]

@Zylphrex - Is this something you can help with? I think you worked on this feature.

imatwawana avatar Mar 25 '22 15:03 imatwawana

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.

Zylphrex avatar Mar 25 '22 19:03 Zylphrex

Routing to @getsentry/visibility for triage. ⏲️

getsentry-release avatar Mar 25 '22 19:03 getsentry-release

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.

lobsterkatie avatar Mar 28 '22 22:03 lobsterkatie

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).

lobsterkatie avatar Mar 28 '22 22:03 lobsterkatie

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.

edwardgou-sentry avatar Mar 29 '22 16:03 edwardgou-sentry

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.

imatwawana avatar Mar 29 '22 17:03 imatwawana

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!).

lobsterkatie avatar Mar 30 '22 02:03 lobsterkatie