-
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-1176] collect other console logs new #1316
Conversation
cfe3837
to
3ef80e6
Compare
packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #1316 +/- ##
==========================================
+ Coverage 90.96% 91.03% +0.06%
==========================================
Files 105 106 +1
Lines 4238 4281 +43
Branches 946 953 +7
==========================================
+ Hits 3855 3897 +42
- Misses 383 384 +1
Continue to review full report at Codecov.
|
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.
Appart from typechecking issue, LGTM!
handlingStack?: string | ||
} | ||
|
||
const consoleObservables: { [k in ConsoleApiName]?: Observable<ConsoleLog> } = {} |
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.
💬 suggestion: Can you add a test for the need to have a singleton?
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.
Isn't the "should allow multiple caller" test enough?
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.
🤔 removing the singleton does not fail the test, so something is not right
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.
It's because the observable references of consoleObservablesByApi
live inside the merged observable.
I've updated the test to ensure the console api as been instrumented only once.
expect(instrumentedConsoleApi).toEqual(console[api]) |
4fb75c9
to
197dadc
Compare
@@ -83,6 +93,7 @@ describe('logs', () => { | |||
delete window.DD_RUM | |||
resetExperimentalFeatures() | |||
deleteEventBridgeStub() | |||
stopSessionManager() |
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.
Remove test flackyness introduced with originalStartLogs
in startLogs.spec.ts
Motivation
Collect all console logs.
Under feature flag
Changes
Testing
I have gone over the contributing documentation.