systemtest: Flaky TestApprovedMetrics
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
```
=== RUN TestApprovedMetrics
metrics_test.go:71: []any{
... // 3 identical elements
map[string]any{"@timestamp": []any{string("2017-05-30T18:53:41.368Z")}, "agent.activation_method": []any{string("some_activation_method")}, "agent.name": []any{string("elastic-node")}, "agent.name.text": []any{string("elastic-node")}, ...},
map[string]any{"@timestamp": []any{string("2017-05-30T18:53:41.369Z")}, "agent.activation_method": []any{string("some_activation_method")}, "agent.name": []any{string("elastic-node")}, "agent.name.text": []any{string("elastic-node")}, ...},
+ map[string]any{
+ "@timestamp": []any{string("2017-05-30T18:53:00.000Z")},
+ "agent.name": []any{string("elastic-node")},
+ "agent.name.text": []any{string("elastic-node")},
+ "data_stream.dataset": []any{string("apm.service_summary.1m")},
+ "data_stream.namespace": []any{string("default")},
+ "data_stream.type": []any{string("metrics")},
+ "labels.tag1": []any{string("one")},
+ "metricset.interval": []any{string("1m")},
+ "metricset.name": []any{string("service_summary")},
+ "numeric_labels.tag2": []any{float64(2)},
+ "observer.hostname": []any{string("dynamic")},
+ "observer.type": []any{string("apm-server")},
+ "observer.version": []any{string("dynamic")},
+ "processor.event": []any{string("metric")},
+ "service.language.name": []any{string("ecmascript")},
+ "service.language.name.text": []any{string("ecmascript")},
+ ...
+ },
map[string]any{"@timestamp": []any{string("2017-05-30T18:53:42.281Z")}, "agent.activation_method": []any{string("some_activation_method")}, "agent.name": []any{string("elastic-node")}, "agent.name.text": []any{string("elastic-node")}, ...},
}
Test failed. Run `make check-approvals` to verify the diff.
server.go:144: log file: /home/runner/work/apm-server/apm-server/systemtest/logs/TestApprovedMetrics/apm-server
--- FAIL: TestApprovedMetrics (1.43s)
```
https://github.com/elastic/apm-server/actions/runs/30907043616/job/91984447129?pr=21607
Contributor guide
Research direction
Start with metrics_test.go around line 71 and inspect the TestApprovedMetrics failure and the referenced systemtest log. Run TestApprovedMetrics and use `make check-approvals` to reproduce and verify the result; done means the test no longer flakes and the approval check passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100