From 77306267718a742c75c363f0633519747a40d53b Mon Sep 17 00:00:00 2001 From: Andrii Havryliuk Date: Thu, 24 Sep 2026 17:08:56 +0200 Subject: [PATCH 1/2] fix: remove plugin-style lines from composer.json, update readme --- README.md | 8 ++++---- composer.json | 10 +--------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a01c6e3..572cde3 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/composer.json b/composer.json index 8436b37..992b618 100644 --- a/composer.json +++ b/composer.json @@ -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": { @@ -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" - } } } From 72c5ad4c26d2ae68dffb61865a6ffc47ddd86868 Mon Sep 17 00:00:00 2001 From: Andrii Havryliuk Date: Thu, 24 Sep 2026 17:32:57 +0200 Subject: [PATCH 2/2] ignore phpstan false positive --- tests/Telemetry/PrometheusTransportTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Telemetry/PrometheusTransportTest.php b/tests/Telemetry/PrometheusTransportTest.php index 81584cc..8dd58a8 100644 --- a/tests/Telemetry/PrometheusTransportTest.php +++ b/tests/Telemetry/PrometheusTransportTest.php @@ -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()); }