-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
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
[exporter/awsemf] Exporter ignores the first batch of a metric send to cloudwatch #1653
Comments
Could this be due to the fact that the awsemfexporter performs cululative-to-delta conversion for cumulative sums? The conversion drops the initial state, you can see relevant discussion on this PR. |
This sounds exactly like the behavior I've observed. Do you @bryan-aguilar know if this can be disabled or if there is a workaround? I already tried to to initialize the counter and adding 0 before using it but this did not work. Probably because the values are aggregated over a certain time frame... |
I'm running into the same bug as well. I was actually not seeing any metrics at all until I found your bug report and tried to just collect some more data points. I tried force flushing once when starting up the application as a workaround but it also doesn't "fix" it. My sample application can be found here. It's not as minimal as @mircohaug's, and does also tracing and x-ray log correlation. With metrics being broken for low-frequency metrics. It's a go lambda that uses the ADOT lambda layer with |
PR open-telemetry/opentelemetry-collector-contrib#17988 was merged. In the next release there exists the configuration flag |
Hi @mircohaug |
@mizzzto can you please open a new issue in this repository? We will most likely ask for an issue to be opened upstream also if this is indeed a bug. |
@bryan-aguilar Sure, here it is: #1991 |
The
awsemf
exporter of the ADOT distribution of OTEL sends faulty data for the first batch of metrics send to AWS Cloudwatch.Steps to reproduce
default
profile. (Or change the value of theAWS_PROFILE
env var in step 3)emfbug-reproduction-embedded-metrics-otel
by runningaws logs create-log-group --log-group-name emfbug-reproduction-embedded-metrics-otel
yarn install
yarn start
1
to the counter four times in total. We Split these four increments on two batches with two increments each. Between these batches there is a wait time to allow the OTEL agent to flush the values to AWS.fields counter_name,@timestamp
on the log groupemfbug-reproduction-embedded-metrics-otel
) to see the published EMF Metrics.docker rm -f awscollector
andaws logs delete-log-group --log-group-name emfbug-reproduction-embedded-metrics-otel
Expected Result
We expect the loggroup to contain two entries with a value of
2
. One entry for each batch.Actual result
We only get one entry with a value of
2
. The first batch gets its value set to0
.Additional information
ConsoleMetricExporter
alongside the one that exports the metrics to the OTEL agent. This Exporter print the correct values to the console.file
exporter to the OTEL agent pipeline. This one also shows the correct values.The text was updated successfully, but these errors were encountered: