Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Fix checkValueForProducer test helper for queue metrics (#8288)
`checkValueForProducer` test helper assumes that every OC metric has only one timeseries. But, since the queue metrics are defined globally, they accumulate more timeseries with different labels from different tests. This change removes that assumption. It allows having more tests for the exporter queue without breaking TestQueuedRetry_QueueMetricsReported. Ideally, we should avoid defining instruments globally or clear them up after each test. The first option would require passing the OpenCensus registry in as a public field of TelemetrySettings from the service start. The second option would require a bigger refactoring. I think we can allow several tests emitting datapoints for the global instruments for now until we migrate to OTel metrics. Fixes tests failing in #8250
- Loading branch information