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

feat(observability): implements client side logging configuration #507

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

ygrishajev
Copy link
Contributor

@ygrishajev ygrishajev commented Nov 29, 2024

Stats-web uses experimental app dir. It hydrates client side in a certain way. To make sure logger is instantiated with proper config it should be configured under use client directive. Further more, logger instantiated in module scope (outside react context) would actually be instantiated on the backend and would ignore client side config. So to make sure it works, it should be in the context. For this a useLogger hook is added.

@ygrishajev ygrishajev requested a review from a team as a code owner November 29, 2024 12:40
@ygrishajev
Copy link
Contributor Author

@forbesus FYI

@forbesus
Copy link
Contributor

@forbesus FYI

#462 (comment)
how about this?

@forbesus
Copy link
Contributor

we can use logger without using custom hook and changing next configuration, i think @ygrishajev

@ygrishajev
Copy link
Contributor Author

we can use logger without using custom hook and changing next configuration, i think @ygrishajev

Demo?

@ygrishajev ygrishajev force-pushed the feature/logging branch 2 times, most recently from 4e3a43e to 7673360 Compare November 29, 2024 14:15
@ygrishajev ygrishajev merged commit da9923e into main Nov 29, 2024
5 checks passed
@ygrishajev ygrishajev deleted the feature/logging branch November 29, 2024 15:37
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.

3 participants