Skip to main content

Event Hub Analyzer

Event Hub Analyzer is a small command line tool that can be used to analyze certain aspects of Event Hubs.

Installation

pip install eventhub-analyzer

Checkpoints per partition

For every event hub, consumer group, the number of events/sequence numbers between two invocations is retrieved and the throughput per partition is calculated. This can be used to determine if the load is correctly distributed among partitions.

When there are some partition that get little to no throughput while others have large throughput, it is a sign that the partition key is not chosen optimally and that you should try to choose a property with a higher cardinality as the partition key.

Usage

eventhub-analyzer checkpoints -n CONTAINER_NAME -c CONNECTION_STRING

You can also specify the settings via environment variables:

export STORAGE_ACCOUNT_CONNECTION_STRING='DefaultEndpointsProtocol=https;AccountName=x;AccountKey=y;EndpointSuffix=core.windows.net'
export CONTAINER_NAME='event-hub-offsets'
eventhub-analyzer checkpoints

Example output

Event Hub: telemetry, Consumer Group: my-consumer
Event Hub   Consumer Group   Partition   Events per second
telemetry   my-consumer              0             158.034
telemetry   my-consumer              1             203.257
telemetry   my-consumer              2             148.103
telemetry   my-consumer              3               0.000
telemetry   my-consumer              4             201.780
telemetry   my-consumer              5             106.081
telemetry   my-consumer              6              72.307
telemetry   my-consumer              7             160.783
telemetry   my-consumer              8             118.351

As you can see, partition 3 is not getting any events and the number of events is not well distributed overall. There might be some gains possible by choosing a different partition key (or by partitioning manually on the client).

Clearing checkpoints

Example:

eventhub-analyzer clear-checkpoints --consumer-group redis-timeseries

Publishing

poetry build
poetry publish

Metadata

Release files for eventhub-analyzer 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eventhub-analyzer 0.6.1
File Size Uploaded Provenance Actions
eventhub_analyzer-0.6.1.tar.gz 5.3 kB Without provenance Details for eventhub_analyzer-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eventhub-analyzer 0.6.1
File Interpreter ABI Platform Actions
eventhub_analyzer-0.6.1-py3-none-any.whl Python 3 none any Details for eventhub_analyzer-0.6.1-py3-none-any.whl

Total release size: 10.9 kB

Release files / eventhub_analyzer-0.6.1.tar.gz

Download URL eventhub_analyzer-0.6.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
595ad22cbd9593ed76dd262c30c383238547c5637712db319a7e94448396407d
BLAKE2b-256 checksum
How to use checksums
d034e58bc7c86ef3d2b3a50a9f99af56cfb0dad21c4b0eb27aad449cf121cfa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.12 Linux/5.19.0-46-generic

Release files / eventhub_analyzer-0.6.1-py3-none-any.whl

Download URL eventhub_analyzer-0.6.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b22f60f11e3b6fa415696743cd4efb65fc387e36b924429d4c7360cfd3c0bb3d
BLAKE2b-256 checksum
How to use checksums
a9c75e1fac2d2e7fec03ff66ad8a8556231f09a7a89259d32b8210624eda0aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.12 Linux/5.19.0-46-generic

Security for eventhub-analyzer 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page