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

[WIP] Bridge: Logging Bridge for SwiftLog #535

Closed
wants to merge 24 commits into from

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Apr 25, 2024

Logging Bridge for Apple's SwiftLog #517

Some Notes:
Basic Structure - LogHandler implements

  • log Level - sets log level on the handler (Default is INFO)
  • Metadata - metadata on the log handler
  • func log (...params) - converts logger data to OTel format and emits it

TODO: Write tests for the bridge

@khushijain21 khushijain21 marked this pull request as ready for review April 26, 2024 13:42
@khushijain21 khushijain21 marked this pull request as draft April 26, 2024 13:42
@khushijain21
Copy link
Contributor Author

Hello Reviewers, can you please take a look at the approach? Your feedback is appreciated. Thanks @nachoBonafonte @bryce-b @vvydier

@nachoBonafonte nachoBonafonte marked this pull request as ready for review May 13, 2024 21:27
Copy link
Member

@nachoBonafonte nachoBonafonte left a comment

Choose a reason for hiding this comment

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

This is looking really good, and the documentation is helping a lot. I added some comments about the API and consistency. Let me know what do you think.

Sources/Bridges/OTelSwiftLog/LogHandler.swift Outdated Show resolved Hide resolved
Sources/Bridges/OTelSwiftLog/LogHandler.swift Outdated Show resolved Hide resolved
Sources/Bridges/OTelSwiftLog/LogHandler.swift Outdated Show resolved Hide resolved
Sources/Bridges/OTelSwiftLog/LogHandler.swift Outdated Show resolved Hide resolved
Sources/Bridges/OTelSwiftLog/LogHandler.swift Outdated Show resolved Hide resolved
Copy link
Member

@nachoBonafonte nachoBonafonte left a comment

Choose a reason for hiding this comment

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

Just missing some tests for the code and I would consider it ready

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 64.00000% with 72 lines in your changes missing coverage. Please review.

Project coverage is 68.17%. Comparing base (34c4569) to head (ad2b739).
Report is 8 commits behind head on main.

Current head ad2b739 differs from pull request most recent head 5b372c3

Please upload reports for the commit 5b372c3 to get more accurate results.

Files Patch % Lines
Sources/Bridges/OTelSwiftLog/LogHandler.swift 49.54% 55 Missing ⚠️
...urces/OpenTelemetryApi/Common/AttributeValue.swift 80.00% 6 Missing ⚠️
Sources/Exporters/Jaeger/Adapter.swift 81.48% 5 Missing ⚠️
...TelemetryProtocolCommon/common/CommonAdapter.swift 62.50% 3 Missing ⚠️
...urces/OpenTelemetryApi/Common/AttributeArray.swift 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   68.41%   68.17%   -0.24%     
==========================================
  Files         344      346       +2     
  Lines       15151    15240      +89     
==========================================
+ Hits        10365    10390      +25     
- Misses       4786     4850      +64     

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

@bryce-b bryce-b self-requested a review July 5, 2024 17:34
@khushijain21
Copy link
Contributor Author

Sorry, was not able to work on this again. There is just one thing - the bridge may not want to depend on the OpenTelemetrySDK

@bryce-b bryce-b closed this Jul 22, 2024
@bryce-b
Copy link
Member

bryce-b commented Jul 22, 2024

closing PR due to contamination of upstream repo. I'll reopen with another branch.

@bryce-b bryce-b mentioned this pull request Jul 22, 2024
@bryce-b
Copy link
Member

bryce-b commented Jul 22, 2024

@khushijain21 I removed the dependency on the SDK in the new PR

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.

4 participants