-
Notifications
You must be signed in to change notification settings - Fork 1.9k
INFOPLAT-2449: Use chainlink-common otelzap core in chainlink global logger #19089
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
Conversation
|
👋 kirqz23, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
d3bd9c3 to
f13bfc3
Compare
|




What
Use
chainlink-commonotelzap core in chainlink global logger for exporting logs throughbeholderto Otel and Loki.Enables early logger setup with OTel support without requiring chainlink logger recreation when beholder is initialised. Leveraging atomic core for swapping noop core with otel core when Beholder is ready.
Related PRs:
How
beholderand it's dependencies in before hooks for subcommands. We introduced commonBeforeNode()andAfterNode()function that setups and clears all dependencies including database, datastore, keystore and beholder. The reference to db, keystore and datasource is stored in the shell.chainlink-commonotelzappackage with zap core for otel. To be able to initilize logger earlier (beforebeholderis ready in rootnodecommand), we leverage atomic functionality to swap atomic core for otel whenever beholder is ready in atomic operation to avoid race condition. Additionally, we implementedNewWithCores()that accepts additional cores (besides default one) that helped us achieve above.