diff --git a/datadog/tests/cassettes/TestAccSpansMetricGroupBys.freeze b/datadog/tests/cassettes/TestAccSpansMetricGroupBys.freeze index ab0fc07948..d7880c02ec 100644 --- a/datadog/tests/cassettes/TestAccSpansMetricGroupBys.freeze +++ b/datadog/tests/cassettes/TestAccSpansMetricGroupBys.freeze @@ -1 +1 @@ -2023-04-21T11:28:25.434704+02:00 \ No newline at end of file +2024-07-09T11:55:36.526111+02:00 \ No newline at end of file diff --git a/datadog/tests/cassettes/TestAccSpansMetricGroupBys.yaml b/datadog/tests/cassettes/TestAccSpansMetricGroupBys.yaml index a7706882f1..5e4a9fd5ac 100644 --- a/datadog/tests/cassettes/TestAccSpansMetricGroupBys.yaml +++ b/datadog/tests/cassettes/TestAccSpansMetricGroupBys.yaml @@ -1,58 +1,71 @@ +--- version: 2 interactions: -- request: - body: | - {"data":{"attributes":{"compute":{"aggregation_type":"count"},"filter":{"query":"@http.status_code:200 service:my-service"},"group_by":[{"path":"resource_name1","tag_name":"my_resource1"},{"path":"resource_name2","tag_name":"my_resource2"}]},"id":"\"tf_TestAccSpansMetricGroupBys_local_1682069305\"","type":"spans_metrics"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - url: https://api.datadoghq.com/api/v2/apm/config/metrics - method: POST - id: 0 - response: - body: | - {"data":{"id":"tf_TestAccSpansMetricGroupBys_local_1682069305","attributes":{"filter":{"query":"@http.status_code:200 service:my-service"},"group_by":[{"path":"resource_name1","tag_name":"my_resource1"},{"path":"resource_name2","tag_name":"my_resource2"}],"compute":{"aggregation_type":"count"}},"type":"spans_metrics"}} - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: "0ms" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - url: https://api.datadoghq.com/api/v2/apm/config/metrics/tf_TestAccSpansMetricGroupBys_local_1682069305 - method: GET - id: 1 - response: - body: | - {"data":{"id":"tf_TestAccSpansMetricGroupBys_local_1682069305","attributes":{"filter":{"query":"@http.status_code:200 service:my-service"},"group_by":[{"path":"resource_name1","tag_name":"my_resource1"},{"path":"resource_name2","tag_name":"my_resource2"}],"compute":{"aggregation_type":"count"}},"type":"spans_metrics"}} - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: "0ms" -- request: - body: "" - form: {} - headers: - Accept: - - '*/*' - url: https://api.datadoghq.com/api/v2/apm/config/metrics/tf_TestAccSpansMetricGroupBys_local_1682069305 - method: DELETE - id: 2 - response: - body: "" - headers: - Content-Type: - - text/html; charset=utf-8 - status: 204 No Content - code: 204 - duration: "0ms" + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 347 + transfer_encoding: [] + trailer: {} + host: api.datad0g.com + remote_addr: "" + request_uri: "" + body: | + {"data":{"attributes":{"compute":{"aggregation_type":"count"},"filter":{"query":"@http.status_code:200 service:my-service @duration:\u003e600ms"},"group_by":[{"path":"resource_name1","tag_name":"my_resource1"},{"path":"resource_name2","tag_name":"my_resource2"}]},"id":"\"tf_TestAccSpansMetricGroupBys_local_1720518936\"","type":"spans_metrics"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + url: https://api.datad0g.com/api/v2/apm/config/metrics + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: | + {"data":{"id":"tf_TestAccSpansMetricGroupBys_local_1720518936","attributes":{"filter":{"query":"@http.status_code:200 AND service:my\\-service AND @duration:>600000000"},"group_by":[{"path":"resource_name1","tag_name":"my_resource1"},{"path":"resource_name2","tag_name":"my_resource2"}],"compute":{"aggregation_type":"count"}},"type":"spans_metrics"}} + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 426.910125ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: api.datad0g.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - '*/*' + url: https://api.datad0g.com/api/v2/apm/config/metrics/tf_TestAccSpansMetricGroupBys_local_1720518936 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: {} + status: 204 No Content + code: 204 + duration: 191.675209ms diff --git a/datadog/tests/resource_datadog_spans_metric_test.go b/datadog/tests/resource_datadog_spans_metric_test.go index ffab897658..50c985d9b6 100644 --- a/datadog/tests/resource_datadog_spans_metric_test.go +++ b/datadog/tests/resource_datadog_spans_metric_test.go @@ -218,7 +218,7 @@ func testAccCheckDatadogSpansMetricTestingCountGroupBys(uniq string) string { aggregation_type = "count" } filter { - query = "@http.status_code:200 service:my-service" + query = "@http.status_code:200 service:my-service @duration:>600ms" } group_by { path = "resource_name2"