Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

The official **pull transport** for Shopware's telemetry metrics abstraction. Metrics emitted through
the core `Meter`/`Telemetry` API are stored in Redis and served in Prometheus text format on
`GET /api/_internal/prometheus`. The bundle ships no instrumentation of its own — every metric defined
in the core telemetry configuration arrives automatically.
`GET /api/_internal/prometheus`. Every metric defined in the core telemetry configuration arrives
automatically. Additionally the bundle ships opt-in [scrape-time providers](#scrape-time-providers-opt-in) that
collect host-specific metrics (instance info, OPcache, PHP-FPM, OpenSearch stats) during each scrape.

## Requirements

Expand Down Expand Up @@ -73,8 +74,7 @@ prometheus_exporter:

The Redis connection is resolved in this order:

1. `storage.dsn` — the bundle opens its own connection (same DSN dialect as
`shopware.redis.connections`).
1. `storage.dsn` — the bundle opens its own connection (same DSN dialect as `shopware.redis.connections`), e.g. `dsn: '%env(PROMETHEUS_REDIS_DSN)%'`.
2. `storage.redis_connection_name` — reuses a connection managed by Shopware.

The resolved client must be a phpredis `\Redis` or a `Predis\Client`; anything else fails with a
Expand Down
10 changes: 1 addition & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "shopware/prometheus-exporter",
"description": "Prometheus pull transport for Shopware's telemetry metrics abstraction",
"version": "1.0.0",
"type": "shopware-platform-plugin",
"type": "library",
"license": "MIT",
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -36,12 +35,5 @@
"symfony/runtime": false
},
"sort-packages": true
},
"extra": {
"shopware-platform-plugin": "Shopware\\PrometheusExporter\\PrometheusExporterBundle",
"label": {
"en-GB": "Prometheus Exporter",
"de-DE": "Prometheus Exporter"
}
}
}
1 change: 1 addition & 0 deletions tests/Telemetry/PrometheusTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function testBufferedModeWritesOnFlushOnly(): void

// the buffer is cleared on flush, a second flush must not double-count
$transport->flush();
// @phpstan-ignore staticMethod.alreadyNarrowedType (flush() could double-count; re-asserting the unchanged value is the point of the test)
static::assertSame(2.0, (float) $this->singleSample('order_placed_count')->getValue());
}

Expand Down
Loading