Skip to content
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

MicroProfile Telemetry 2.0 #339

Merged
merged 1 commit into from
Aug 22, 2024
Merged

MicroProfile Telemetry 2.0 #339

merged 1 commit into from
Aug 22, 2024

Conversation

radcortez
Copy link
Member

No description provided.

@brunobat
Copy link
Contributor

brunobat commented Jul 15, 2024

@radcortez Seems that we need to set otel.metric.export.interval=3000 to make the runs reproducible.
Does this fix the flaky tests?
(EDIT)
I see that <otel.metric.export.interval>3000</otel.metric.export.interval> is already set...
Do you have have a list of the flaky tests?

@radcortez
Copy link
Member Author

The Flaky tests are all in the JVM package: https://github.com/eclipse/microprofile-telemetry/tree/877f460eb1c3675102b2b5038cb48dec6d99bf92/tck/metrics/src/main/java/org/eclipse/microprofile/telemetry/metrics/tck/jvm

I haven't looked into the details yet. I suspect that the metrics collection for JVM attributes just takes longer than the configured export interval.

@brunobat
Copy link
Contributor

The Flaky tests are all in the JVM package: https://github.com/eclipse/microprofile-telemetry/tree/877f460eb1c3675102b2b5038cb48dec6d99bf92/tck/metrics/src/main/java/org/eclipse/microprofile/telemetry/metrics/tck/jvm

I haven't looked into the details yet. I suspect that the metrics collection for JVM attributes just takes longer than the configured export interval.

CC @Emily-Jiang

@radcortez
Copy link
Member Author

The problem is that the number of metrics generated cycles the log file, so there may be occasions where the metrics collected are not in the file anymore. The log file cannot be cycled.

@Emily-Jiang
Copy link

@radcortez @brunobat can you try out this PR to see whether it fixes your issue?

@Emily-Jiang
Copy link

I have restaged the Telemetry 2.0 release here with the above fix. Please try it out @brunobat @radcortez

@radcortez
Copy link
Member Author

It consistently fails in JvmGarbageCollectionTest with JDK 11 (confirmed locally). However, it does work fine with JDK 17 and 21. We use the implementation provided by OpenTelemetry.

It seems that with JDK 11, there is not a single GC during the test execution, so the metric is not generated. Apparently it does work by hinting a System.gc() in the test method.

brunobat
brunobat previously approved these changes Aug 22, 2024
@radcortez radcortez merged commit 97c719f into main Aug 22, 2024
4 checks passed
@github-actions github-actions bot added this to the 2.7.1 milestone Aug 22, 2024
@radcortez radcortez deleted the mp-tck branch October 3, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants