KrakenD

Supported OS Linux Windows Mac OS

Integration version1.0.0

Overview

This check monitors KrakenD through the Datadog Agent.

KrakenD is a high-performance API gateway that provides a single entry point for microservices. This integration collects metrics using KrakenD’s OpenTelemetry exporter with Prometheus format and supports log collection for comprehensive monitoring.

What this integration monitors

The integration collects metrics across multiple layers of the KrakenD gateway:

  • HTTP Server Layer: Request durations, response sizes, and status codes for client-facing traffic
  • Proxy Layer: Processing times and performance metrics for KrakenD’s internal proxy operations
  • Backend Layer: Connection times, response durations, error rates, DNS resolution, TLS handshakes, timeouts, and connection details for upstream service calls
  • Go Runtime: Garbage collection, memory usage, goroutines, and Go-specific performance metrics
  • System Process: CPU usage, memory consumption, file descriptors, and network I/O

Deployment support

This integration works with KrakenD in both containerized (Docker, Kubernetes) and traditional deployment environments.

Setup

Metrics

krakend.api.backend_duration.bucket
(count)
The number of backend requests within a duration bucket defined by the upper_bound tag. This includes the entire time spent on backend processing and data manipulation.
krakend.api.backend_duration.count
(count)
The total number of backend requests.
krakend.api.backend_duration.sum
(count)
The sum of durations for all backend requests.
Shown as second
krakend.api.go.gc_duration_seconds.count
(count)
A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
krakend.api.go.gc_duration_seconds.quantile
(gauge)
A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
Shown as second
krakend.api.go.gc_duration_seconds.sum
(count)
A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
Shown as second
krakend.api.go.gc_gogc_percent
(gauge)
Heap size target percentage configured by the user, otherwise 100.
Shown as percent
krakend.api.go.gc_gomemlimit_bytes
(gauge)
Go runtime memory limit configured by the user, otherwise math.MaxInt64.
Shown as byte
krakend.api.go.goroutines
(gauge)
Number of goroutines that currently exist.
krakend.api.go.info
(gauge)
Information about the Go environment.
krakend.api.go.memstats.alloc_bytes
(gauge)
Number of bytes allocated and still in use.
Shown as byte
krakend.api.go.memstats.buck_hash_sys_bytes
(gauge)
Number of bytes used by the profiling bucket hash table.
Shown as byte
krakend.api.go.memstats.frees.count
(count)
Total number of frees.
krakend.api.go.memstats.gc_sys_bytes
(gauge)
Number of bytes used for garbage collection system metadata.
Shown as byte
krakend.api.go.memstats.heap_alloc_bytes
(gauge)
Number of heap bytes allocated and still in use.
Shown as byte
krakend.api.go.memstats.heap_idle_bytes
(gauge)
Number of heap bytes waiting to be used.
Shown as byte
krakend.api.go.memstats.heap_inuse_bytes
(gauge)
Number of heap bytes that are in use.
Shown as byte
krakend.api.go.memstats.heap_objects
(gauge)
Number of allocated objects.
krakend.api.go.memstats.heap_released_bytes
(gauge)
Number of heap bytes released to OS.
Shown as byte
krakend.api.go.memstats.heap_sys_bytes
(gauge)
Number of heap bytes obtained from system.
Shown as byte
krakend.api.go.memstats.last_gc_time_seconds
(gauge)
Number of seconds since 1970 of last garbage collection.
Shown as second
krakend.api.go.memstats.mallocs.count
(count)
Total number of mallocs.
krakend.api.go.memstats.mcache_inuse_bytes
(gauge)
Number of bytes in use by mcache structures.
Shown as byte
krakend.api.go.memstats.mcache_sys_bytes
(gauge)
Number of bytes used for mcache structures obtained from system.
Shown as byte
krakend.api.go.memstats.mspan_inuse_bytes
(gauge)
Number of bytes in use by mspan structures.
Shown as byte
krakend.api.go.memstats.mspan_sys_bytes
(gauge)
Number of bytes used for mspan structures obtained from system.
Shown as byte
krakend.api.go.memstats.next_gc_bytes
(gauge)
Number of heap bytes when next garbage collection will take place.
Shown as byte
krakend.api.go.memstats.other_sys_bytes
(gauge)
Number of bytes used for other system allocations.
Shown as byte
krakend.api.go.memstats.stack_inuse_bytes
(gauge)
Number of bytes in use by the stack allocator.
Shown as byte
krakend.api.go.memstats.stack_sys_bytes
(gauge)
Number of bytes obtained from system for stack allocator.
Shown as byte
krakend.api.go.memstats.sys_bytes
(gauge)
Number of bytes obtained from system.
Shown as byte
krakend.api.go.sched_gomaxprocs_threads
(gauge)
The current runtime.GOMAXPROCS setting.
krakend.api.go.threads
(gauge)
Number of OS threads created.
krakend.api.http_client.duration.bucket
(count)
The number of requests to the backend within a duration bucket defined by the upper_bound tag. This measures the time until the first byte of the response is received.
krakend.api.http_client.duration.count
(count)
The total number of HTTP client requests.
krakend.api.http_client.duration.sum
(count)
The sum of durations for all HTTP client requests.
Shown as second
krakend.api.http_client.request_canceled.count
(count)
Total number of canceled HTTP client requests.
krakend.api.http_client.request_dns_duration.bucket
(count)
The number of DNS lookups within a duration bucket defined by the upper_bound tag.
krakend.api.http_client.request_dns_duration.count
(count)
The total number of DNS lookups.
krakend.api.http_client.request_dns_duration.sum
(count)
The sum of durations for all DNS lookups.
Shown as second
krakend.api.http_client.request_failed.count
(count)
Total number of failed HTTP client requests.
krakend.api.http_client.request_get_conn_duration.bucket
(count)
The number of backend connections within a duration bucket defined by the upper_bound tag. This excludes data processing time.
krakend.api.http_client.request_get_conn_duration.count
(count)
The total number of successful backend connections.
krakend.api.http_client.request_get_conn_duration.sum
(count)
The sum of durations for all backend connections.
Shown as second
krakend.api.http_client.request_read_errors.count
(count)
Total number of errors reading the response body.
krakend.api.http_client.request_size.count
(count)
Total size of HTTP client requests.
Shown as byte
krakend.api.http_client.request_started.count
(count)
Total number of started HTTP client requests.
krakend.api.http_client.request_timedout.count
(count)
Total number of timed out HTTP client requests.
krakend.api.http_client.request_tls_duration.bucket
(count)
The number of TLS handshakes within a negotiation duration bucket defined by the upper_bound tag.
krakend.api.http_client.request_tls_duration.count
(count)
The total number of TLS handshakes for HTTP client requests.
krakend.api.http_client.request_tls_duration.sum
(count)
The sum of durations for all TLS handshakes for HTTP client requests.
Shown as second
krakend.api.http_client.response_no_content_length.count
(count)
Total number of HTTP client responses with no content length.
krakend.api.http_client.response_read_size.count
(count)
Total size of HTTP client responses read.
Shown as byte
krakend.api.http_client.response_read_size_hist.bucket
(count)
The number of backend responses within a size bucket defined by the upper_bound tag.
krakend.api.http_client.response_read_size_hist.count
(count)
The total number of backend response reads.
krakend.api.http_client.response_read_size_hist.sum
(count)
The total read size of all backend responses.
Shown as byte
krakend.api.http_client.response_read_time_hist_seconds.bucket
(count)
The number of backend response reads within a time bucket defined by the upper_bound tag.
krakend.api.http_client.response_read_time_hist_seconds.count
(count)
The total number of backend response reads.
krakend.api.http_client.response_read_time_hist_seconds.sum
(count)
The total time spent reading all backend responses.
Shown as second
krakend.api.http_client.response_read_time_seconds.count
(count)
Total time spent reading HTTP client responses.
Shown as second
krakend.api.http_server.duration.bucket
(count)
The number of requests served by KrakenDwithin a duration bucket defined by the upper_bound tag. This includes the total request processing time.
krakend.api.http_server.duration.count
(count)
The total number of requests received by the KrakenD endpoint.
krakend.api.http_server.duration.sum
(count)
The sum of durations for all requests received by the KrakenD endpoint.
Shown as second
krakend.api.http_server.response_size.bucket
(count)
The number of requests within a response size bucket defined by the upper_bound tag.
Shown as byte
krakend.api.http_server.response_size.count
(count)
The total number of requests received by the KrakenD endpoint.
krakend.api.http_server.response_size.sum
(count)
The sum of sizes for all responses.
Shown as byte
krakend.api.otel_scope_info
(gauge)
Instrumentation Scope metadata.
krakend.api.process.cpu_seconds.count
(count)
Total user and system CPU time spent in seconds.
Shown as second
krakend.api.process.max_fds
(gauge)
Maximum number of open file descriptors.
krakend.api.process.network_receive_bytes.count
(count)
Number of bytes received by the process over the network.
Shown as byte
krakend.api.process.network_transmit_bytes.count
(count)
Number of bytes sent by the process over the network.
Shown as byte
krakend.api.process.open_fds
(gauge)
Number of open file descriptors.
krakend.api.process.resident_memory_bytes
(gauge)
Resident memory size in bytes.
Shown as byte
krakend.api.process.start_time_seconds
(gauge)
Start time of the process since unix epoch in seconds.
Shown as second
krakend.api.process.virtual_memory_bytes
(gauge)
Virtual memory size in bytes.
Shown as byte
krakend.api.process.virtual_memory_max_bytes
(gauge)
Maximum amount of virtual memory available in bytes.
Shown as byte
krakend.api.proxy_duration.bucket
(count)
The number of proxy requests within a duration bucket defined by the upper_bound tag.
krakend.api.proxy_duration.count
(count)
The total number of proxy requests.
krakend.api.proxy_duration.sum
(count)
The sum of durations for all proxy requests.
Shown as second

Logs

Ensure the agent is configured to load logs following the instructions about Log Collection and Integrations.

To enable collection of KrakenD access and application logs, uncomment this section in the integration configuration file, replacing <SERVICE> with the service to associate the logs with:

logs:
  - type: docker
    source: krakend
    service: <SERVICE>

Alternatively, in containerized environments, you can use Autodiscovery (for example, see Docker or Kubernetes) to add the logs configuration through annotations to the container or node where KrakenD is running.

Uninstallation

To disable the integration, rename the configuration file from krakend.yaml to krakend.yaml.example. Alternatively, if you are running a containerized environment, you can remove the annotation used to enable the integration.

Support

Need help? Contact Datadog support.