Skip to content

Commit

Permalink
reproduce query issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SalahEddineBC committed Jul 9, 2024
1 parent 19c9189 commit f37fed4
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 58 deletions.
2 changes: 1 addition & 1 deletion datadog/tests/cassettes/TestAccSpansMetricGroupBys.freeze
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-04-21T11:28:25.434704+02:00
2024-07-09T11:55:36.526111+02:00
125 changes: 69 additions & 56 deletions datadog/tests/cassettes/TestAccSpansMetricGroupBys.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion datadog/tests/resource_datadog_spans_metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f37fed4

Please sign in to comment.