https://github.com/getsentry/delightful-developer-metrics
Examples for custom metrics
https://github.com/getsentry/delightful-developer-metrics
tag-non-production
Last synced: 3 months ago
JSON representation
Examples for custom metrics
- Host: GitHub
- URL: https://github.com/getsentry/delightful-developer-metrics
- Owner: getsentry
- Created: 2023-12-07T16:35:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T19:19:43.000Z (about 1 year ago)
- Last Synced: 2025-03-22T06:47:06.387Z (3 months ago)
- Topics: tag-non-production
- Language: CSS
- Homepage:
- Size: 25.4 KB
- Stars: 6
- Watchers: 29
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Delightful Developer Metrics
Welcome to Sentry's custom metrics alpha. This repository collects all the relevant information
to get you started quickly including some samples. We're going to keep this updated as more
features become available.In order to use this, you need to be rolled into our alpha testing program.
## Sending Metrics
At the moment you have the best experience with the Python SDK. You need at least version
1.38:```python
from sentry_sdk import init, metricsinit("YOUR_DSN_HERE", _experiments={
"enable_metrics": True,
"metric_code_locations": True,
})# Increment a metric to see how it works
metrics.incr("drank-drinks", 1, tags={"kind": "coffee"})
```With a bit of delay you can see the data come in, in the "DDM" UI (pending imminent rename).
More docs: [Sending Metrics from Python](https://develop.sentry.dev/delightful-developer-metrics/sending-metrics-sdk/).
## Links
**Documentation:**
* [The UI](https://develop.sentry.dev/delightful-developer-metrics/ui/)
* [General Overview](https://develop.sentry.dev/delightful-developer-metrics/)
* [Python Metrics API](https://develop.sentry.dev/delightful-developer-metrics/sending-metrics-sdk/)
* [General Overview](https://develop.sentry.dev/delightful-developer-metrics/)
* [Nitty gritty internals](https://develop.sentry.dev/sdk/metrics/)**Engage and Give Feedback:**
* [Discord](https://discord.gg/sentry) (`#custom-metrics`)
* [GitHub Discussion](https://github.com/getsentry/sentry/discussions/58584)## Samples
* [hello-python](python/src/python_example/__init__.py)