Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eventhub_analyzer-0.6.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eventhub_analyzer-0.6.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file eventhub_analyzer-0.6.1.tar.gz.

File metadata

  • Download URL: eventhub_analyzer-0.6.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/5.19.0-46-generic

File hashes

Hashes for eventhub_analyzer-0.6.1.tar.gz
Algorithm Hash digest
SHA256 595ad22cbd9593ed76dd262c30c383238547c5637712db319a7e94448396407d
MD5 bc18ead034a315eaf28d0d61b660d761
BLAKE2b-256 d034e58bc7c86ef3d2b3a50a9f99af56cfb0dad21c4b0eb27aad449cf121cfa5

See more details on using hashes here.

File details

Details for the file eventhub_analyzer-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: eventhub_analyzer-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/5.19.0-46-generic

File hashes

Hashes for eventhub_analyzer-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b22f60f11e3b6fa415696743cd4efb65fc387e36b924429d4c7360cfd3c0bb3d
MD5 cf52e85bb26e76345e8616ebdb4af151
BLAKE2b-256 a9c75e1fac2d2e7fec03ff66ad8a8556231f09a7a89259d32b8210624eda0aab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page