Skip to content

Knative Eventing Metrics

Warning

The metrics below have not been updated to reflect our migration from OpenCensus to OpenTelemetry. We are in the process of updating them.

These metrics may change as we flush out our migration from OpenCensus to OpenTelemetry.

Administrators can view metrics for Knative Eventing components.

Broker - Ingress

Use the following metrics to debug how broker ingress performs and what events are dispatched via the ingress component.

By aggregating the metrics over the http code, events can be separated into two classes, successful (2xx) and failed events (5xx).

Metric Name Description Type Tags Unit Status
event_count Number of events received by a Broker Counter broker_name
event_type
namespace_name
response_code
response_code_class
unique_name
Dimensionless Stable
event_dispatch_latencies The time spent dispatching an event to a Channel Histogram broker_name
event_type
namespace_name
response_code
response_code_class
unique_name
Milliseconds Stable

Broker - Filter

Use the following metrics to debug how broker filter performs and what events are dispatched via the filter component. Also user can measure the latency of the actual filtering action on an event. By aggregating the metrics over the http code, events can be separated into two classes, successful (2xx) and failed events (5xx).

Metric Name Description Type Tags Unit Status
event_count Number of events received by a Broker Counter broker_name
container_name=
filter_type
namespace_name
response_code
response_code_class
trigger_name
unique_name
Dimensionless Stable
event_dispatch_latencies The time spent dispatching an event to a Channel Histogram broker_name
container_name
filter_type
namespace_name
response_code
response_code_class
trigger_name
unique_name
Milliseconds Stable
event_processing_latencies The time spent processing an event before it is dispatched to a Trigger subscriber Histogram broker_name
container_name
filter_type
namespace_name
trigger_name
unique_name
Milliseconds Stable

In-memory Dispatcher

In-memory channel can be evaluated via the following metrics. By aggregating the metrics over the http code, events can be separated into two classes, successful (2xx) and failed events (5xx).

Metric Name Description Type Tags Unit Status
event_count Number of events dispatched by the in-memory channel Counter container_name
event_type=
namespace_name=
response_code
response_code_class
unique_name
Dimensionless Stable
event_dispatch_latencies The time spent dispatching an event from a in-memory Channel Histogram container_name
event_type
namespace_name=
response_code
response_code_class
unique_name
Milliseconds Stable

Eventing sources

Eventing sources are created by users who own the related system, so they can trigger applications with events. Every source exposes by default a number of metrics to help user monitor events dispatched. Use the following metrics to verify that events have been delivered from the source side, thus verifying that the source and any connection with the source work as expected.

Metric Name Description Type Tags Unit Status
event_count Number of events sent by the source Counter event_source
event_type
name
namespace_name
resource_group
response_code
response_code_class
response_error
response_timeout
Dimensionless Stable
retry_event_count Number of events sent by the source in retries Counter event_source
event_type
name
namespace_name
resource_group
response_code
response_code_class
response_error
response_timeout
Dimensionless Stable

Webhook Metrics

Webhook metrics report useful info about operations. For example, if a large number of operations fail, this could indicate an issue with a user-created resource.

http.server.request.duration

Knative implements the semantic conventions for HTTP Servers using the OpenTelemetry otel-go/otelhttp package.

Please refer to the OpenTelemetry docs for details about the HTTP Server metrics it exports.

The following attributes are included with the metric

Name Type Description Examples
kn.webhook.type string Specifies the type of webhook invoked admission, defaulting, validation, conversion
kn.webhook.resource.group string Specifies the resource Kubernetes group name
kn.webhook.resource.version string Specifies the resource Kubernetes group version
kn.webhook.resource.kind string Specifies the resource Kubernetes group kind
kn.webhook.subresource string Specifies the subresource "" (empty), status, scale
kn.webhook.operation.type string Specifies the operation that invoked the webhook CREATE, UPDATE, DELETE
kn.webhook.operation.status string Specifies whether the operation was successful success, failed

kn.webhook.handler.duration

Instrument Type: Histogram

Unit ([UCUM): s

Description: The duration of task execution.

The following attributes are included with the metric

Name Type Description Examples
kn.webhook.type string Specifies the type of webhook invoked admission, defaulting, validation, conversion
kn.webhook.resource.group string Specifies the resource Kubernetes group name
kn.webhook.resource.version string Specifies the resource Kubernetes group version
kn.webhook.resource.kind string Specifies the resource Kubernetes group kind
kn.webhook.subresource string Specifies the subresource "" (empty), status, scale
kn.webhook.operation.type string Specifies the operation that invoked the webhook CREATE, UPDATE, DELETE
kn.webhook.operation.status string Specifies whether the operation was successful success, failed

Workqueue Metrics

Knative controllers expose client-go workqueue metrics

The following attributes are included with the metrics below

Name Type Description
name string Name of the work queue

kn.workqueue.depth

Instrument Type: Int64UpDownCounter

Unit (UCUM): {item}

Description: Number of current items in the queue

kn.workqueue.adds

Instrument Type: Int64Counter

Unit (UCUM): {item}

Description: Number of items added to the queue

kn.workqueue.queue.duration

Instrument Type:

Unit (UCUM): s

Description: How long an item stays in workqueue

kn.workqueue.process.duration

Instrument Type: Float64Histogram

Unit (UCUM): s

Description: How long in seconds processing an item from workqueue takes

kn.workqueue.unfinished_work

Instrument Type: Float64Gauge

Unit (UCUM): s

Description: How many seconds of work the reconciler has done that is in progress and hasn't been observed by duration. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases.

kn.workqueue.longest_running_processor

Instrument Type: Float64Gauge

Unit (UCUM): s

Description: How long the longest worker thread has been running

kn.workqueue.retries

Instrument Type: Int64Counter

Unit (UCUM): {item}

Description: Number of items re-added to the queue

Go Runtime

Knative implements the semantic conventions for Go runtime metrics using the OpenTelemetry otel-go/instrumentation/runtime package.

Please refer to the OpenTelemetry docs for details about the go runtime metrics it exports.

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.

× OK