-
Notifications
You must be signed in to change notification settings - Fork 142
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
♻️ [RUMF-1097] revamp configuration - logs #1217
Conversation
This will help using a future "validateAndBuildConfiguration", and makes the Logs implementation closer to the RUM one.
So we can keep usages of LogsInitConfiguration inside the init() function
LOGS.init({ clientToken: 'yes', sampleRate: 'foo' as any }) | ||
expect(displaySpy).toHaveBeenCalledTimes(1) | ||
|
||
LOGS.init({ clientToken: 'yes', sampleRate: 200 }) | ||
expect(displaySpy).toHaveBeenCalledTimes(2) |
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 have a test covering the 'foo' case in core but it does not seem that we still have one about '200'.
what about adding it to keep this case?
Codecov Report
@@ Coverage Diff @@
## main #1217 +/- ##
==========================================
- Coverage 89.08% 89.00% -0.09%
==========================================
Files 100 101 +1
Lines 4317 4321 +4
Branches 985 986 +1
==========================================
Hits 3846 3846
- Misses 471 475 +4
Continue to review full report at Codecov.
|
9caed1c
to
283cd91
Compare
Motivation
Followup of #1216 . This PR focuses on the logs part.
Changes
logs/src/domain/configuration
moduleLogsConfiguration
to be used internally in the Logs SDKinit()
, by using the previously introducedvalidateAndBuildConfiguration
function fromcore
forwardErrorToLogs
toLogsConfiguration
, to avoid usingInitConfiguration
outside ofinit()
Testing
I have gone over the contributing documentation.