-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Implement Default Logging Hook #308
feat: Implement Default Logging Hook #308
Conversation
Hey @kylejuliandev, thanks for the PR. Could you please sign off your commits? The CNCF requires you to acknowledge that you're willing and able to donate this code. To add your Signed-off-by line to every commit in this branch:
Thanks! |
d5d08f7
to
b4b4765
Compare
Hi @beeme1mr! No worries, I've pushed up the signed commits now. Happy to donate this code, although it is incomplete at the moment. Will resume and get some unit tests in. Logging semantics (log IDs, log levels, content, etc...) are still left to determine - although I have tried to adhere to the spec |
Hey, @kylejuliandev! Great work on this PR; everything seems good to go. As you pointed out, however, a few unit tests are missing to get this PR out. Would you like some help? Just a tiny suggestion: I would move the |
Thanks for the reminder @askpt - I completely forgot about this, my bad! I have added some unit tests now to cover the LoggingHook. I suspect another task may include updating the README for guidance on how to use the hook. |
0f48130
to
dff409c
Compare
Signed-off-by: Kyle Julian <[email protected]>
Signed-off-by: Kyle Julian <[email protected]>
…th string.IsNullOrEmpty Signed-off-by: Kyle Julian <[email protected]>
Signed-off-by: Kyle Julian <[email protected]>
Signed-off-by: Kyle Julian <[email protected]>
dff409c
to
ea2b393
Compare
Yes please! Here's an example from the Java SDK. Thanks https://github.com/open-feature/java-sdk?tab=readme-ov-file#logging-hook |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
==========================================
+ Coverage 85.49% 86.13% +0.63%
==========================================
Files 38 39 +1
Lines 1517 1601 +84
Branches 154 173 +19
==========================================
+ Hits 1297 1379 +82
+ Misses 188 186 -2
- Partials 32 36 +4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kyle Julian <[email protected]>
Signed-off-by: Kyle Julian <[email protected]>
Signed-off-by: Kyle Julian <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments.
* Adopt StringBuilder.AppendLine instead of manually referring to Environment.NewLine * Use null-coalescing operator inplace of adding a if null check Signed-off-by: Kyle Julian <[email protected]>
* Suppress ConfigureAwait warnings in unit test class Signed-off-by: Kyle Julian <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [2.3.0](v2.2.0...v2.3.0) (2025-01-31) ### ⚠ BREAKING CHANGES #### Hook Changes The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * Add evaluation details to finally hook stage ([#335](#335)) ([2ef9955](2ef9955)) #### .NET 6 Removed support for .NET 6. * add dotnet 9 support, rm dotnet 6 ([#317](#317)) ([2774b0d](2774b0d)) ### 🐛 Bug Fixes * Adding Async Lifetime method to fix flaky unit tests ([#333](#333)) ([e14ab39](e14ab39)) * Fix issue with DI documentation ([#350](#350)) ([728ae47](728ae47)) ### ✨ New Features * add dotnet 9 support, rm dotnet 6 ([#317](#317)) ([2774b0d](2774b0d)) * Add evaluation details to finally hook stage ([#335](#335)) ([2ef9955](2ef9955)) * Implement Default Logging Hook ([#308](#308)) ([7013e95](7013e95)) * Implement transaction context ([#312](#312)) ([1b5a0a9](1b5a0a9)) ### 🧹 Chore * **deps:** update actions/upload-artifact action to v4.5.0 ([#332](#332)) ([fd68cb0](fd68cb0)) * **deps:** update codecov/codecov-action action to v5 ([#316](#316)) ([6c4cd02](6c4cd02)) * **deps:** update codecov/codecov-action action to v5.1.2 ([#334](#334)) ([b9ebddf](b9ebddf)) * **deps:** update codecov/codecov-action action to v5.3.1 ([#355](#355)) ([1e8ebc4](1e8ebc4)) * **deps:** update dependency coverlet.collector to 6.0.3 ([#336](#336)) ([8527b03](8527b03)) * **deps:** update dependency coverlet.msbuild to 6.0.3 ([#337](#337)) ([26fd235](26fd235)) * **deps:** update dependency dotnet-sdk to v9.0.101 ([#339](#339)) ([dd26ad6](dd26ad6)) * **deps:** update dependency fluentassertions to 7.1.0 ([#346](#346)) ([dd1c8e4](dd1c8e4)) * **deps:** update dependency microsoft.net.test.sdk to 17.12.0 ([#322](#322)) ([6f5b049](6f5b049)) ### 📚 Documentation * disable space in link text lint rule ([#329](#329)) ([583b2a9](583b2a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: Todd Baert <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Todd Baert <[email protected]>
This PR
Related Issues
Fixes #299
Notes
Follow-up Tasks
How to test