Observability
Build controller observability
Abstract
Chapter 1. Logging
When a build fails or behaves unexpectedly, accessing detailed logs can help you identify the issue. The logs provide information about what happened during the build run.
1.1. Viewing logs
You can view the logs of a build run to identify any runtime errors and to resolve them.
Prerequisites
-
You have installed the
ocCLI. -
Optional: You have installed the
shpCLI.
Procedure
View logs of a build run by using one of the CLIs:
Using
ocCLI$ oc logs <buildrun_resource_name>
Using
shpCLI$ shp buildrun logs <buildrun_resource_name>
Chapter 2. Monitoring
Builds exposes several metrics to help you monitor the performance and functioning of your build resources. The build controller metrics are exposed on the port 8383.
2.1. Build controller metrics
You can check the following build controller metrics for monitoring purposes:
Table 2.1. Build controller metrics
| Name | Type | Description | Labels | Status |
|---|---|---|---|---|
|
| Counter | The number of total registered builds. |
| experimental |
|
| Counter | The number of total completed build runs. |
| experimental |
|
| Histogram | The build run establish duration in seconds. |
| experimental |
|
| Histogram | The build run completion duration in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration for a task run in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration for a task run pod in seconds. |
| experimental |
2.1.1. Histogram metrics
To use custom buckets for the build controller, you must set the environment variable for a particular histogram metric. The following table shows the environment variables for all histogram metrics:
Table 2.2. Histogram metrics
| Metric | Environment variable | Default |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|