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

Add Developer Metrics #2698

Closed
aldy505 opened this issue Jan 10, 2024 · 7 comments
Closed

Add Developer Metrics #2698

aldy505 opened this issue Jan 10, 2024 · 7 comments

Comments

@aldy505
Copy link
Collaborator

aldy505 commented Jan 10, 2024

Problem Statement

Sentry has Developer Metrics in alpha. We should bring that into self-hosted after GA.

Solution Brainstorm

Discussion: getsentry/sentry#58584
Feature docs: https://develop.sentry.dev/delightful-developer-metrics/
SDK: https://develop.sentry.dev/sdk/metrics/

SDK guide on Python: https://develop.sentry.dev/delightful-developer-metrics/sending-metrics-sdk/

@aldy505
Copy link
Collaborator Author

aldy505 commented Jan 10, 2024

IMPORTANT: See this comment's edit history for older Sentry versions.

To enable the feature, make sure you're on 24.3.0 or higher. You'd need to edit your sentry/sentry.conf.py file and add these feature flags:

SENTRY_FEATURES.update(
  {
    feature: True
    for feature in (
      # ......
      # For DDM
      # Metrics: Enable ingestion and storage of custom metrics. See custom-metrics for UI.
      "organizations:custom-metrics",
      # Enables experimental WIP custom metrics related features
      "organizations:custom-metrics-experimental",
      # Enables automatically deriving of code mappings
      "organizations:derive-code-mappings",
    )
  }
)

Add new Snuba container on your docker-compose.yml:

  snuba-generic-metrics-gauges-consumer:
    <<: *snuba_defaults
    command: rust-consumer --storage generic_metrics_gauges_raw --consumer-group snuba-gen-metrics-gauges-consumers --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset

Then do ./install.sh all over again.

@hubertdeng123
Copy link
Member

Thanks for creating this issue

@DarkByteZero
Copy link

These are required Database Migrations:

docker compose run --rm snuba-api migrations migrate -g spans

@aldy505
Copy link
Collaborator Author

aldy505 commented May 4, 2024

Hello @ayirr7, since GA for Metrics is near, do you want to re-create this PR #2757? (You can't reopen since it's already locked, you need to create a new PR)

I believe adding the gauge consumer now is a good idea, since it will ingest some data beforehand, that can be viewed later on the UI when GA's arrived -- so the Metrics UI won't be empty when it's enabled.

@marianhlavac
Copy link

To enable the feature, make sure you're on 23.11.2 or higher.

Note for anyone trying to test this on their self-hosted instance, the minimum version is probably actually higher. Had no luck on 24.1.1 (the Metrics page was not showing at all), after upgrading to 24.7.0 it worked well.

@xuweixi11
Copy link

xuweixi11 commented Jul 30, 2024

anybody used the metric alert success? it's never triggered, my version is 24.7.0

@aldy505
Copy link
Collaborator Author

aldy505 commented Sep 6, 2024

Sad news: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Coming-to-an-End

Currently there are a few draft PR that removes the metrics functionality. Although if you're self-hosting the version 23.12.0 to 24.8.0, Metrics is available for you.

Sad to see this thing go.

@aldy505 aldy505 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Archived in project
Archived in project
Development

No branches or pull requests

6 participants