Skip to main content

No project description provided

Project description

lf-metric-emitter

GitHub release (latest SemVer) GitHub Workflow Status

This tool encapsulates the code needed to emit metrics to the Sasquatch InfluxDB stack. https://sasquatch.lsst.io/index.html

To utilize this tool, two environment variables must be set:

  1. BENCHMARK_ENV should be set to something consistent, for instance, github-ci, epic, local-desktop-1, etc.
  2. KAFKA_API_URL should be set to the full url. See the Sasquatch documentation for the specific URL.

You'll also need to manually create a Kafka topic to receive the metrics that are emitted. Again, see the Sasquatch documentation for instructions.

With the Kafka topic created, and the environmental variables, metrics can be emitted like so:

# result from a timing bench mark
my_result = 42.0

emitter = Emitter(namespace='lsst.lf',
                 name='ssppIncubator.bench',
                 module='PPApplyColourOffset',
                 benchmark_type:'runtime',
                 benchmark_unit:'s')


emitter.set_value(my_result)
emitter.emit()

Template

This project was automatically generated using the LINCC-Frameworks python-project-template.

For more information about the project template see the For more information about the project template see the documentation.

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

lf-metric-emitter-0.0.3.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

lf_metric_emitter-0.0.3-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

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