News Automating License Validity Checks with KrakenD

Community Documentation

Recent changes

OpenCensus Agent

Document updated on Oct 24, 2022

OpenCensus is no longer mantained

KrakenD has traditionally offered its telemetry integration through this OpenCensus component, which has provided reliable service for over six years, but now has transitioned to the more modern and robust OpenTelemetry framework.

As a result of a change in the industry, the OpenCensus integration is no longer mantained, we recommend you to migrate to OpenTelemetry.

The ocagent exporter sends OpenCensus Stats and Traces to the OpenCensus Agent, instead of pushing data to backends’ exporters.

For instance, you can enable ocagent to upload data to the OpenCensus Agent, and from there, the agent is simply scraped by a Prometheus.

You can integrate the OpenCensus Agent with Azure Monitor, Jaeger, or Prometheus to name a few examples.

Enabling it only requires you to add the ocagent exporter in the opencensus module.

The following configuration snippet sends the data:

  "extra_config": {
    "telemetry/opencensus": {
      "sample_rate": 100,
      "reporting_period": 0,
      "exporters": {
       "ocagent": {
          "address": "collector",
          "service_name": "krakend",
          "reconnection": "2s",
           "insecure": false,
          "enable_compression": true,
          "headers": {
            "header1": "value1"

As with all OpenCensus exporters, you can add optional settings in the telemetry/opencensus level:

Fields of "telemetry/opencensus"
* required fields

Lets you specify what data you want to export. All layers are enabled by default unless you declare this section.

Reports the activity between KrakenD and your services
Defaults to false

Reports the activity at the beginning of the proxy layer. It gives a more detailed view of the internals of the pipe between end-users and KrakenD, having into account merging of different backends.
Defaults to false

Reports the activity between end-users and KrakenD
Defaults to false

The number of seconds passing between reports. If duration is less than or equal to zero, it enables the default behavior of each exporter.
Defaults to 0

A number between 0 (no requests at all) and 100 (all requests) representing the percentage of sampled requests you want to send to the exporter. Sampling the 100% of the requests is generally discouraged when the relationship between traffic and dedicated resources is sparse.
Defaults to 0

Then, the exporters key must contain an ocagent entry with the following properties:

Fields of "telemetry/opencensus": { "exporters":{} }
* required fields

Exporting metrics, logs, and events to the OpenCensus Agent.
address  *

The address of your Azure Monitor collector.
Example: "localhost:55678"

Whether to send data compressed or not.
Defaults to false

List of keys and values for the headers sent. Keys and values must be of type string.
Example: {"header1":"value1"}

Whether the connection can be established in plain (insecure) or not.
Defaults to false

The reconnection time
Specify units using ns (nanoseconds), us or µs (microseconds), ms (milliseconds), s (seconds), m (minutes), or h (hours).
Defaults to "2s"
service_name  *

An identifier of your service, e.g, krakend.

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.