DevOps Metrics
Metrics enable you to monitor your cloud resources actively and passively.
You can monitor the performance of your resources by using metrics. This topic describes the metrics emitted by the following metric namespaces:
oci_devops_code_repos
(code repository)oci_devops_build
(build)oci_devops_deployment
(deployment)
- Time spent for each build run.
- Number of times builds have succeeded and failed.
- Time spent for each deployment.
- Number of times a deployment has failed.
- Number of code repositories.
- Number of pushes and pulls done on code repositories.
- Total size of the code repository.
- Build pipelines
- Build runs
- Deployment pipelines
- Deployments
- Code repositories
Prerequisites
To monitor resources, you must be given the required type of access in an IAM policy written by an administrator. Policies are required for using the Console, REST API, or SDK and CLI. The policy must give you access to the monitoring services and the resources being monitored. When you try to perform an action, you might get a message that you don't have permission or are unauthorized. Confirm with your administrator the type of access that you have been granted and which compartment you must work in. For more information about user authorizations for monitoring, see the Authentication and Authorization section in Overview of Monitoring.
The metrics listed on this page are automatically available for any DevOps instances that you create. You don't need to enable monitoring on the resource to get these metrics.
Available Metrics
DevOps metrics include the following dimensions:
projectId
: Project identifierprojectName
: Name of the DevOps projectbuildPipelineId
: Build pipeline identifierstageId
: Build stage identifierlifecycleState
: Current state of the build pipelinestageType
: Type of build stagerepositoryType
: Mirrored or Non mirrored (hosted)repositoryId
: Code repository identifierrepositoryName
: Code repository namepushType
: HTTP or SSHpullType
: HTTP or SSHdeployPipelineId
: Pipeline identifierdisplayName
: Name of the pipelinedeployStageId
: Stage identifierdeployStageName
: Stage name
Metric | Display Name | Unit | Description | Dimensions |
---|---|---|---|---|
BuildSuccess |
Successful Build Runs | Count | Number of times build runs have succeeded. |
|
BuildFailure |
Build Run Failures | Count | Number of times build runs have failed. |
|
BuildRunExecutionTime |
Build Run Duration | Seconds | Amount of time taken by builds. |
|
StageExecutionTime |
Stage Run Time | Seconds | Amount of time taken by stages. |
|
CodeRepositories |
Code Repositories Count | Count | Number of code repositories. |
|
CodeRepositoriesPushes |
Code Repositories Pushes | Count | Number of pushes done on code repositories. |
|
CodeRepositoriesPulls |
Code Repositories Pulls | Count | Number of pulls done on code repositories. |
|
CodeRepositorySize |
Code Repositories Size | Megabytes | Total size of the code repository. |
|
TimeInAcceptedState |
Time In Accepted State | Milliseconds | Amount of time the deployment was in an accepted state. |
|
DeploymentExecutionTime |
Deployment Execution Time | Milliseconds | Total amount of time the deployment took. |
|
StageTimeOut |
Stage Timeout | Timeouts | Number of times a stage timed out. |
|
DeploymentFailure |
Deployment Failures | 1 or 0
|
Number of times a deployment failed. |
|
Using the Console
Here's how you view the metric charts:
- In the Console, open the navigation menu. Under Observability & Management, go to Monitoring and click Service Metrics.
- Select the compartment that contains the DevOps code repositories, pipelines, and deployments whose performance you want to monitor.
- For Metric namespace, select
oci_devops_build
,oci_devops_deployment
, oroci_devops_code_repos
.
The Service Metrics page dynamically updates the page to show charts for each metric that the selected metric namespace emits.
Using the API
To monitor the metrics, use the Monitoring API .
For information about using the API and signing requests, see REST APIs and Security Credentials.