KrakenD framework joins the Linux Foundation. Read more.

Community docs (current)

Recent changes

Exporting metrics to Prometheus

Prometheus is an open-source systems monitoring and alerting toolkit.

The Opencensus exporter allows you to expose data to Prometheus. Enabling it only requires you to include in the root level of your configuration the Opencensus middleware with the prometheus exporter. Specify the port which Prometheus should hit, the namespace (optional), and Prometheus will start receiving the data.

{
  "version": 2,
  "extra_config": {
    "github_com/devopsfaith/krakend-opencensus": {
        "exporters": {
          "prometheus": {
              "port": 9091,
              "namespace": "krakend",
              "tag_host": false,
              "tag_path": true,
              "tag_method": true,
              "tag_statuscode": false
          }
      }
    }
  }
}

  • port on which the Prometheus exporter should listen
  • namespace sets the domain the metric belongs to. Optional field.

Optional fields (default to false):

  • tag_host (bool): Whether to send the host as a metric or not.
  • tag_path (bool): Whether to send the path as a metric or not. Client metrics are reported as: /hello/:hello/:world and backend metrics are reported as: /{hello}/{world}. Paths are case insensitive, all metrics are reported lowercased.
  • tag_method (bool): Whether to send the HTTP method as a metric or not.
  • tag_statuscode (bool): Whether to send the status code as a metric or not.

See also the additional settings of the Opencensus module that can be declared.

Unresolved issues?

The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.

We use cookies to understand how you use our site and to improve your overall experience. By continuing to use our site, you accept our Privacy Policy. More information