#[non_exhaustive]pub struct RUMAggregateRequest {
pub compute: Option<Vec<RUMCompute>>,
pub filter: Option<RUMQueryFilter>,
pub group_by: Option<Vec<RUMGroupBy>>,
pub options: Option<RUMQueryOptions>,
pub page: Option<RUMQueryPageOptions>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The object sent with the request to retrieve aggregation buckets of RUM events from your organization.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.compute: Option<Vec<RUMCompute>>
The list of metrics or timeseries to compute for the retrieved buckets.
filter: Option<RUMQueryFilter>
The search and filter query settings.
group_by: Option<Vec<RUMGroupBy>>
The rules for the group by.
options: Option<RUMQueryOptions>
Global query options that are used during the query. Note: Only supply timezone or time offset, not both. Otherwise, the query fails.
page: Option<RUMQueryPageOptions>
Paging attributes for listing events.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl RUMAggregateRequest
impl RUMAggregateRequest
Sourcepub fn new() -> RUMAggregateRequest
pub fn new() -> RUMAggregateRequest
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (line 16)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn compute(self, value: Vec<RUMCompute>) -> Self
pub fn compute(self, value: Vec<RUMCompute>) -> Self
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (lines 17-19)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn filter(self, value: RUMQueryFilter) -> Self
pub fn filter(self, value: RUMQueryFilter) -> Self
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (lines 20-25)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn group_by(self, value: Vec<RUMGroupBy>) -> Self
pub fn group_by(self, value: Vec<RUMGroupBy>) -> Self
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (lines 26-28)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn options(self, value: RUMQueryOptions) -> Self
pub fn options(self, value: RUMQueryOptions) -> Self
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (line 29)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn page(self, value: RUMQueryPageOptions) -> Self
pub fn page(self, value: RUMQueryPageOptions) -> Self
Examples found in repository?
examples/v2_rum_AggregateRUMEvents.rs (line 30)
15async fn main() {
16 let body = RUMAggregateRequest::new()
17 .compute(vec![RUMCompute::new(RUMAggregationFunction::PERCENTILE_90)
18 .metric("@view.time_spent".to_string())
19 .type_(RUMComputeType::TOTAL)])
20 .filter(
21 RUMQueryFilter::new()
22 .from("now-15m".to_string())
23 .query("@type:view AND @session.type:user".to_string())
24 .to("now".to_string()),
25 )
26 .group_by(vec![RUMGroupBy::new("@view.time_spent".to_string())
27 .limit(10)
28 .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))])
29 .options(RUMQueryOptions::new().timezone("GMT".to_string()))
30 .page(RUMQueryPageOptions::new().limit(25));
31 let configuration = datadog::Configuration::new();
32 let api = RUMAPI::with_config(configuration);
33 let resp = api.aggregate_rum_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for RUMAggregateRequest
impl Clone for RUMAggregateRequest
Source§fn clone(&self) -> RUMAggregateRequest
fn clone(&self) -> RUMAggregateRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RUMAggregateRequest
impl Debug for RUMAggregateRequest
Source§impl Default for RUMAggregateRequest
impl Default for RUMAggregateRequest
Source§impl<'de> Deserialize<'de> for RUMAggregateRequest
impl<'de> Deserialize<'de> for RUMAggregateRequest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RUMAggregateRequest
impl PartialEq for RUMAggregateRequest
Source§impl Serialize for RUMAggregateRequest
impl Serialize for RUMAggregateRequest
impl StructuralPartialEq for RUMAggregateRequest
Auto Trait Implementations§
impl Freeze for RUMAggregateRequest
impl RefUnwindSafe for RUMAggregateRequest
impl Send for RUMAggregateRequest
impl Sync for RUMAggregateRequest
impl Unpin for RUMAggregateRequest
impl UnwindSafe for RUMAggregateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more