getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
37.66k stars 4.05k forks source link

How to select custom metrics while create custom widget #40240

Open TonyGui7 opened 1 year ago

TonyGui7 commented 1 year ago

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Version

22.10.0

Steps to Reproduce

config "organizations:dashboards-mep" flag and start service , I report custom metrics with key code below ISpan span = Sentry.getSpan(); span.setMeasurement("video_prepare", preparingTime, MeasurementUnit.Duration.MILLISECOND)

Server receive event in performance panel, but I can not find "measurement.video_prepare" metrics while creating custom widget

Expected Result

custom measurement metrics "measurement.video_prepare" should be displayed. and can be selected as aggregate args

Actual Result

custom measurement metrics "measurement.video_prepare" is not shown

TonyGui7 commented 1 year ago

7FFB3E8E-D691-429E-BB5C-21C3FC4D3CE2

getsentry-release commented 1 year ago

Routing to @getsentry/visibility for triage. ⏲️

wmak commented 1 year ago

Hey unfortunately the Custom Metrics feature is also tied to another new feature known as Dynamic Sampling, which isn't quite ready for Self Hosted instances yet.

TonyGui7 commented 1 year ago

Hey unfortunately the Custom Metrics feature is also tied to another new feature known as Dynamic Sampling, which isn't quite ready for Self Hosted instances yet.

Got it, Thanks. Is there any way I can get trial of Custom Metrics feature? Custom Metrics feature is available on service that your Sentry Team deployed. How do you deploy the service? What config do I miss?

Service that Sentry Team deployed, Custom Metrics feature works. 8D0A6F28-A964-4276-B1B7-6C5E933A9E1A

Service that I deployed for test, Custom Metrics feature doesn't work. 0278EC87-0B22-431B-B40B-BFC03032B823

TonyGui7 commented 1 year ago

Hey unfortunately the Custom Metrics feature is also tied to another new feature known as Dynamic Sampling, which isn't quite ready for Self Hosted instances yet.

Hello, When will this new feature be released on your schedule?

priscilawebdev commented 1 year ago

The Dynamic Sampling initiative was released yesterday and is available to all new customers and opt-in to existing customers. You can read more details on how to opt-in via this blog post https://blog.sentry.io/2022/11/02/a-new-era-of-sentry/#opting-in

priscilawebdev commented 1 year ago

@TonyGui7 it seems that this issue is related to this another one https://github.com/getsentry/sentry/issues/40436#issuecomment-1293581297. Can we close it?

TonyGui7 commented 1 year ago

Got it. I think it's available to Saas users or customers, but I use self-hosted instead, which hasn't been updated today.

TonyGui7 commented 1 year ago

@TonyGui7 it seems that this issue is related to this another one #40436 (comment). Can we close it?

22.11.0 is released today, but custom metrics still can't be selected as aggregate args with self-host. I am wondering whether this feature will never be available on self-hosted or not. I just need a certain answer

huririri commented 1 year ago

https://github.com/getsentry/sentry-docs/pull/6655 Is it available on self-hosted right now? @wmak @priscilawebdev

godPaimon commented 10 months ago

Is this feature available on self-hosted now? The version I am using is 23.8.0

narsaynorath commented 10 months ago

Hey there @godPaimon, @huririri, and @TonyGui7

I've tracked down this PR which enabled custom metrics in dashboards, but it hasn't been released yet. It was merged on Aug 30th and our latest release was out on Aug 15th. We should be expecting it to be published soon, we release a new version of self hosted on the 15th of each month.

When it comes out, please give it a try and if there are issues please follow up with us in this thread

EDIT: Because this next release has a lot of new changes, we're going to be releasing early next week. You can follow the progress on this issue: https://github.com/getsentry/self-hosted/issues/2345

godPaimon commented 10 months ago

OK, thx

NikHomann commented 8 months ago

We are on version 23.10.0 on our self-hosted sentry, but I can still not select custom metrics for our dashboard. Is there anything you need to enable manually?

narsaynorath commented 8 months ago

@NikHomann just to clarify, are you able to see the custom metrics on your transactions when viewing the events?

NikHomann commented 8 months ago

Yes, there the custom metrics is shown. For filtering in "discover" it can also be used, but not add as a column and also not for a new custom widget.

narsaynorath commented 8 months ago

@NikHomann just letting you know, I'm going to be looking into this.

When you access Discover, there should be a request made to a URL containing measurements-meta, can you verify if that's being called and if it returns anything? That request should contain your custom measurement, but if not that will help me understand what may be happening in your environment

NikHomann commented 7 months ago

@narsaynorath Thank you!

Yes, that request is being made, but the response is empty.

narsaynorath commented 7 months ago

Removing the Product Owner label for now while we investigate this

zaicevas commented 4 months ago

Hi, is there any progress on this issue?

narsaynorath commented 4 months ago

Sorry for the delay, @NikHomann and @zaicevas. I'm having difficulty reproducing the issue. I'm able to run 23.10.0 with a fresh install and send a transaction with the custom measurement. It took some time but I was able to see it in the UI for selecting fields in Discover and Dashboards.

For more information, how many custom metrics are you sending to Sentry? And would you happen to know if there have been any modifications in sentry.conf.py (docs) r.e. the features portion?

e.g. in a fresh install, these feature flags are enabled, do yours match?

SENTRY_FEATURES.update(
    {
        feature: True
        for feature in (
            "organizations:discover",
            "organizations:events",
            "organizations:global-views",
            "organizations:incidents",
            "organizations:integrations-issue-basic",
            "organizations:integrations-issue-sync",
            "organizations:invite-members",
            "organizations:metric-alert-builder-aggregate",
            "organizations:sso-basic",
            "organizations:sso-rippling",
            "organizations:sso-saml2",
            "organizations:performance-view",
            "organizations:advanced-search",
            "organizations:session-replay",
            "organizations:issue-platform",
            "organizations:profiling",
            "organizations:dashboards-mep",
            "organizations:mep-rollout-flag",
            "organizations:dashboards-rh-widget",
            "organizations:metrics-extraction",
            "organizations:transaction-metrics-extraction",
            "projects:custom-inbound-filters",
            "projects:data-forwarding",
            "projects:discard-groups",
            "projects:plugins",
            "projects:rate-limits",
            "projects:servicehooks",
        )
    }
)
narsaynorath commented 4 months ago

Also, the request to get the available custom metrics is filtered by the selected date range, do you know if the events you're looking at fall within that time range? If they don't, then their measurements won't appear at this time