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

RUMF-1497 Allow logger APIs to pass an Error parameter #2029

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

yannickadam
Copy link
Contributor

@yannickadam yannickadam commented Feb 21, 2023

Motivation

The goal of this PR is to align capabilities for error monitoring between RUM and LOGS SDKs.

Changes

Added an optional error parameter:
logger.[level](message: string, messageContext?: object, error?: Error)
which will be serialized as part of an error context, with defined fields (message, kind, stack)

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@yannickadam yannickadam requested a review from a team as a code owner February 21, 2023 14:06
@yannickadam yannickadam force-pushed the yannick.adam/RUMF-1497-Enhance-logger-error-api branch from a658e3e to 2d5faf2 Compare February 21, 2023 20:00
packages/logs/src/domain/logger.ts Outdated Show resolved Hide resolved
packages/logs/src/domain/logger.ts Outdated Show resolved Hide resolved
packages/core/src/domain/console/consoleObservable.ts Outdated Show resolved Hide resolved
@yannickadam yannickadam force-pushed the yannick.adam/RUMF-1497-Enhance-logger-error-api branch from 2d5faf2 to 6b6de63 Compare March 6, 2023 16:23
@yannickadam yannickadam changed the title RUMF-1497 Enhance logger error API RUMF-1497 Allow logger APIs to pass an Error parameter Mar 9, 2023
packages/core/src/tools/error.ts Outdated Show resolved Hide resolved
packages/logs/src/domain/logger.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2023

Codecov Report

Merging #2029 (706c8d2) into main (27e0236) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2029      +/-   ##
==========================================
- Coverage   93.48%   93.42%   -0.07%     
==========================================
  Files         145      145              
  Lines        5512     5522      +10     
  Branches     1250     1255       +5     
==========================================
+ Hits         5153     5159       +6     
- Misses        359      363       +4     
Impacted Files Coverage Δ
...omain/rumEventsCollection/error/errorCollection.ts 100.00% <ø> (ø)
packages/core/src/tools/error.ts 94.11% <100.00%> (+0.24%) ⬆️
packages/logs/src/domain/logger.ts 95.65% <100.00%> (+0.91%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

packages/logs/src/domain/logger.ts Outdated Show resolved Hide resolved
packages/logs/src/domain/logger.ts Outdated Show resolved Hide resolved
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.

5 participants