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

ILogger integration - part 3 #1328

Merged
merged 11 commits into from
Oct 7, 2020
Merged

ILogger integration - part 3 #1328

merged 11 commits into from
Oct 7, 2020

Conversation

reyang
Copy link
Member

@reyang reyang commented Oct 7, 2020

This PR follows #1308.
Based on the investigation from #1327, the actual perf diff was not significant enough to justify the engineering cost of maintaining too much duplicated logic. In this PR I'm taking a different approach - by making LogRecord a reference type, and making Exporter/Processor generic, we could reuse all the existing stuff, thus making it easier to maintain.

Changes

  • Changed LogRecord from struct to class.
  • Extracted exporter and processor logic, made them generic.
  • Updated logging example project to show how exporter/processor would work.

Please provide a brief description of the changes here.

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

  • CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@reyang reyang requested a review from a team October 7, 2020 05:24
@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #1328 into master will increase coverage by 1.31%.
The diff coverage is 80.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1328      +/-   ##
==========================================
+ Coverage   76.95%   78.26%   +1.31%     
==========================================
  Files         223      220       -3     
  Lines        6435     6326     -109     
==========================================
- Hits         4952     4951       -1     
+ Misses       1483     1375     -108     
Impacted Files Coverage Δ
...rc/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs 84.94% <ø> (ø)
....Exporter.Jaeger/JaegerExporterHelperExtensions.cs 33.33% <0.00%> (ø)
...try.Exporter.OpenTelemetryProtocol/OtlpExporter.cs 29.41% <ø> (ø)
...rc/OpenTelemetry.Exporter.ZPages/ZPagesExporter.cs 90.90% <ø> (ø)
...c/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs 90.90% <ø> (ø)
...rc/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs 85.89% <ø> (ø)
....Exporter.Zipkin/ZipkinExporterHelperExtensions.cs 33.33% <0.00%> (ø)
src/OpenTelemetry/BaseExporter.cs 64.28% <ø> (ø)
src/OpenTelemetry/Logs/LogRecord.cs 0.00% <ø> (ø)
...c/OpenTelemetry/Logs/OpenTelemetryLoggerOptions.cs 0.00% <0.00%> (ø)
... and 13 more

Copy link
Contributor

@eddynaka eddynaka left a comment

Choose a reason for hiding this comment

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

Very nice! Good that we could re-use everything!

@cijothomas cijothomas merged commit 71bb363 into master Oct 7, 2020
@cijothomas cijothomas deleted the reyang/ilogger branch October 7, 2020 16:55
@reyang reyang mentioned this pull request Oct 7, 2020
3 tasks
@mbakalov mbakalov mentioned this pull request Jan 13, 2021
3 tasks
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