We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As discussed in open-telemetry/opentelemetry-specification#2905, several languages don't do spatial reaggregation when attributes are dropped via views. Java is one of those languages.
Here's an example snippet that demonstrates the issue:
InMemoryMetricReader reader = InMemoryMetricReader.create(); SdkMeterProvider meterProvider = SdkMeterProvider.builder() .registerMetricReader(reader) .registerView( InstrumentSelector.builder().setName("my-instrument").build(), View.builder().setAttributeFilter(attributeKey -> false).build()) .build(); Meter myMeter = meterProvider.get("my-meter"); LongUpDownCounterBuilder myInstrument = myMeter.upDownCounterBuilder("my-instrument"); myInstrument.buildWithCallback( observable -> { observable.record(10, Attributes.builder().put("key", "value1").build()); observable.record(10, Attributes.builder().put("key", "value2").build()); }); OpenTelemetryAssertions.assertThat(reader.collectAllMetrics()) .satisfiesExactly( metricData -> OpenTelemetryAssertions.assertThat(metricData) .hasLongSumSatisfying( sum -> sum.hasPointsSatisfying( point -> point # .hasValue(20) // Correct behavior: should aggregate the two 10 values together .hasValue(10) // Actual behavior: takes the last reported measurement without aggregation .hasAttributes( Attributes.empty()))));
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As discussed in open-telemetry/opentelemetry-specification#2905, several languages don't do spatial reaggregation when attributes are dropped via views. Java is one of those languages.
Here's an example snippet that demonstrates the issue:
The text was updated successfully, but these errors were encountered: