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

Export client metrics to Prometheus #317

Merged
merged 3 commits into from
Jul 10, 2020
Merged

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Jul 8, 2020

Motivation

Added basic client metrics using Prometheus lib.

# HELP pulsar_client_bytes_published Counter of messages published by the client
# TYPE pulsar_client_bytes_published counter
pulsar_client_bytes_published 1.046016e+09
# HELP pulsar_client_bytes_received Counter of bytes received by the client
# TYPE pulsar_client_bytes_received counter
pulsar_client_bytes_received 0
# HELP pulsar_client_connections_closed Counter of connections closed by the client
# TYPE pulsar_client_connections_closed counter
pulsar_client_connections_closed 0
# HELP pulsar_client_connections_establishment_errors Counter of errors in connections establishment
# TYPE pulsar_client_connections_establishment_errors counter
pulsar_client_connections_establishment_errors 0
# HELP pulsar_client_connections_handshake_errors Counter of errors in connections handshake (eg: authz)
# TYPE pulsar_client_connections_handshake_errors counter
pulsar_client_connections_handshake_errors 0
# HELP pulsar_client_connections_opened Counter of connections created by the client
# TYPE pulsar_client_connections_opened counter
pulsar_client_connections_opened 1
# HELP pulsar_client_consumer_acks Counter of messages acked by client
# TYPE pulsar_client_consumer_acks counter
pulsar_client_consumer_acks 0
# HELP pulsar_client_consumer_dlq_messages Counter of messages sent to Dead letter queue
# TYPE pulsar_client_consumer_dlq_messages counter
pulsar_client_consumer_dlq_messages 0
# HELP pulsar_client_consumer_nacks Counter of messages nacked by client
# TYPE pulsar_client_consumer_nacks counter
pulsar_client_consumer_nacks 0
# HELP pulsar_client_consumer_prefetched_bytes Total number of bytes currently sitting in the consumer pre-fetch queue
# TYPE pulsar_client_consumer_prefetched_bytes gauge
pulsar_client_consumer_prefetched_bytes 0
# HELP pulsar_client_consumer_prefetched_messages Number of messages currently sitting in the consumer pre-fetch queue
# TYPE pulsar_client_consumer_prefetched_messages gauge
pulsar_client_consumer_prefetched_messages 0
# HELP pulsar_client_consumer_processing_time_seconds Time it takes for application to process messages
# TYPE pulsar_client_consumer_processing_time_seconds histogram
pulsar_client_consumer_processing_time_seconds_bucket{le="0.0005"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.001"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.005"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.01"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.025"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.05"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.1"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.25"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="0.5"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="1"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="2.5"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="5"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="10"} 0
pulsar_client_consumer_processing_time_seconds_bucket{le="+Inf"} 0
pulsar_client_consumer_processing_time_seconds_sum 0
pulsar_client_consumer_processing_time_seconds_count 0
# HELP pulsar_client_consumers_closed Counter of consumers closed by the client
# TYPE pulsar_client_consumers_closed counter
pulsar_client_consumers_closed 0
# HELP pulsar_client_consumers_opened Counter of consumers created by the client
# TYPE pulsar_client_consumers_opened counter
pulsar_client_consumers_opened 0
# HELP pulsar_client_consumers_partitions_active Counter of individual partitions the consumers are currently active
# TYPE pulsar_client_consumers_partitions_active gauge
pulsar_client_consumers_partitions_active 0
# HELP pulsar_client_lookup_count Counter of lookup requests made by the client
# TYPE pulsar_client_lookup_count counter
pulsar_client_lookup_count 1
# HELP pulsar_client_messages_published Counter of messages published by the client
# TYPE pulsar_client_messages_published counter
pulsar_client_messages_published 1.0215e+06
# HELP pulsar_client_messages_received Counter of messages received by the client
# TYPE pulsar_client_messages_received counter
pulsar_client_messages_received 0
# HELP pulsar_client_producer_errors Counter of publish errors
# TYPE pulsar_client_producer_errors counter
pulsar_client_producer_errors 0
# HELP pulsar_client_producer_latency_seconds Publish latency experienced by the client
# TYPE pulsar_client_producer_latency_seconds histogram
pulsar_client_producer_latency_seconds_bucket{le="0.0005"} 0
pulsar_client_producer_latency_seconds_bucket{le="0.001"} 44
pulsar_client_producer_latency_seconds_bucket{le="0.005"} 879545
pulsar_client_producer_latency_seconds_bucket{le="0.01"} 968157
pulsar_client_producer_latency_seconds_bucket{le="0.025"} 988713
pulsar_client_producer_latency_seconds_bucket{le="0.05"} 993046
pulsar_client_producer_latency_seconds_bucket{le="0.1"} 993473
pulsar_client_producer_latency_seconds_bucket{le="0.25"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="0.5"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="1"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="2.5"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="5"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="10"} 1.0215e+06
pulsar_client_producer_latency_seconds_bucket{le="+Inf"} 1.0215e+06
pulsar_client_producer_latency_seconds_sum 6765.011031000657
pulsar_client_producer_latency_seconds_count 1.0215e+06
# HELP pulsar_client_producer_pending_bytes Counter of bytes pending to be published by the client
# TYPE pulsar_client_producer_pending_bytes gauge
pulsar_client_producer_pending_bytes 0
# HELP pulsar_client_producer_pending_messages Counter of messages pending to be published by the client
# TYPE pulsar_client_producer_pending_messages gauge
pulsar_client_producer_pending_messages 0
# HELP pulsar_client_producers_closed Counter of producers closed by the client
# TYPE pulsar_client_producers_closed counter
pulsar_client_producers_closed 0
# HELP pulsar_client_producers_opened Counter of producers created by the client
# TYPE pulsar_client_producers_opened counter
pulsar_client_producers_opened 1
# HELP pulsar_client_producers_partitions_active Counter of individual partitions the producers are currently active
# TYPE pulsar_client_producers_partitions_active gauge
pulsar_client_producers_partitions_active 1
# HELP pulsar_client_readers_closed Counter of readers closed by the client
# TYPE pulsar_client_readers_closed counter
pulsar_client_readers_closed 0
# HELP pulsar_client_readers_opened Counter of readers created by the client
# TYPE pulsar_client_readers_opened counter
pulsar_client_readers_opened 0
# HELP pulsar_client_rpc_count Counter of RPC requests made by the client
# TYPE pulsar_client_rpc_count counter
pulsar_client_rpc_count 3

@merlimat merlimat added this to the 0.2.0 milestone Jul 8, 2020
@merlimat merlimat self-assigned this Jul 8, 2020
Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@merlimat merlimat merged commit 220dcb4 into apache:master Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants