-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Prometheus Middleware (#1791)
* base prometheus middleware * rabbit prometheus middleware * fixed always message ack in the absence of errors * small refactoring, redis metrics * kafka prometheus * str statuses -> StrEnums * fix kafka tests * confluent prometheus * nats prometheus * edit message count in process & fix settings provider for Nats KV and Nats OS * importorskip in tests * doc & ruff & mypy * docs: generate API References * clarifications added * pushback tests fixed * lint fixed * lint fixed * number of tests reduced & fix confluent mark * test cases renamed * confluent tests fixed * documentation addition * updated SUMMARY.md * docs: generate API References * trailing-whitespace in index.md * deleted pragma: no-cover * tests for getting started code examples * Revert "tests for getting started code examples" This reverts commit b54950d. * MetricsManager abstraction added and used in middleware * fixed an error when there was no exchange in tests * documentation has been corrected due to the renaming of metrics * docs: generate API References * fixed type annotations * added app_name label in index.md * removed extra space in metric doc * fixed status in add_published_message * fixed buckets type * test for implementing metrics on a real prometheus_client * small tests refactoring * changed metrics_prefix default value * **kwargs in get_broker mtehod * readable params in tests * simplified annotation * EMPTY as metrics_prefix default value * fixed test_observe_received_messages_size * apply_types=False as default in get_broker * external links in prometheus/index.md * fixed doc * fixed params naming * fix: revert acknowledgement changes * lint: fix precommit * chore: bump version * app_name EMPTY is default --------- Co-authored-by: roma-frolov <[email protected]> Co-authored-by: Nikita Pastukhov <[email protected]> Co-authored-by: Pastukhov Nikita <[email protected]>
- Loading branch information
1 parent
5812e29
commit 975d182
Showing
97 changed files
with
2,960 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/confluent/prometheus/KafkaPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.KafkaPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
.../en/api/faststream/confluent/prometheus/middleware/KafkaPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.middleware.KafkaPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
...aststream/confluent/prometheus/provider/BaseConfluentMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.provider.BaseConfluentMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
...ststream/confluent/prometheus/provider/BatchConfluentMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.provider.BatchConfluentMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
...pi/faststream/confluent/prometheus/provider/ConfluentMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.provider.ConfluentMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
...cs/en/api/faststream/confluent/prometheus/provider/settings_provider_factory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.confluent.prometheus.provider.settings_provider_factory |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/kafka/prometheus/KafkaPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.KafkaPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
...docs/en/api/faststream/kafka/prometheus/middleware/KafkaPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.middleware.KafkaPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
...en/api/faststream/kafka/prometheus/provider/BaseKafkaMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.provider.BaseKafkaMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
...n/api/faststream/kafka/prometheus/provider/BatchKafkaMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.provider.BatchKafkaMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
...ocs/en/api/faststream/kafka/prometheus/provider/KafkaMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.provider.KafkaMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/kafka/prometheus/provider/settings_provider_factory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.kafka.prometheus.provider.settings_provider_factory |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/nats/prometheus/NatsPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.NatsPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/nats/prometheus/middleware/NatsPrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.middleware.NatsPrometheusMiddleware |
11 changes: 11 additions & 0 deletions
11
...s/en/api/faststream/nats/prometheus/provider/BaseNatsMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.provider.BaseNatsMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
.../en/api/faststream/nats/prometheus/provider/BatchNatsMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.provider.BatchNatsMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
.../docs/en/api/faststream/nats/prometheus/provider/NatsMetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.provider.NatsMetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/nats/prometheus/provider/settings_provider_factory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.nats.prometheus.provider.settings_provider_factory |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/prometheus/BasePrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.BasePrometheusMiddleware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.ConsumeAttrs |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/prometheus/MetricsSettingsProvider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.MetricsSettingsProvider |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/prometheus/container/MetricsContainer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.container.MetricsContainer |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/prometheus/manager/MetricsManager.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.manager.MetricsManager |
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/prometheus/middleware/BasePrometheusMiddleware.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: faststream.prometheus.middleware.BasePrometheusMiddleware |
Oops, something went wrong.