|
This is unreleased documentation for SBOM Scanner 0.13-dev. |
OpenTelemetry Reference
This page lists the traces and metrics that SBOM Scanner exports. To enable the export, see OpenTelemetry.
|
Prometheus stores the metrics with underscores instead of dots.
Prometheus also adds a unit suffix to some names.
For example, |
Trace model
One scan produces one trace.
The trace context travels with the job object, in the sbomscanner.kubewarden.io/traceparent annotation.
The components write this annotation once, when the job is created, and never overwrite it.
A client that already has a trace can set the annotation on a new ScanJob.
Then the whole scan becomes part of the client trace.
Controller spans
| Span | When | Attributes |
|---|---|---|
|
Each reconcile of a watched resource |
|
|
The runner creates a scheduled |
|
|
The runner creates a scheduled |
|
|
Each validating admission request |
|
|
Each mutating admission request |
|
Controller metrics
| Metric | Type | Labels |
|---|---|---|
|
Counter |
|
|
Counter |
|
|
Counter |
|
|
Counter |
|
|
Counter |
|
The controller also exports the standard controller-runtime metrics over OTLP. These include the reconcile durations, the workqueue metrics, the rest-client metrics, and the Go runtime metrics.
Worker spans
| Span | When | Attributes |
|---|---|---|
|
Each consumed scan message (catalog, SBOM generation, scan) |
|
|
A message used all its delivery attempts |
|
|
Each Trivy invocation |
|
Worker metrics
| Metric | Type | Labels |
|---|---|---|
|
Histogram |
|
|
Counter |
|
|
Histogram |
|
|
Histogram |
|
|
Counter |
|
The worker also exports the process metrics and the Go runtime metrics.
Storage spans
| Span | When | Attributes |
|---|---|---|
|
Each resource request to the storage API server |
Standard HTTP server attributes |
|
Each storage operation ( |
|
|
Each SQL query |
Standard database client attributes, and the SQL statement text |
|
A write publishes a watch event to NATS |
|
|
A replica consumes a watch event |
|
|
A |
|
|
The SQL statement text contains placeholders, for example |
Storage metrics
| Metric | Type | Labels |
|---|---|---|
|
Histogram |
|
|
Counter |
|
The storage component also exports the standard http.server.request.duration histogram, the db.client.operation.duration histogram, the database connection pool metrics, the process metrics, and the Go runtime metrics.
Exemplars
The histograms carry exemplars. An exemplar is one real measurement with the ID of the trace that produced it. A backend with exemplar support can link a latency panel directly to the trace.