-
Notifications
You must be signed in to change notification settings - Fork 840
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
Add memory mode support to OTLP exporters #6430
Conversation
Method method = | ||
OtlpHttpSpanExporterBuilder.class.getDeclaredMethod("setMemoryMode", MemoryMode.class); | ||
method.setAccessible(true); | ||
method.invoke(builder, memoryMode); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ugliness will go away once we promote memory mode to the stable API. I think we just need a release or so to be sure we think this concept is going to work.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6430 +/- ##
============================================
- Coverage 91.25% 90.75% -0.50%
+ Complexity 6099 6038 -61
============================================
Files 667 652 -15
Lines 18104 17790 -314
Branches 1792 1781 -11
============================================
- Hits 16520 16146 -374
- Misses 1062 1127 +65
+ Partials 522 517 -5 ☔ View full report in Codecov by Sentry. |
@@ -237,9 +239,27 @@ public static void setMemoryModeOnOtlpMetricExporterBuilder( | |||
"setMemoryMode", MemoryMode.class); | |||
method.setAccessible(true); | |||
method.invoke(builder, memoryMode); | |||
} else if (builder instanceof OtlpGrpcSpanExporterBuilder) { | |||
// Calling getDeclaredMethod causes all private methods to be read, which causes a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could have been avoided by using method handles. Alternatively could have used an internal interface to expose this method.
Related to #6429, #6410, #6422.
Adds support for opting into low allocation memory usage in OTLP exporters via:
cc @laurit