Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Prometheus Middleware #1791

Merged
merged 62 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
08139b0
base prometheus middleware
roma-frolov Sep 14, 2024
40f1a32
rabbit prometheus middleware
roma-frolov Sep 14, 2024
21ef4da
fixed always message ack in the absence of errors
roma-frolov Sep 14, 2024
1840ac8
Merge branch 'refs/heads/main' into feat/prometheus
roma-frolov Sep 14, 2024
119dc8a
small refactoring, redis metrics
roma-frolov Sep 16, 2024
9823e4b
kafka prometheus
roma-frolov Sep 16, 2024
09be4b4
str statuses -> StrEnums
roma-frolov Sep 16, 2024
554e31c
fix kafka tests
roma-frolov Sep 16, 2024
d77f8ab
confluent prometheus
roma-frolov Sep 16, 2024
e6db1c8
nats prometheus
roma-frolov Sep 17, 2024
2d12339
edit message count in process & fix settings provider for Nats KV and…
roma-frolov Sep 17, 2024
050973d
importorskip in tests
roma-frolov Sep 17, 2024
65d08cc
doc & ruff & mypy
roma-frolov Sep 19, 2024
efb9f3f
docs: generate API References
roma-frolov Sep 19, 2024
ea13a77
clarifications added
roma-frolov Sep 20, 2024
b5dddd8
Merge branch 'refs/heads/main' into feat/prometheus
roma-frolov Sep 20, 2024
9c59db0
Merge remote-tracking branch 'origin/feat/prometheus' into feat/prome…
roma-frolov Sep 20, 2024
f221ee4
pushback tests fixed
roma-frolov Sep 20, 2024
134ffd5
lint fixed
roma-frolov Sep 20, 2024
8e1b9a2
lint fixed
roma-frolov Sep 20, 2024
e3262b1
number of tests reduced & fix confluent mark
roma-frolov Sep 24, 2024
ff3a57f
test cases renamed
roma-frolov Sep 25, 2024
1b038e6
confluent tests fixed
roma-frolov Sep 25, 2024
a3d49aa
documentation addition
roma-frolov Oct 5, 2024
d4d2b50
updated SUMMARY.md
roma-frolov Oct 5, 2024
7016fdc
docs: generate API References
roma-frolov Oct 5, 2024
954db14
trailing-whitespace in index.md
roma-frolov Oct 5, 2024
78ed367
Merge remote-tracking branch 'origin/feat/prometheus' into feat/prome…
roma-frolov Oct 5, 2024
7e46419
deleted pragma: no-cover
roma-frolov Oct 5, 2024
e2a7558
Merge branch 'refs/heads/main' into feat/prometheus
roma-frolov Oct 5, 2024
b54950d
tests for getting started code examples
roma-frolov Oct 5, 2024
b3aee37
Revert "tests for getting started code examples"
roma-frolov Oct 5, 2024
880c36e
MetricsManager abstraction added and used in middleware
roma-frolov Oct 11, 2024
84c23c5
fixed an error when there was no exchange in tests
roma-frolov Oct 11, 2024
bff2e70
documentation has been corrected due to the renaming of metrics
roma-frolov Oct 11, 2024
4f7d586
docs: generate API References
roma-frolov Oct 11, 2024
cc6f7eb
fixed type annotations
roma-frolov Oct 11, 2024
dd84383
Merge remote-tracking branch 'origin/feat/prometheus' into feat/prome…
roma-frolov Oct 11, 2024
7f8bef9
added app_name label in index.md
roma-frolov Oct 11, 2024
0abb25d
removed extra space in metric doc
roma-frolov Oct 12, 2024
2edcd77
fixed status in add_published_message
roma-frolov Oct 12, 2024
cebcad8
fixed buckets type
roma-frolov Oct 12, 2024
2b8b508
test for implementing metrics on a real prometheus_client
roma-frolov Oct 12, 2024
77dddc6
small tests refactoring
roma-frolov Oct 18, 2024
d5e4771
changed metrics_prefix default value
roma-frolov Oct 18, 2024
3c5f96a
**kwargs in get_broker mtehod
roma-frolov Oct 18, 2024
6e1fd83
readable params in tests
roma-frolov Oct 18, 2024
df58a17
simplified annotation
roma-frolov Oct 18, 2024
60a46b4
Merge branch 'refs/heads/main' into feat/prometheus
roma-frolov Oct 18, 2024
9b8692e
EMPTY as metrics_prefix default value
roma-frolov Oct 19, 2024
598dc00
fixed test_observe_received_messages_size
roma-frolov Oct 19, 2024
53fe370
apply_types=False as default in get_broker
roma-frolov Oct 19, 2024
7983bf7
external links in prometheus/index.md
roma-frolov Oct 19, 2024
e5bdc42
fixed doc
roma-frolov Oct 19, 2024
a9a0156
fixed params naming
roma-frolov Oct 19, 2024
855733a
fix: revert acknowledgement changes
Lancetnik Oct 19, 2024
2d10097
lint: fix precommit
Lancetnik Oct 19, 2024
328405b
chore: bump version
Lancetnik Oct 19, 2024
e3ff13e
Merge branch 'main' into feat/prometheus
Lancetnik Oct 19, 2024
f0e611c
Merge branch 'main' into feat/prometheus
Lancetnik Oct 19, 2024
1de4f58
app_name EMPTY is default
roma-frolov Oct 20, 2024
7ffaf44
Merge remote-tracking branch 'origin/feat/prometheus' into feat/prome…
roma-frolov Oct 20, 2024
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
56 changes: 56 additions & 0 deletions docs/docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ search:
- [CLI](getting-started/cli/index.md)
- [ASGI](getting-started/asgi.md)
- [OpenTelemetry](getting-started/opentelemetry/index.md)
- [Prometheus](getting-started/prometheus/index.md)
- [Logging](getting-started/logging.md)
- [Config Management](getting-started/config/index.md)
- [Task Scheduling](scheduling.md)
Expand Down Expand Up @@ -521,6 +522,15 @@ search:
- [telemetry_attributes_provider_factory](api/faststream/confluent/opentelemetry/provider/telemetry_attributes_provider_factory.md)
- parser
- [AsyncConfluentParser](api/faststream/confluent/parser/AsyncConfluentParser.md)
- prometheus
- [KafkaPrometheusMiddleware](api/faststream/confluent/prometheus/KafkaPrometheusMiddleware.md)
- middleware
- [KafkaPrometheusMiddleware](api/faststream/confluent/prometheus/middleware/KafkaPrometheusMiddleware.md)
- provider
- [BaseConfluentMetricsSettingsProvider](api/faststream/confluent/prometheus/provider/BaseConfluentMetricsSettingsProvider.md)
- [BatchConfluentMetricsSettingsProvider](api/faststream/confluent/prometheus/provider/BatchConfluentMetricsSettingsProvider.md)
- [ConfluentMetricsSettingsProvider](api/faststream/confluent/prometheus/provider/ConfluentMetricsSettingsProvider.md)
- [settings_provider_factory](api/faststream/confluent/prometheus/provider/settings_provider_factory.md)
- publisher
- asyncapi
- [AsyncAPIBatchPublisher](api/faststream/confluent/publisher/asyncapi/AsyncAPIBatchPublisher.md)
Expand Down Expand Up @@ -617,6 +627,15 @@ search:
- parser
- [AioKafkaBatchParser](api/faststream/kafka/parser/AioKafkaBatchParser.md)
- [AioKafkaParser](api/faststream/kafka/parser/AioKafkaParser.md)
- prometheus
- [KafkaPrometheusMiddleware](api/faststream/kafka/prometheus/KafkaPrometheusMiddleware.md)
- middleware
- [KafkaPrometheusMiddleware](api/faststream/kafka/prometheus/middleware/KafkaPrometheusMiddleware.md)
- provider
- [BaseKafkaMetricsSettingsProvider](api/faststream/kafka/prometheus/provider/BaseKafkaMetricsSettingsProvider.md)
- [BatchKafkaMetricsSettingsProvider](api/faststream/kafka/prometheus/provider/BatchKafkaMetricsSettingsProvider.md)
- [KafkaMetricsSettingsProvider](api/faststream/kafka/prometheus/provider/KafkaMetricsSettingsProvider.md)
- [settings_provider_factory](api/faststream/kafka/prometheus/provider/settings_provider_factory.md)
- publisher
- asyncapi
- [AsyncAPIBatchPublisher](api/faststream/kafka/publisher/asyncapi/AsyncAPIBatchPublisher.md)
Expand Down Expand Up @@ -730,6 +749,15 @@ search:
- [NatsBaseParser](api/faststream/nats/parser/NatsBaseParser.md)
- [NatsParser](api/faststream/nats/parser/NatsParser.md)
- [ObjParser](api/faststream/nats/parser/ObjParser.md)
- prometheus
- [NatsPrometheusMiddleware](api/faststream/nats/prometheus/NatsPrometheusMiddleware.md)
- middleware
- [NatsPrometheusMiddleware](api/faststream/nats/prometheus/middleware/NatsPrometheusMiddleware.md)
- provider
- [BaseNatsMetricsSettingsProvider](api/faststream/nats/prometheus/provider/BaseNatsMetricsSettingsProvider.md)
- [BatchNatsMetricsSettingsProvider](api/faststream/nats/prometheus/provider/BatchNatsMetricsSettingsProvider.md)
- [NatsMetricsSettingsProvider](api/faststream/nats/prometheus/provider/NatsMetricsSettingsProvider.md)
- [settings_provider_factory](api/faststream/nats/prometheus/provider/settings_provider_factory.md)
- publisher
- asyncapi
- [AsyncAPIPublisher](api/faststream/nats/publisher/asyncapi/AsyncAPIPublisher.md)
Expand Down Expand Up @@ -808,6 +836,19 @@ search:
- [TelemetryMiddleware](api/faststream/opentelemetry/middleware/TelemetryMiddleware.md)
- provider
- [TelemetrySettingsProvider](api/faststream/opentelemetry/provider/TelemetrySettingsProvider.md)
- prometheus
- [BasePrometheusMiddleware](api/faststream/prometheus/BasePrometheusMiddleware.md)
- [ConsumeAttrs](api/faststream/prometheus/ConsumeAttrs.md)
- [MetricsSettingsProvider](api/faststream/prometheus/MetricsSettingsProvider.md)
- middleware
- [BasePrometheusMiddleware](api/faststream/prometheus/middleware/BasePrometheusMiddleware.md)
- [PrometheusMiddleware](api/faststream/prometheus/middleware/PrometheusMiddleware.md)
- provider
- [MetricsSettingsProvider](api/faststream/prometheus/provider/MetricsSettingsProvider.md)
- types
- [ConsumeAttrs](api/faststream/prometheus/types/ConsumeAttrs.md)
- [ProcessingStatus](api/faststream/prometheus/types/ProcessingStatus.md)
- [PublishingStatus](api/faststream/prometheus/types/PublishingStatus.md)
- rabbit
- [ExchangeType](api/faststream/rabbit/ExchangeType.md)
- [RabbitBroker](api/faststream/rabbit/RabbitBroker.md)
Expand Down Expand Up @@ -846,6 +887,12 @@ search:
- [RabbitTelemetrySettingsProvider](api/faststream/rabbit/opentelemetry/provider/RabbitTelemetrySettingsProvider.md)
- parser
- [AioPikaParser](api/faststream/rabbit/parser/AioPikaParser.md)
- prometheus
- [RabbitPrometheusMiddleware](api/faststream/rabbit/prometheus/RabbitPrometheusMiddleware.md)
- middleware
- [RabbitPrometheusMiddleware](api/faststream/rabbit/prometheus/middleware/RabbitPrometheusMiddleware.md)
- provider
- [RabbitMetricsSettingsProvider](api/faststream/rabbit/prometheus/provider/RabbitMetricsSettingsProvider.md)
- publisher
- asyncapi
- [AsyncAPIPublisher](api/faststream/rabbit/publisher/asyncapi/AsyncAPIPublisher.md)
Expand Down Expand Up @@ -947,6 +994,15 @@ search:
- [RedisPubSubParser](api/faststream/redis/parser/RedisPubSubParser.md)
- [RedisStreamParser](api/faststream/redis/parser/RedisStreamParser.md)
- [SimpleParser](api/faststream/redis/parser/SimpleParser.md)
- prometheus
- [RedisPrometheusMiddleware](api/faststream/redis/prometheus/RedisPrometheusMiddleware.md)
- middleware
- [RedisPrometheusMiddleware](api/faststream/redis/prometheus/middleware/RedisPrometheusMiddleware.md)
- provider
- [BaseRedisMetricsSettingsProvider](api/faststream/redis/prometheus/provider/BaseRedisMetricsSettingsProvider.md)
- [BatchRedisMetricsSettingsProvider](api/faststream/redis/prometheus/provider/BatchRedisMetricsSettingsProvider.md)
- [RedisMetricsSettingsProvider](api/faststream/redis/prometheus/provider/RedisMetricsSettingsProvider.md)
- [settings_provider_factory](api/faststream/redis/prometheus/provider/settings_provider_factory.md)
- publisher
- asyncapi
- [AsyncAPIChannelPublisher](api/faststream/redis/publisher/asyncapi/AsyncAPIChannelPublisher.md)
Expand Down
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 docs/docs/en/api/faststream/prometheus/BasePrometheusMiddleware.md
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
11 changes: 11 additions & 0 deletions docs/docs/en/api/faststream/prometheus/ConsumeAttrs.md
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 docs/docs/en/api/faststream/prometheus/MetricsSettingsProvider.md
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
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
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.PrometheusMiddleware
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.provider.MetricsSettingsProvider
Loading
Loading