Module prometheus

ballerinax/prometheus Ballerina library

1.0.0

Package Overview

The Prometheus Observability Extension is one of the metrics extensions of the Ballerina language.

It provides an implementation for exporting metrics to a Prometheus Server.

Enabling Prometheus Extension

To package the Prometheus extension into the Jar, follow the following steps.

  1. Add the following import to your program.
Copy
import ballerinax/prometheus as _;
  1. Add the following to the Ballerina.toml when building your program.
Copy
[package]
org = "my_org"
name = "my_package"
version = "1.0.0"

[build-options]
observabilityIncluded=true

To enable the extension and export metrics to Prometheus, add the following to the Config.toml when running your program.

Copy
[ballerina.observe]
metricsEnabled=true
metricsReporter="prometheus"

[ballerinax.prometheus]
host="127.0.0.1"  # Optional Configuration. Default value is localhost
port=9797         # Optional Configuration. Default value is 9797

Import

import ballerinax/prometheus;Copy

Metadata

Released date: 5 days ago

Version: 1.0.0


Compatibility

Platform: any

Ballerina version: 2201.11.0

GraalVM compatible: Yes


Pull count

Total: 5564

Current verison: 49


Weekly downloads


Other versions

See more...