-
Notifications
You must be signed in to change notification settings - Fork 821
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
[sdk-logs] remove includeTraceContext configuration and use LogRecord context when available #3817
[sdk-logs] remove includeTraceContext configuration and use LogRecord context when available #3817
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3817 +/- ##
==========================================
+ Coverage 92.20% 92.98% +0.77%
==========================================
Files 290 295 +5
Lines 8650 9032 +382
Branches 1774 1841 +67
==========================================
+ Hits 7976 8398 +422
+ Misses 674 634 -40
|
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.
Seems to me like this is fixing it in the wrong place. The logger constructor should not be interpreting undefined
as false.
According to the latest spec, Related: #3761 |
Thanks @llc1123 for bringing up the related issue, updated the code to remove the config and use LogRecord context if available. |
@@ -16,6 +16,7 @@ | |||
|
|||
export { | |||
LoggerConfig, | |||
LoggerProviderConfig, |
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.
Unrelated change?
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.
Sorry about that, I can send a different PR for this if needed, trying to avoid a long import for the config
import { LoggerProviderConfig } from "@opentelemetry/sdk-logs/build/src/types";
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.
We should not really be importing from specific folders in a package "@opentelemetry/sdk-logs/build/src/types"
as this makes it very fragile. And I have had issues from some teams where this didn't work for them (it was a loooong time ago) when we accidently had this in our internal code.
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.
I agree we should be avoiding it
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.
I don't see it actually used anywhere in this PR though?
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.
Oh end users. Ignore me
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
- the option is no longer used: open-telemetry/opentelemetry-js#3817
- the option is no longer used: open-telemetry/opentelemetry-js#3817
open-telemetry/opentelemetry-js#3817 seems to have mostly dropped that.
open-telemetry/opentelemetry-js#3817 seems to have mostly dropped that.
Which problem is this PR solving?
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #3816
Fixes #3761
Short description of the changes
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: