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

[integration test] otlp log exporter #4854

Conversation

vishweshbankwar
Copy link
Member

@vishweshbankwar vishweshbankwar commented Sep 15, 2023

Adds integration test for otlp log exporter + some refactoring to enable testing + minor fix for example

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #4854 (24f01e6) into main (7eb3e73) will decrease coverage by 0.03%.
Report is 1 commits behind head on main.
The diff coverage is 90.00%.

❗ Current head 24f01e6 differs from pull request most recent head cafcb0c. Consider uploading reports for the commit cafcb0c to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4854      +/-   ##
==========================================
- Coverage   83.96%   83.93%   -0.03%     
==========================================
  Files         293      293              
  Lines       12021    12023       +2     
==========================================
- Hits        10093    10092       -1     
- Misses       1928     1931       +3     
Files Changed Coverage
...lemetryProtocol/OtlpLogExporterHelperExtensions.cs 90.00%

@vishweshbankwar vishweshbankwar marked this pull request as ready for review September 15, 2023 17:14
@vishweshbankwar vishweshbankwar requested a review from a team September 15, 2023 17:14
Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

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

Couple nits but LGTM

var otlpExporter = new OtlpLogExporter(exporterOptions);
BaseExporter<LogRecord> otlpExporter = new OtlpLogExporter(exporterOptions);

if (configureExporterInstance != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Simplify this by using configureExporterInstance?.Invoke(otlpExporter).

var otlpExporter = new OtlpLogExporter(exporterOptions);
BaseExporter<LogRecord> otlpExporter = new OtlpLogExporter(exporterOptions);

if (configureExporterInstance != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment that this option is only used by tests.

@utpilla utpilla merged commit 7cb92d3 into open-telemetry:main Sep 18, 2023
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