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

Event log for constructor/decorator invoked #1039

Closed
sywhang opened this issue Feb 14, 2023 · 1 comment
Closed

Event log for constructor/decorator invoked #1039

sywhang opened this issue Feb 14, 2023 · 1 comment
Assignees

Comments

@sywhang
Copy link
Contributor

sywhang commented Feb 14, 2023

Fx currently emits logs for each constructor or decorator that is provided to the DI container, but it doesn't actually emit logs on which ones that are called.

A few users reached out asking for an observability point for dependencies that are provided to the DI container but aren't actually invoked, since Fx invokes these lazily.

This can be done if we emit logs for each constructors that are invoked (note: this is NOT fx.Invoke, just the calling the constructor itself); then any constructors that are provided but not invoked can be identified from the logs.

Internal Ref: GO-1873.

@distractedm1nd
Copy link

+1 for having this observability, the lazy invoking has caused a few wild goose chases at https://github.com/celestiaorg/celestia-node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants