Configurable AggregationTemporality
for agent-for-testing
#7902
Labels
enhancement
New feature or request
AggregationTemporality
for agent-for-testing
#7902
Is your feature request related to a problem? Please describe.
At Mesmer project we are working on an instrumentation library for Scala applications, and recent change in
agent-for-testing
forAggregationTemporality
fromcumulative
todelta
caused many issues in our tests - they either broke or became flaky. The issue is related to the style of testing we are doing, which is quite typical to Scala codebases - we call async code without clearly knowing when it will finish executing, so after calling it we immediately start polling assertions that check for metrics being produced by said async code for success for a certain amount of time until they succeed or finally fail. This polling, which fetches exported metrics fromagent-for-testing
, combined withdelta
temporality makes metric output from the exporter non-deterministic, and this breaks our test assertions. Of course, we could force certain constraints on our tests that would make them comform to behavior ofdelta
temporality, but such approach feels excessively limiting. As a workaround for this, we started buildingagent-for-testing
JAR on our own, with only one line change that reverts temporality back tocumulative
.Describe the solution you'd like
We suggest adding a way to configure temporality for
agent-for-testing
, possibly by adding a system property which we could pass on application startup.Describe alternatives you've considered
Only alternatives we see is either refactoring our tests or building
agent-for-testing
JAR on our own, both seem non-ideal options.The text was updated successfully, but these errors were encountered: