#Is it possible to include a child transaction's tags or data in Dashboard widgets or Discover?

10 messages · Page 1 of 1 (latest)

stable temple
#

I record a numerical value inside a child transaction's data. Let's call it, breadRollNumber. In Discover, I can confirm that breadRollNumber appears, with the correct Int value, in the right detail-view panel, under Span > Span Specific > Additional Data.

I would like to extract the value of breadRollNumber to run an equation with it inside a Dashboard widget.

Is that something that is possible? To chart or display data values inside a child transaction? After scouring the docs, SO, and GitHub issues, I am coming to the conclusion that perhaps this is not something that is possible.

frosty cryptBOT
#

Hi @stable temple. I'm happy to dig into this for you! I'll check my internal sources for answers to your question! :wave:

#

Based on the knowledge sources provided, it appears that there are some limitations when it comes to using data from child transactions in Dashboard widgets or Discover.

According to the information available, there's a distinction between transactions and spans in Sentry's performance UI that creates some limitations. As mentioned in a GitHub issue, "Sentry treats top level spans differently (called transactions) from child spans in many ways," including that "Transactions don't show additional data in the UI, while spans do" and "Transactions can be searched, but there's no global view or search for spans" Remove span and transaction distinction in the performance UI.

Another relevant issue points out that child transactions in Discover lack names and useful attributes. The issue describes that when viewing a child transaction in Discover, it's only identified by "default - {id}" and when expanded, the attributes aren't visible Child transactions in Discover lack names and useful attributes.

For dashboard widgets specifically, there are limitations on what data can be used. The documentation mentions that "Not all widgets are compatible with metrics extraction" and that "Extraction only happens for transaction data" Extracted metrics.

There's also an issue that discusses the inability to search and display custom performance measurements with numbers in Discover and Dashboards Inability to Search and Display Performance Custom Performance Measurements with Numbers, which might be related to your case with breadRollNumber.

#

From another issue, it appears that using tags instead of additional data might be a better approach for your use case. A Sentry team member suggested: "if you were to just use tags instead you'd be able to achieve the functionality you're looking for" and "Tags will allow you to know the count of unique values for all these fields" Include fields from "additional data" in dashboard widgets.

Based on these sources, it seems that currently, it's not possible to directly use data values from child transactions in Dashboard widgets or Discover equations. The recommended approach would be to use tags instead of additional data if you need to analyze these values in Dashboards or Discover.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@stable temple Our robots are still learning and improving, please let us know if this response was correct by reacting below.

stable temple
#

@frosty crypt Do tags always have to be string values? I need them to be a number, or a way to convert a string into a number.

#

@frosty crypt Do tags always have to be string values? I need them to be a number, or a way to convert a string into a number.

frosty cryptBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Based on the knowledge sources, tags in Sentry are stored as strings, and there are some limitations when working with numeric values in tags.

According to the Sentry documentation, "Tags are key/value string pairs that are both indexed and searchable." Tag values have a maximum length of 200 characters and cannot contain the newline character Tags.

When you set a numeric value as a tag, it gets converted to a string. This creates limitations when you want to perform numerical operations on these values. As mentioned in a GitHub discussion, "Currently tags are stored as strings, so you cannot use numerical operators with them" how to query string numbers in discover.

There have been multiple feature requests from users wanting to use numerical values for tags:

For your use case with breadRollNumber, the recommended alternative is to use custom performance metrics instead of tags. As suggested in a GitHub response: "To support this use case, we recommend checking out custom performance metrics" how to query string numbers in discover.

#

With custom performance metrics, you can store numerical values and use them in queries like measurements.breadRollNumber:>1000. However, note that this is only available for transactions, not for regular events.

If you must use tags with numerical values, you'll need to work with them as strings, and numerical comparisons won't work as expected (e.g., "99,98,100..." instead of "100,99,98...").

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: