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

Transaction Duration Metrics don't match Measurement Metrics #68747

Open
kylannjohnson opened this issue Apr 11, 2024 · 25 comments
Open

Transaction Duration Metrics don't match Measurement Metrics #68747

kylannjohnson opened this issue Apr 11, 2024 · 25 comments
Labels
Product Area: Dashboards Sync: Jira Apply to auto-create a Jira shadow ticket

Comments

@kylannjohnson
Copy link

kylannjohnson commented Apr 11, 2024

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Consider two transactions, one un-scoped and the other scoped. (Let's call them Transaction A and B). Transaction A's duration is added as a measurement to Transaction B because we'd like to just track the duration of this operation instead of using a transaction on it.

The metrics don't seem to match and my question is whether they should or not.

In the dashboard below the left panels are showing various functions on transaction.duration of Transaction A. The lowest panel is just a list of the duration. The panels on the right are showing the same functions but applied to a measurement sent with Transaction B (the scoped one).

Expected Result

I expect there's some interpolation going on in both cases, but I would expect the same results, given the same, small set of data. Should a percentile calculation done on a measurement be the same as a duration of the same amount? All durations are known and seem to both be in the data set.

If there is some variance, what is the accuracy of it? e.g. +/- 1%

Actual Result

Screenshot 2024-04-08 at 10 21 21 AM

Product Area

Dashboards

Link

No response

DSN

No response

Version

No response

┆Issue is synchronized with this Jira Improvement by Unito

@getsantry
Copy link
Contributor

getsantry bot commented Apr 11, 2024

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Apr 12, 2024

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

@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 12, 2024
@irodrigues-git irodrigues-git added the Sync: Jira Apply to auto-create a Jira shadow ticket label Apr 12, 2024
@k-fish
Copy link
Member

k-fish commented Apr 15, 2024

Hey there, thanks for writing in, I think I understand what you're asking, but before we get into how the percentiles etc. work can you possibly show the events durations and the measurement in discover (or if you forgo using aggregates in dashboards and add event-id, the table should work) and list out each event? just to make sure the underlying numbers are the same?

eg. something like this (ignore that the measurement here is num_of_spans and replace it with the measurement you're using)
Screenshot 2024-04-15 at 4 31 31 PM

Also do you have any filters on these? I see count() of 8 for measurements and transactions, so if that's correct it should be showing the same number of data points.

@kylannjohnson
Copy link
Author

Sorry, but the durations were obscured by the excel sheet and they matched. They were listed in tables on the bottom with the only filter on the left being title:TransactionA and the right being title:TransactionB. Then the columns were for transaction.duration and measurement.foo respectively

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 18, 2024
@kylannjohnson
Copy link
Author

kylannjohnson commented Apr 18, 2024

I was able to zero in on the same dataset. I did add a dashboard filter so that all tiles use the same release (the dev release i was working on)
image

@k-fish
Copy link
Member

k-fish commented Apr 22, 2024

Hmm those look correct, you should be getting the same percentile for the same period, although there can be some small differences since we use an approximate quantile function so when there are millions (or billions) of data points it doesn't take a long time.

Can you possibly share the id for this dashboard (sentry.io/dashboard/<id here>/)? I can check on the backend and maybe figure out what's up.

@kylannjohnson
Copy link
Author

Sorry for the delay. Let me make sure I can disclose that

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 6, 2024
@kylannjohnson
Copy link
Author

Can you possibly share the id for this dashboard (sentry.io/dashboard/<id here>/)? I can check on the backend and maybe figure out what's up.

ID: 85476

@getsantry
Copy link
Contributor

getsantry bot commented May 8, 2024

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

@wmak
Copy link
Member

wmak commented Jul 2, 2024

Alternatively, if you just want to get the immediate solution you can rename the measurement too which should work immediately.

As well yes the unit determination is based on the currently selected projects

@matejminar
Copy link
Member

@wmak is right, we can't delete measurements. The best bet would be to use a different name if you'd like to start fresh.

slightly unrelated side note: we don't support deletion in custom metrics either; we just support "disabling" which blocks ingestion and hides the metric from UI, but unfortunately, that's not available with custom measurements
https://docs.sentry.io/product/explore/metrics/metrics-settings/#emitted-metrics

@kylannjohnson
Copy link
Author

kylannjohnson commented Jul 10, 2024

Ok, we'll explore versioning our metric/measurement names. Looking forward to the fix, too.

edit: I just wanted to be sure I understand. If we send a measurement to Project1 and then to Project2, is that considered two different measurements? We do have a smaller project just for experimentation and non-production data.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 10, 2024
@wmak
Copy link
Member

wmak commented Jul 12, 2024

I just wanted to be sure I understand. If we send a measurement to Project1 and then to Project2, is that considered two different measurements?

Not really, its more that per request we look at the selected projects and try our best to figure out what the user means when you request a measurement.

If both projects are selected, the unit from either project may be used.

@getsantry
Copy link
Contributor

getsantry bot commented Jul 25, 2024

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

@kylannjohnson
Copy link
Author

Hey all, any updates here?

@getsantry
Copy link
Contributor

getsantry bot commented Aug 7, 2024

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

@ale-cota
Copy link
Contributor

ale-cota commented Aug 8, 2024

Hi @kylannjohnson,
Sorry for the delayed reply here. Have you managed to implement the short term fix we suggested to rename the measurements and start fresh with a single unit? Are you still experiencing issues in your dashboard?

We don’t have an ETA yet for the longterm fix to handle and merge multiple units on the backend. This is currently on our backlog, but if you're still having issues, we'll try to find a solution. Thanks!

@kylannjohnson
Copy link
Author

Hey @ale-cota ,

Thanks for the response. Yes, we have decided to version our measurement names going forward. It seems like this will address our issue in our local tests on a separate dashboard.

Perhaps there's already a way to do this, but some kind of Measurement Summary could be a way to indicate what raw values came in to Sentry or what unit they are being assigned. I can see why the implementation is "sticky", but versioning a measurement name also isn't great. I'm sure there's a great solution to this product level issue, but we'll keep an eye out as we grow our usage of measurements in the near future.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Aug 8, 2024
@ale-cota
Copy link
Contributor

ale-cota commented Aug 9, 2024

Thanks for confirming that versioning for the names at least addresses the issue for now. We'll update you once we manage to schedule the investigation work for merging/summarizing multiple units.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Area: Dashboards Sync: Jira Apply to auto-create a Jira shadow ticket
Projects
Status: No status
Status: No status
Development

No branches or pull requests

9 participants