PHPackages                             ujamii/prometheus-sentry-exporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ujamii/prometheus-sentry-exporter

ActiveProject[Logging &amp; Monitoring](/categories/logging)

ujamii/prometheus-sentry-exporter
=================================

Exports sentry project metrics for prometheus.

v0.10.1(1y ago)3932411[3 issues](https://github.com/ujamii/prometheus-sentry-exporter/issues)[1 PRs](https://github.com/ujamii/prometheus-sentry-exporter/pulls)MITPHPPHP &gt;=8.0CI passing

Since Feb 27Pushed 1w ago2 watchersCompare

[ Source](https://github.com/ujamii/prometheus-sentry-exporter)[ Packagist](https://packagist.org/packages/ujamii/prometheus-sentry-exporter)[ RSS](/packages/ujamii-prometheus-sentry-exporter/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (22)Used By (0)

Exporter for sentry data in prometheus format
=============================================

[](#exporter-for-sentry-data-in-prometheus-format)

This package uses the [Sentry](https://sentry.io/) web [api](https://docs.sentry.io/api/) to query for some statistics and outputs them in [OpenMetrics](https://github.com/OpenObservability/OpenMetrics) format to be scraped by [prometheus](https://prometheus.io/).

You can also fire it up as a [docker container](#with-docker).

Usage
-----

[](#usage)

Using this exporter with Composer or Docker, you will need the hostname of your sentry installation and an auth token, which you can create via `https:///api/` if you're working with the **Sentry self hosted**. If you're working with **Sentry cloud**, you will need to create the token via [`https://sentry.io/settings/account/api/auth-tokens/`](https://sentry.io/settings/account/api/auth-tokens/).

### with Composer

[](#with-composer)

**Installation**

```
composer req ujamii/prometheus-sentry-exporter
```

**Usage in your custom file**

```
require_once 'vendor/autoload.php';

$sentryBase = 'https:///api/0/';
$token      = ''; // get from https:///api/

$exporter = new \Ujamii\OpenMetrics\Sentry\SentryExporter($token, $sentryBase);
$exporter->run();
```

### with Docker

[](#with-docker)

The image is based on `php:8.1-apache` and thus exposes data on port 80 by default. Assuming you fire this up with `-p 80:80` on localhost, you can see the metrics on .

Configuration is done with 3 env variables: `SENTRY_HOST`, `AUTH_TOKEN`, `USE_THROTTLING` and `HTTP_PROTO`. The first 2 are mandatory, `HTTP_PROTO` is optional and set to `https` by default. If you're working with the Sentry Cloud, your `SENTRY_HOST` variable must be "sentry.io" When you set `USE_THROTTLING` to `true/TRUE` or `1`, the exporter will throttle the API requests to prevent a rate limit. This is useful if you have a lot of projects and/or a lot of issues.

```
docker run -d --name sentry-prometheus -e SENTRY_HOST=sentry.foobar.com -e AUTH_TOKEN=foobarlongtoken -p "80:80" ghcr.io/ujamii/prometheus-sentry-exporter
```

Docker discontinues support for the free docker hub registry for orgs. The image is now available on [GitHub Container Registry](https://github.com/ujamii/prometheus-sentry-exporter/pkgs/container/prometheus-sentry-exporter)

Output
------

[](#output)

The script will generate something like:

```
# TYPE sentry_open_issue_events gauge
# HELP sentry_open_issue_events Number of events for one unresolved issue.
sentry_open_issue_events{project_slug="foobar", project_name="Foo Bar", issue_logger="php", issue_type="error", issue_link="https://///issues/1797/", issue_level="error"} 16.000000
...

```

License and Contribution
------------------------

[](#license-and-contribution)

[MIT](LICENSE)

As this is OpenSource, you are very welcome to contribute by reporting bugs, improve the code, write tests or whatever you are able to do to improve the project.

If you want to do me a favour, buy me something from my [Amazon wishlist](https://www.amazon.de/registry/wishlist/2C7LSRMLEAD4F).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance67

Regular maintenance activity

Popularity25

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~140 days

Recently: every ~285 days

Total

15

Last Release

718d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1526725?v=4)[Michael Grundkötter](/maintainers/mgrundkoetter)[@mgrundkoetter](https://github.com/mgrundkoetter)

---

Top Contributors

[![mgrundkoetter](https://avatars.githubusercontent.com/u/1526725?v=4)](https://github.com/mgrundkoetter "mgrundkoetter (80 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![sergeylanzman](https://avatars.githubusercontent.com/u/9318209?v=4)](https://github.com/sergeylanzman "sergeylanzman (2 commits)")[![RyanSiu1995](https://avatars.githubusercontent.com/u/24809843?v=4)](https://github.com/RyanSiu1995 "RyanSiu1995 (1 commits)")[![Slevy35](https://avatars.githubusercontent.com/u/35378572?v=4)](https://github.com/Slevy35 "Slevy35 (1 commits)")[![victorcfonseca](https://avatars.githubusercontent.com/u/40632162?v=4)](https://github.com/victorcfonseca "victorcfonseca (1 commits)")[![killmeplz](https://avatars.githubusercontent.com/u/18364763?v=4)](https://github.com/killmeplz "killmeplz (1 commits)")[![marcindulak](https://avatars.githubusercontent.com/u/3178318?v=4)](https://github.com/marcindulak "marcindulak (1 commits)")

---

Tags

openmetricsprometheusprometheus-exportersentrysentry-onpremise

### Embed Badge

![Health badge](/badges/ujamii-prometheus-sentry-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/ujamii-prometheus-sentry-exporter/health.svg)](https://phpackages.com/packages/ujamii-prometheus-sentry-exporter)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
