pub struct DORAMetricsAPI { /* private fields */ }
Expand description
Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the DORA Metrics page for more information.
Note: DORA Metrics are not available in the US1-FED site.
Implementations§
Source§impl DORAMetricsAPI
impl DORAMetricsAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
10async fn main() {
11 let body = DORADeploymentRequest::new(DORADeploymentRequestData::new(
12 DORADeploymentRequestAttributes::new(
13 1693491984000000000,
14 "shopist".to_string(),
15 1693491974000000000,
16 )
17 .git(DORAGitInfo::new(
18 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
19 "https://github.com/organization/example-repository".to_string(),
20 ))
21 .version("v1.12.07".to_string()),
22 ));
23 let configuration = datadog::Configuration::new();
24 let api = DORAMetricsAPI::with_config(configuration);
25 let resp = api.create_dora_deployment(body).await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
10async fn main() {
11 let body = DORAFailureRequest::new(DORAFailureRequestData::new(
12 DORAFailureRequestAttributes::new(1707842944500000000)
13 .finished_at(1707842944600000000)
14 .git(DORAGitInfo::new(
15 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
16 "https://github.com/organization/example-repository".to_string(),
17 ))
18 .name("Webserver is down failing all requests".to_string())
19 .services(vec!["shopist".to_string()])
20 .severity("High".to_string())
21 .team("backend".to_string())
22 .version("v1.12.07".to_string()),
23 ));
24 let configuration = datadog::Configuration::new();
25 let api = DORAMetricsAPI::with_config(configuration);
26 let resp = api.create_dora_incident(body).await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_dora_deployment(
&self,
body: DORADeploymentRequest,
) -> Result<DORADeploymentResponse, Error<CreateDORADeploymentError>>
pub async fn create_dora_deployment( &self, body: DORADeploymentRequest, ) -> Result<DORADeploymentResponse, Error<CreateDORADeploymentError>>
Use this API endpoint to provide data about deployments for DORA metrics.
This is necessary for:
- Deployment Frequency
- Change Lead Time
- Change Failure Rate
Examples found in repository?
10async fn main() {
11 let body = DORADeploymentRequest::new(DORADeploymentRequestData::new(
12 DORADeploymentRequestAttributes::new(
13 1693491984000000000,
14 "shopist".to_string(),
15 1693491974000000000,
16 )
17 .git(DORAGitInfo::new(
18 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
19 "https://github.com/organization/example-repository".to_string(),
20 ))
21 .version("v1.12.07".to_string()),
22 ));
23 let configuration = datadog::Configuration::new();
24 let api = DORAMetricsAPI::with_config(configuration);
25 let resp = api.create_dora_deployment(body).await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
Sourcepub async fn create_dora_deployment_with_http_info(
&self,
body: DORADeploymentRequest,
) -> Result<ResponseContent<DORADeploymentResponse>, Error<CreateDORADeploymentError>>
pub async fn create_dora_deployment_with_http_info( &self, body: DORADeploymentRequest, ) -> Result<ResponseContent<DORADeploymentResponse>, Error<CreateDORADeploymentError>>
Use this API endpoint to provide data about deployments for DORA metrics.
This is necessary for:
- Deployment Frequency
- Change Lead Time
- Change Failure Rate
Sourcepub async fn create_dora_failure(
&self,
body: DORAFailureRequest,
) -> Result<DORAFailureResponse, Error<CreateDORAFailureError>>
pub async fn create_dora_failure( &self, body: DORAFailureRequest, ) -> Result<DORAFailureResponse, Error<CreateDORAFailureError>>
Use this API endpoint to provide failure data for DORA metrics.
This is necessary for:
- Change Failure Rate
- Time to Restore
Examples found in repository?
11async fn main() {
12 let body = DORAFailureRequest::new(DORAFailureRequestData::new(
13 DORAFailureRequestAttributes::new(1693491974000000000)
14 .custom_tags(Some(vec![
15 "language:java".to_string(),
16 "department:engineering".to_string(),
17 ]))
18 .env("staging".to_string())
19 .finished_at(1693491984000000000)
20 .git(DORAGitInfo::new(
21 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
22 "https://github.com/organization/example-repository".to_string(),
23 ))
24 .name("Webserver is down failing all requests.".to_string())
25 .services(vec!["shopist".to_string()])
26 .severity("High".to_string())
27 .team("backend".to_string())
28 .version("v1.12.07".to_string()),
29 ));
30 let configuration = datadog::Configuration::new();
31 let api = DORAMetricsAPI::with_config(configuration);
32 let resp = api.create_dora_failure(body).await;
33 if let Ok(value) = resp {
34 println!("{:#?}", value);
35 } else {
36 println!("{:#?}", resp.unwrap_err());
37 }
38}
Sourcepub async fn create_dora_failure_with_http_info(
&self,
body: DORAFailureRequest,
) -> Result<ResponseContent<DORAFailureResponse>, Error<CreateDORAFailureError>>
pub async fn create_dora_failure_with_http_info( &self, body: DORAFailureRequest, ) -> Result<ResponseContent<DORAFailureResponse>, Error<CreateDORAFailureError>>
Use this API endpoint to provide failure data for DORA metrics.
This is necessary for:
- Change Failure Rate
- Time to Restore
Sourcepub async fn create_dora_incident(
&self,
body: DORAFailureRequest,
) -> Result<DORAFailureResponse, Error<CreateDORAIncidentError>>
pub async fn create_dora_incident( &self, body: DORAFailureRequest, ) -> Result<DORAFailureResponse, Error<CreateDORAIncidentError>>
Note: This endpoint is deprecated. Please use /api/v2/dora/failure
instead.
Use this API endpoint to provide failure data for DORA metrics.
This is necessary for:
- Change Failure Rate
- Time to Restore
Examples found in repository?
10async fn main() {
11 let body = DORAFailureRequest::new(DORAFailureRequestData::new(
12 DORAFailureRequestAttributes::new(1707842944500000000)
13 .finished_at(1707842944600000000)
14 .git(DORAGitInfo::new(
15 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
16 "https://github.com/organization/example-repository".to_string(),
17 ))
18 .name("Webserver is down failing all requests".to_string())
19 .services(vec!["shopist".to_string()])
20 .severity("High".to_string())
21 .team("backend".to_string())
22 .version("v1.12.07".to_string()),
23 ));
24 let configuration = datadog::Configuration::new();
25 let api = DORAMetricsAPI::with_config(configuration);
26 let resp = api.create_dora_incident(body).await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
More examples
10async fn main() {
11 let body = DORAFailureRequest::new(DORAFailureRequestData::new(
12 DORAFailureRequestAttributes::new(1693491974000000000)
13 .custom_tags(Some(vec![
14 "language:java".to_string(),
15 "department:engineering".to_string(),
16 ]))
17 .env("staging".to_string())
18 .finished_at(1693491984000000000)
19 .git(DORAGitInfo::new(
20 "66adc9350f2cc9b250b69abddab733dd55e1a588".to_string(),
21 "https://github.com/organization/example-repository".to_string(),
22 ))
23 .name("Webserver is down failing all requests.".to_string())
24 .services(vec!["shopist".to_string()])
25 .severity("High".to_string())
26 .team("backend".to_string())
27 .version("v1.12.07".to_string()),
28 ));
29 let configuration = datadog::Configuration::new();
30 let api = DORAMetricsAPI::with_config(configuration);
31 let resp = api.create_dora_incident(body).await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
Sourcepub async fn create_dora_incident_with_http_info(
&self,
body: DORAFailureRequest,
) -> Result<ResponseContent<DORAFailureResponse>, Error<CreateDORAIncidentError>>
pub async fn create_dora_incident_with_http_info( &self, body: DORAFailureRequest, ) -> Result<ResponseContent<DORAFailureResponse>, Error<CreateDORAIncidentError>>
Note: This endpoint is deprecated. Please use /api/v2/dora/failure
instead.
Use this API endpoint to provide failure data for DORA metrics.
This is necessary for:
- Change Failure Rate
- Time to Restore
Sourcepub async fn delete_dora_deployment(
&self,
deployment_id: String,
) -> Result<(), Error<DeleteDORADeploymentError>>
pub async fn delete_dora_deployment( &self, deployment_id: String, ) -> Result<(), Error<DeleteDORADeploymentError>>
Use this API endpoint to delete a deployment event.
Sourcepub async fn delete_dora_deployment_with_http_info(
&self,
deployment_id: String,
) -> Result<ResponseContent<()>, Error<DeleteDORADeploymentError>>
pub async fn delete_dora_deployment_with_http_info( &self, deployment_id: String, ) -> Result<ResponseContent<()>, Error<DeleteDORADeploymentError>>
Use this API endpoint to delete a deployment event.
Sourcepub async fn delete_dora_failure(
&self,
failure_id: String,
) -> Result<(), Error<DeleteDORAFailureError>>
pub async fn delete_dora_failure( &self, failure_id: String, ) -> Result<(), Error<DeleteDORAFailureError>>
Use this API endpoint to delete a failure event.
Sourcepub async fn delete_dora_failure_with_http_info(
&self,
failure_id: String,
) -> Result<ResponseContent<()>, Error<DeleteDORAFailureError>>
pub async fn delete_dora_failure_with_http_info( &self, failure_id: String, ) -> Result<ResponseContent<()>, Error<DeleteDORAFailureError>>
Use this API endpoint to delete a failure event.
Sourcepub async fn get_dora_deployment(
&self,
deployment_id: String,
) -> Result<DORAFetchResponse, Error<GetDORADeploymentError>>
pub async fn get_dora_deployment( &self, deployment_id: String, ) -> Result<DORAFetchResponse, Error<GetDORADeploymentError>>
Use this API endpoint to get a deployment event.
Sourcepub async fn get_dora_deployment_with_http_info(
&self,
deployment_id: String,
) -> Result<ResponseContent<DORAFetchResponse>, Error<GetDORADeploymentError>>
pub async fn get_dora_deployment_with_http_info( &self, deployment_id: String, ) -> Result<ResponseContent<DORAFetchResponse>, Error<GetDORADeploymentError>>
Use this API endpoint to get a deployment event.
Sourcepub async fn get_dora_failure(
&self,
failure_id: String,
) -> Result<DORAFetchResponse, Error<GetDORAFailureError>>
pub async fn get_dora_failure( &self, failure_id: String, ) -> Result<DORAFetchResponse, Error<GetDORAFailureError>>
Use this API endpoint to get a failure event.
Sourcepub async fn get_dora_failure_with_http_info(
&self,
failure_id: String,
) -> Result<ResponseContent<DORAFetchResponse>, Error<GetDORAFailureError>>
pub async fn get_dora_failure_with_http_info( &self, failure_id: String, ) -> Result<ResponseContent<DORAFetchResponse>, Error<GetDORAFailureError>>
Use this API endpoint to get a failure event.
Sourcepub async fn list_dora_deployments(
&self,
body: DORAListDeploymentsRequest,
) -> Result<DORAListResponse, Error<ListDORADeploymentsError>>
pub async fn list_dora_deployments( &self, body: DORAListDeploymentsRequest, ) -> Result<DORAListResponse, Error<ListDORADeploymentsError>>
Use this API endpoint to get a list of deployment events.
Examples found in repository?
11async fn main() {
12 let body = DORAListDeploymentsRequest::new(
13 DORAListDeploymentsRequestData::new(
14 DORAListDeploymentsRequestAttributes::new()
15 .from(
16 DateTime::parse_from_rfc3339("2025-03-23T00:00:00+00:00")
17 .expect("Failed to parse datetime")
18 .with_timezone(&Utc),
19 )
20 .limit(1)
21 .to(DateTime::parse_from_rfc3339("2025-03-24T00:00:00+00:00")
22 .expect("Failed to parse datetime")
23 .with_timezone(&Utc)),
24 )
25 .type_(DORAListDeploymentsRequestDataType::DORA_DEPLOYMENTS_LIST_REQUEST),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = DORAMetricsAPI::with_config(configuration);
29 let resp = api.list_dora_deployments(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Sourcepub async fn list_dora_deployments_with_http_info(
&self,
body: DORAListDeploymentsRequest,
) -> Result<ResponseContent<DORAListResponse>, Error<ListDORADeploymentsError>>
pub async fn list_dora_deployments_with_http_info( &self, body: DORAListDeploymentsRequest, ) -> Result<ResponseContent<DORAListResponse>, Error<ListDORADeploymentsError>>
Use this API endpoint to get a list of deployment events.
Sourcepub async fn list_dora_failures(
&self,
body: DORAListFailuresRequest,
) -> Result<DORAListResponse, Error<ListDORAFailuresError>>
pub async fn list_dora_failures( &self, body: DORAListFailuresRequest, ) -> Result<DORAListResponse, Error<ListDORAFailuresError>>
Use this API endpoint to get a list of failure events.
Examples found in repository?
11async fn main() {
12 let body = DORAListFailuresRequest::new(
13 DORAListFailuresRequestData::new(
14 DORAListFailuresRequestAttributes::new()
15 .from(
16 DateTime::parse_from_rfc3339("2025-03-23T00:00:00+00:00")
17 .expect("Failed to parse datetime")
18 .with_timezone(&Utc),
19 )
20 .limit(1)
21 .to(DateTime::parse_from_rfc3339("2025-03-24T00:00:00+00:00")
22 .expect("Failed to parse datetime")
23 .with_timezone(&Utc)),
24 )
25 .type_(DORAListFailuresRequestDataType::DORA_FAILURES_LIST_REQUEST),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = DORAMetricsAPI::with_config(configuration);
29 let resp = api.list_dora_failures(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Sourcepub async fn list_dora_failures_with_http_info(
&self,
body: DORAListFailuresRequest,
) -> Result<ResponseContent<DORAListResponse>, Error<ListDORAFailuresError>>
pub async fn list_dora_failures_with_http_info( &self, body: DORAListFailuresRequest, ) -> Result<ResponseContent<DORAListResponse>, Error<ListDORAFailuresError>>
Use this API endpoint to get a list of failure events.
Trait Implementations§
Source§impl Clone for DORAMetricsAPI
impl Clone for DORAMetricsAPI
Source§fn clone(&self) -> DORAMetricsAPI
fn clone(&self) -> DORAMetricsAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more