community-platform icon indicating copy to clipboard operation
community-platform copied to clipboard

feat: adopt tslog

Open thisislawatts opened this issue 2 years ago • 6 comments

PR Checklist

PR Type

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] Developer experience (improves developer workflows for contributing to the project)

Description

Introduce a functional logger for the client side context so we can aggregate usage information from users. This information can then be used in a variety of ways; including debugging, monitoring, and auditing.

One of the primary benefits of logging is that it can help developers debug software issues. When a problem occurs, logs can provide valuable information about what went wrong and why. This information can help developers identify and fix bugs more quickly and efficiently.

Logs can also be used to monitor the performance and health of a system. By analyzing log data, developers can identify trends and patterns that may indicate issues such as performance bottlenecks or security vulnerabilities. This information can be used to proactively address issues before they become critical.

Git Issues

Closes #

Screenshots/Videos

If useful, provide screenshot or capture to highlight main changes


What happens next?

Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).

If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.

If you need more immediate feedback you can try reaching out on Discord in the Community Platform development channel.

thisislawatts avatar Apr 29 '23 07:04 thisislawatts

Visit the preview URL for this PR (updated for commit 549644f):

https://onearmy-next--pr2265-feat-adopt-tslog-im9npddt.web.app

(expires Tue, 14 Nov 2023 19:33:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d65e4f8fee2f6ab2da0c1c3b85b8797d66afa59

github-actions[bot] avatar Apr 29 '23 07:04 github-actions[bot]

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/config/constants.ts 0.00% <ø> (ø)
...owto/Content/Howto/HowToComments/HowToComments.tsx 33.33% <0.00%> (ø)
...arch/Content/ResearchComments/ResearchComments.tsx 67.92% <0.00%> (ø)
src/stores/Theme/theme.store.tsx 8.33% <0.00%> (ø)
src/logger/index.ts 34.78% <31.81%> (-36.65%) :arrow_down:

... and 1 file with indirect coverage changes

:loudspeaker: Thoughts on this report? Let us know!.

codecov[bot] avatar Apr 29 '23 08:04 codecov[bot]

2 flaky tests on run #4437 ↗︎

0 196 0 0 Flakiness 2

Details:

feat: adopt tslog
Project: onearmy-community-platform Commit: 549644fb9d
Status: Passed Duration: 04:46 💡
Started: Oct 14, 2023 7:07 PM Ended: Oct 14, 2023 7:12 PM
Flakiness  common.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[Common] > [User Menu] > [By Authenticated] Output Screenshots
Flakiness  SignUp.spec.ts • 1 flaky test • ci-firefox

View Output Video

Test Artifacts
[Sign-up - new user] > sign in as new user Output Screenshots

Review all test suite changes for PR #2265 ↗︎

cypress[bot] avatar Apr 29 '23 08:04 cypress[bot]

How come we are switching from pino to tslog?

AlfonsoGhislieri avatar Apr 30 '23 20:04 AlfonsoGhislieri

How come we are switching from pino to tslog?

There is nothing being sent to Logflare at the moment. That is part of what I have been working on in this PR. When I took it for a spin, pino doesn't work in the browser. No idea how we merged this originally because I can't see that it ever worked.

thisislawatts avatar May 03 '23 05:05 thisislawatts

There is nothing being sent to Logflare at the moment. That is part of what I have been working on in this PR. When I took it for a spin, pino doesn't work in the browser. No idea how we merged this originally because I can't see that it ever worked.

Ah that makes sense, I was always wondering what was going on with the logger... Would also be good to include some tests then to make sure that this doesn't happen again.

AlfonsoGhislieri avatar May 03 '23 08:05 AlfonsoGhislieri

:tada: This PR is included in version 1.111.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

onearmy-bot avatar Oct 15 '23 19:10 onearmy-bot