ErrorTrackingAPI

Struct ErrorTrackingAPI 

Source
pub struct ErrorTrackingAPI { /* private fields */ }
Expand description

View and manage issues within Error Tracking. See the Error Tracking page for more information.

Implementations§

Source§

impl ErrorTrackingAPI

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v2_error-tracking_GetIssue.rs (line 11)
7async fn main() {
8    // there is a valid "issue" in the system
9    let issue_id = std::env::var("ISSUE_ID").unwrap();
10    let configuration = datadog::Configuration::new();
11    let api = ErrorTrackingAPI::with_config(configuration);
12    let resp = api
13        .get_issue(issue_id.clone(), GetIssueOptionalParams::default())
14        .await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}
More examples
Hide additional examples
examples/v2_error-tracking_UpdateIssueAssignee.rs (line 17)
9async fn main() {
10    // there is a valid "issue" in the system
11    let issue_id = std::env::var("ISSUE_ID").unwrap();
12    let body = IssueUpdateAssigneeRequest::new(IssueUpdateAssigneeRequestData::new(
13        "87cb11a0-278c-440a-99fe-701223c80296".to_string(),
14        IssueUpdateAssigneeRequestDataType::ASSIGNEE,
15    ));
16    let configuration = datadog::Configuration::new();
17    let api = ErrorTrackingAPI::with_config(configuration);
18    let resp = api.update_issue_assignee(issue_id.clone(), body).await;
19    if let Ok(value) = resp {
20        println!("{:#?}", value);
21    } else {
22        println!("{:#?}", resp.unwrap_err());
23    }
24}
examples/v2_error-tracking_UpdateIssueState.rs (line 20)
11async fn main() {
12    // there is a valid "issue" in the system
13    let issue_id = std::env::var("ISSUE_ID").unwrap();
14    let body = IssueUpdateStateRequest::new(IssueUpdateStateRequestData::new(
15        IssueUpdateStateRequestDataAttributes::new(IssueState::RESOLVED),
16        issue_id.clone(),
17        IssueUpdateStateRequestDataType::ERROR_TRACKING_ISSUE,
18    ));
19    let configuration = datadog::Configuration::new();
20    let api = ErrorTrackingAPI::with_config(configuration);
21    let resp = api.update_issue_state(issue_id.clone(), body).await;
22    if let Ok(value) = resp {
23        println!("{:#?}", value);
24    } else {
25        println!("{:#?}", resp.unwrap_err());
26    }
27}
examples/v2_error-tracking_SearchIssues.rs (line 23)
12async fn main() {
13    let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14        IssuesSearchRequestDataAttributes::new(
15            1671612804000,
16            "service:orders-* AND @language:go".to_string(),
17            1671620004000,
18        )
19        .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20        IssuesSearchRequestDataType::SEARCH_REQUEST,
21    ));
22    let configuration = datadog::Configuration::new();
23    let api = ErrorTrackingAPI::with_config(configuration);
24    let resp = api
25        .search_issues(body, SearchIssuesOptionalParams::default())
26        .await;
27    if let Ok(value) = resp {
28        println!("{:#?}", value);
29    } else {
30        println!("{:#?}", resp.unwrap_err());
31    }
32}
Source

pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self

Source

pub async fn get_issue( &self, issue_id: String, params: GetIssueOptionalParams, ) -> Result<IssueResponse, Error<GetIssueError>>

Retrieve the full details for a specific error tracking issue, including attributes and relationships.

Examples found in repository?
examples/v2_error-tracking_GetIssue.rs (line 13)
7async fn main() {
8    // there is a valid "issue" in the system
9    let issue_id = std::env::var("ISSUE_ID").unwrap();
10    let configuration = datadog::Configuration::new();
11    let api = ErrorTrackingAPI::with_config(configuration);
12    let resp = api
13        .get_issue(issue_id.clone(), GetIssueOptionalParams::default())
14        .await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}
Source

pub async fn get_issue_with_http_info( &self, issue_id: String, params: GetIssueOptionalParams, ) -> Result<ResponseContent<IssueResponse>, Error<GetIssueError>>

Retrieve the full details for a specific error tracking issue, including attributes and relationships.

Source

pub async fn search_issues( &self, body: IssuesSearchRequest, params: SearchIssuesOptionalParams, ) -> Result<IssuesSearchResponse, Error<SearchIssuesError>>

Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request.

Examples found in repository?
examples/v2_error-tracking_SearchIssues.rs (line 25)
12async fn main() {
13    let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14        IssuesSearchRequestDataAttributes::new(
15            1671612804000,
16            "service:orders-* AND @language:go".to_string(),
17            1671620004000,
18        )
19        .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20        IssuesSearchRequestDataType::SEARCH_REQUEST,
21    ));
22    let configuration = datadog::Configuration::new();
23    let api = ErrorTrackingAPI::with_config(configuration);
24    let resp = api
25        .search_issues(body, SearchIssuesOptionalParams::default())
26        .await;
27    if let Ok(value) = resp {
28        println!("{:#?}", value);
29    } else {
30        println!("{:#?}", resp.unwrap_err());
31    }
32}
Source

pub async fn search_issues_with_http_info( &self, body: IssuesSearchRequest, params: SearchIssuesOptionalParams, ) -> Result<ResponseContent<IssuesSearchResponse>, Error<SearchIssuesError>>

Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request.

Source

pub async fn update_issue_assignee( &self, issue_id: String, body: IssueUpdateAssigneeRequest, ) -> Result<IssueResponse, Error<UpdateIssueAssigneeError>>

Update the assignee of an issue by issue_id.

Examples found in repository?
examples/v2_error-tracking_UpdateIssueAssignee.rs (line 18)
9async fn main() {
10    // there is a valid "issue" in the system
11    let issue_id = std::env::var("ISSUE_ID").unwrap();
12    let body = IssueUpdateAssigneeRequest::new(IssueUpdateAssigneeRequestData::new(
13        "87cb11a0-278c-440a-99fe-701223c80296".to_string(),
14        IssueUpdateAssigneeRequestDataType::ASSIGNEE,
15    ));
16    let configuration = datadog::Configuration::new();
17    let api = ErrorTrackingAPI::with_config(configuration);
18    let resp = api.update_issue_assignee(issue_id.clone(), body).await;
19    if let Ok(value) = resp {
20        println!("{:#?}", value);
21    } else {
22        println!("{:#?}", resp.unwrap_err());
23    }
24}
Source

pub async fn update_issue_assignee_with_http_info( &self, issue_id: String, body: IssueUpdateAssigneeRequest, ) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueAssigneeError>>

Update the assignee of an issue by issue_id.

Source

pub async fn update_issue_state( &self, issue_id: String, body: IssueUpdateStateRequest, ) -> Result<IssueResponse, Error<UpdateIssueStateError>>

Update the state of an issue by issue_id. Use this endpoint to move an issue between states such as OPEN, RESOLVED, or IGNORED.

Examples found in repository?
examples/v2_error-tracking_UpdateIssueState.rs (line 21)
11async fn main() {
12    // there is a valid "issue" in the system
13    let issue_id = std::env::var("ISSUE_ID").unwrap();
14    let body = IssueUpdateStateRequest::new(IssueUpdateStateRequestData::new(
15        IssueUpdateStateRequestDataAttributes::new(IssueState::RESOLVED),
16        issue_id.clone(),
17        IssueUpdateStateRequestDataType::ERROR_TRACKING_ISSUE,
18    ));
19    let configuration = datadog::Configuration::new();
20    let api = ErrorTrackingAPI::with_config(configuration);
21    let resp = api.update_issue_state(issue_id.clone(), body).await;
22    if let Ok(value) = resp {
23        println!("{:#?}", value);
24    } else {
25        println!("{:#?}", resp.unwrap_err());
26    }
27}
Source

pub async fn update_issue_state_with_http_info( &self, issue_id: String, body: IssueUpdateStateRequest, ) -> Result<ResponseContent<IssueResponse>, Error<UpdateIssueStateError>>

Update the state of an issue by issue_id. Use this endpoint to move an issue between states such as OPEN, RESOLVED, or IGNORED.

Trait Implementations§

Source§

impl Clone for ErrorTrackingAPI

Source§

fn clone(&self) -> ErrorTrackingAPI

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorTrackingAPI

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ErrorTrackingAPI

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,