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

Add OtlpLogExporter.Export method tests #4236

Conversation

mfogliatto
Copy link
Contributor

@mfogliatto mfogliatto commented Feb 25, 2023

Fixes #2873.

Changes

  • Adds the following unit tests in OtlpLogExporterTests to increase OtlpLogExporter's code coverage to ~100%:

    • Export_WhenExportClientIsProvidedInCtor_UsesProvidedExportClient
    • Export_WhenExportClientThrowsException_ReturnsExportResultFailure
    • Export_WhenExportIsSuccessful_ReturnsExportResultSuccess

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes N/A
  • Design discussion issue N/A
  • Changes in public API reviewed N/A

References

Codecov: https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporter.cs

@mfogliatto mfogliatto requested a review from a team February 25, 2023 15:53
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 25, 2023

CLA Missing ID CLA Not Signed

@mfogliatto mfogliatto force-pushed the mfogliatto/add-otlplogexporter-tests branch from 39a7789 to 283f7a4 Compare February 25, 2023 15:53
@cijothomas
Copy link
Member

@mfogliatto We'll need you to sign the CLA part. The Bot message should have all the instructions. You may want to consult your company policies if you are contributing as part of a company.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2023

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added Stale Issues and pull requests which have been flagged for closing due to inactivity and removed Stale Issues and pull requests which have been flagged for closing due to inactivity labels Mar 5, 2023
@cijothomas
Copy link
Member

/easycla

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #4236 (5ce3339) into main (7139c7a) will decrease coverage by 1.22%.
The diff coverage is 58.17%.

❗ Current head 5ce3339 differs from pull request most recent head 1d27429. Consider uploading reports for the commit 1d27429 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4236      +/-   ##
==========================================
- Coverage   85.57%   84.36%   -1.22%     
==========================================
  Files         291      296       +5     
  Lines       11398    11791     +393     
==========================================
+ Hits         9754     9947     +193     
- Misses       1644     1844     +200     
Impacted Files Coverage Δ
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 81.25% <ø> (-1.11%) ⬇️
...elemetry.Exporter.Console/ConsoleMetricExporter.cs 0.00% <0.00%> (ø)
...ensions.Hosting/OpenTelemetryServicesExtensions.cs 100.00% <ø> (+60.00%) ⬆️
...emetry/Metrics/Exemplar/AlwaysOffExemplarFilter.cs 0.00% <0.00%> (ø)
...metry/Metrics/Exemplar/TraceBasedExemplarFilter.cs 0.00% <0.00%> (ø)
...tryProtocol/Implementation/MetricItemExtensions.cs 83.11% <10.00%> (-10.85%) ⬇️
.../OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs 90.90% <50.00%> (-0.85%) ⬇️
...lemetry/Metrics/Exemplar/AlwaysOnExemplarFilter.cs 50.00% <50.00%> (ø)
src/OpenTelemetry/ProviderExtensions.cs 95.00% <50.00%> (-5.00%) ⬇️
src/OpenTelemetry/Metrics/MetricPoint.cs 56.84% <54.29%> (-17.31%) ⬇️
... and 19 more

... and 7 files with indirect coverage changes

@mfogliatto mfogliatto force-pushed the mfogliatto/add-otlplogexporter-tests branch from dd54e3d to 1d27429 Compare March 11, 2023 08:03
@mfogliatto
Copy link
Contributor Author

Close PR and re-raised a separate one, as EasyCLA kept failing even after signing the agreement.

@mfogliatto mfogliatto closed this Mar 11, 2023
@mfogliatto mfogliatto deleted the mfogliatto/add-otlplogexporter-tests branch March 11, 2023 08:12
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.

OTLPLogExporter tests
2 participants