Skip to content

add stdout memory mode - #6774

Merged
jack-berg merged 4 commits into
open-telemetry:mainfrom
zeitlinger:stdout-memory-mode
Oct 17, 2024
Merged

jack-berg merged 4 commits into
open-telemetry:mainfrom
zeitlinger:stdout-memory-mode

Conversation

@zeitlinger

Copy link
Copy Markdown
Member

No description provided.

@zeitlinger
zeitlinger requested a review from a team as a code owner October 10, 2024 11:33
@codecov

codecov Bot commented Oct 10, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 94.30380% with 9 lines in your changes missing coverage. Please review.

Project coverage is 90.58%. Comparing base (b927d9d) to head (bb62e71).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...tlp/internal/logs/OtlpStdoutLogRecordExporter.java 86.66% 1 Missing and 1 partial ⚠️
...tlp/internal/metrics/OtlpStdoutMetricExporter.java 89.47% 1 Missing and 1 partial ⚠️
...g/otlp/internal/traces/OtlpStdoutSpanExporter.java 86.66% 1 Missing and 1 partial ⚠️
...r/internal/otlp/logs/LogReusableDataMarshaler.java 95.00% 0 Missing and 1 partial ⚠️
...rnal/otlp/metrics/MetricReusableDataMarshaler.java 95.00% 0 Missing and 1 partial ⚠️
...nternal/otlp/traces/SpanReusableDataMarshaler.java 95.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6774      +/-   ##
============================================
+ Coverage     90.10%   90.58%   +0.48%     
- Complexity     6541     6582      +41     
============================================
  Files           728      731       +3     
  Lines         19695    19714      +19     
  Branches       1935     1926       -9     
============================================
+ Hits          17746    17858     +112     
+ Misses         1349     1259      -90     
+ Partials        600      597       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zeitlinger zeitlinger mentioned this pull request Oct 10, 2024
@zeitlinger zeitlinger self-assigned this Oct 10, 2024
@zeitlinger

Copy link
Copy Markdown
Member Author

@jack-berg this is the final PR for stdout - adding the memory mode feature


import io.opentelemetry.sdk.common.export.MemoryMode;

public class OtlpStdoutExporterBuilderUtil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing internal boilerplate javadoc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did the build not fail?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's not a build check for it right now. Do you know if opentelemetry-java-instrumentation managed to add this automation yet?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened new issue here: #6798

}
}.export(logs);
} else {
for (ResourceLogsMarshaler resourceLogs : ResourceLogsMarshaler.create(logs)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to be the case that if wrapperJsonObject = false, we can't take advantage of reuseable memory mode. Can we include wrapperJsonObject as an argument to LogReuseableDataMarshaler and adjust the logic accordingly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not so easy, because

takes a list and I didn't follow what has to be modified in there

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let's punt on it for now

@zeitlinger

Copy link
Copy Markdown
Member Author

@jack-berg can you trigger the failed link check? otherwise, everything should be fine

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good besides the missing internal boilerplate javadoc. Thanks!

@jack-berg
jack-berg merged commit 1ac476b into open-telemetry:main Oct 17, 2024
@zeitlinger
zeitlinger deleted the stdout-memory-mode branch November 4, 2024 06:44
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