You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your environment
I am using Windows and building with Visual Studio 2019
Steps to reproduce
This issue can be reproduced by making some small changes to the "otlp" example. Replace the InitMetrics function in examples/otlp/http_metric_main.cc with this version that attaches a View to the MeterProvider to change the aggregation of a counter to "LastValue". I have attached the modified file as a .txt. Build the example and run.
What is the expected behavior?
I am expecting to see the latest recorded values in the collector.
What is the actual behavior?
I am encountering an "Abort".
I looked into the code and the problem seems to be in the otlp exporter. In the method OtlpMetricUtils::GetAggregationType in exporters/otlp/src/otlp_metric_utils.cc, it uses InstrumentType to determine aggregation type, which doesn't take into account any modifications from View.
Thank you for providing clear and sufficient information about the issue, which helped in troubleshooting. Have implemented a solution in pull request #2467, which you can test if you'd like.
Describe your environment
I am using Windows and building with Visual Studio 2019
Steps to reproduce
This issue can be reproduced by making some small changes to the "otlp" example. Replace the InitMetrics function in examples/otlp/http_metric_main.cc with this version that attaches a View to the MeterProvider to change the aggregation of a counter to "LastValue". I have attached the modified file as a .txt. Build the example and run.
What is the expected behavior?
I am expecting to see the latest recorded values in the collector.
What is the actual behavior?
I am encountering an "Abort".
http_metric_main.cc.txt
The text was updated successfully, but these errors were encountered: