-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(log)!: intoduce log v2 with OpenTelemetry and slog #25701
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
Closed
Closed
Changes from all commits
Commits
Show all changes
137 commits
Select commit
Hold shift + click to select a range
1cf5e6c
feat: add tracing
aaronc a207f94
work on otel tracer impl
aaronc ee0bfb3
add basic baseapp tracing
aaronc d5f5ea4
latest WIP
aaronc 47f83e8
add trace exporter setup
aaronc 7fafce3
fixes
aaronc bdba035
simapp setup, make tracers wrap loggers
aaronc 25e3135
add test setup
aaronc 5c7e464
fix shutdown order
aaronc d71f7c1
block trace nesting
aaronc 56b215a
update metrics config and instrumentation
aaronc f9ce55c
start adding otel metric config
aaronc 3fff00f
migrate to pure otel setup
aaronc 5077567
fixes
aaronc 31536b6
add basic metrics
aaronc c922688
add telemetry shutdown hook
aaronc ed891cc
docs, cleanup
aaronc f685bd4
WIP on removing go-metrics
aaronc 42da2f7
Merge branch 'main' of github.com:cosmos/cosmos-sdk into aaronc/traci…
aaronc 699f5d3
setup sim test flag
aaronc 5df2460
integrate slog logging
aaronc 1c84edb
update to use official env var
aaronc 46e4bcb
add README.md
aaronc f0c3955
delete spaces
aaronc 7dfb754
setup TestingMain
aaronc 1ce344b
update suggested config in README.md
aaronc edbae92
add otel custom config options
aaronc 0f8085a
add otel custom config options
aaronc 03b6069
add more instrumentation
aaronc c4dbd07
remove pretty print
aaronc 2a1dffd
Merge branch 'main' of github.com:cosmos/cosmos-sdk into aaronc/traci…
aaronc 7b3ee34
add hashicorp/go-metrics otel/compatibility layer
aaronc 06e1245
bring back server telemetry config, revert unrelated changes
aaronc cf720f9
address review comments, remove timing histograms
aaronc 743fdc9
support otel routing through legacy metrics config
aaronc 5bfe192
go mod tidy, bring in additional config from iavlx branch
aaronc 4f50709
revert unrelated changes
aaronc c3e781d
bug fix & better go-metric -> otel naming
aaronc 6ddac1d
propagate context better and add some basic tracing for grpc queries
aaronc 70e8fa8
basic log unification
aaronc 2258c1f
Merge branch 'main' of github.com:cosmos/cosmos-sdk into aaronc/traci…
aaronc 0968a22
go mod tidy
aaronc 6fb271d
update CHANGELOG.md, UPGRADING.md and remove example telemetry config…
aaronc 90885bb
update CHANGELOG.md, UPGRADING.md
aaronc 5e9c6ba
update docs
aaronc a1f27c8
revert any logging configuration, other than setting up the otel logg…
aaronc 6c9cde1
Merge branch 'main' of github.com:cosmos/cosmos-sdk into aaronc/traci…
aaronc 75279fa
lint fix
aaronc 10436c9
Update UPGRADING.md
aaronc b870b7c
re-add telemetry toml
technicallyty 3b2440c
add deprecation notice to telemetry toml config
technicallyty 2c20c90
remove legacy metrics init in opentelemetry init
technicallyty 033e51d
Merge remote-tracking branch 'origin/main' into aaronc/tracing-metrics
technicallyty ebe7fd9
re-add changelog entries
technicallyty 3a188c1
Merge remote-tracking branch 'origin/main' into aaronc/tracing-metrics
technicallyty 9e09f53
changelog.md
technicallyty 8b4e5f2
shutdown only if sdk set, and error if sink is set to otel but no con…
technicallyty 6c961ea
add a note to histograms
technicallyty 6081f68
Merge branch 'main' into aaronc/tracing-metrics
aljo242 14fa35a
Merge branch 'aaronc/tracing-metrics' of ssh://github.com/cosmos/cosm…
technicallyty 2649644
upgrading.md update
technicallyty aa22513
remove stuff about log
technicallyty f48d89f
add grpc options to client and server
technicallyty 575a12f
make propagators configurable
technicallyty e817154
fix issue with otel spans not showing up in sdk context
technicallyty 8e992c7
get rid of embedding sdk context into grpc context since we can use s…
technicallyty a8dddd8
delete the lines
technicallyty bfeb28d
add type attribute for checktx tracer
technicallyty f320bfe
add attribtues to prepareproposal
technicallyty 107dbd4
add attribtues to prepareproposal
technicallyty 3313d91
Merge remote-tracking branch 'origin/main' into aaronc/tracing-metrics
technicallyty 902ff52
remove
technicallyty 0ecf579
tidy-all
technicallyty 10e286f
update PreBlock span handling
technicallyty cfaffe2
update abci methods to correctly record span errors and stuff
technicallyty 336805c
feat: initialize noop providers when otel is disabled (#25622)
aaronc 49f752a
fix hash issue
technicallyty e27a022
Merge branch 'aaronc/tracing-metrics' of ssh://github.com/cosmos/cosm…
technicallyty cea27dd
telemetry is configured via start/init
technicallyty c73c140
remove prints, use const otel file name
technicallyty 72fa3e1
Merge remote-tracking branch 'origin/main' into aaronc/tracing-metrics
technicallyty 8b265b0
reformat upgrading.md
technicallyty 4481d57
tidy-all
technicallyty 51a6537
alternatively allow otel to be configured via env var
technicallyty fdac609
readjust the readme based on changes
technicallyty 86d6325
fix issue with module_test.go
technicallyty 45e9739
Merge branch 'main' into aaronc/tracing-metrics
aljo242 faf5c1d
put ctx argument first
technicallyty f665c6c
cnt -> counter
technicallyty 968efa4
defer the cancel
technicallyty 1ae88a0
rename open telemetry SDK variable
technicallyty a4877ea
document cosmos extra, and upate the example
technicallyty 6c2a994
fix all the linting errors
technicallyty 92783e8
change filemode
technicallyty d868512
Merge branch 'main' into aaronc/tracing-metrics
technicallyty d66708e
wip
technicallyty cd30eb1
wip
technicallyty 1679ff6
Merge remote-tracking branch 'origin/main' into technicallyty/otel-lo…
technicallyty 18d9ddb
log replacer
technicallyty 33a2db1
parity with old logger
technicallyty d0f97da
restore upgrade logic
technicallyty a0b45d4
simplify
technicallyty 95aba77
todo
technicallyty fb2348e
use zerolog's formatter as a handler
technicallyty 29420f3
simplify logger
technicallyty 4b532af
update readme
technicallyty 034654c
Merge branch 'main' into technicallyty/otel-logging
technicallyty d38dc10
changelog
technicallyty ca690d9
fix ci issues
technicallyty 57b827d
update one log as example
technicallyty 7f77a81
tidy
technicallyty 154c774
mod files
technicallyty cdc5ba1
use zerolog if otel is not enabled
technicallyty 019dae0
update docs
technicallyty c310570
update readme
technicallyty 77a276e
tidy mods, replaces, and fix golden test
technicallyty a2d77cb
Merge remote-tracking branch 'origin/main' into technicallyty/otel-lo…
technicallyty 553512b
no lint
technicallyty a6b7d96
lint fix
technicallyty 189b46e
fix lint
technicallyty fcb9067
fix lint again...
technicallyty 3f39296
fix options docs
technicallyty b878d77
update readme
technicallyty 86190db
update readme
technicallyty f14fdca
update upgrading
technicallyty c8daf44
add comment why we cant use zerolog bridge
technicallyty 486d4e8
reference upgrading in changelog
technicallyty 0530ec2
remove pointers for config
technicallyty e33d030
re-add missing test
technicallyty e36b09e
add with_test
technicallyty b51b61f
use slog info name
technicallyty 79707fd
const default logger name
technicallyty f10baa3
re-add app_di
technicallyty 32b68f9
re-add flag on app.go
technicallyty 0aff0fd
fix import order
technicallyty a39c985
remove contextual methods, add context attachment
technicallyty f0083d7
fix mocks
technicallyty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this refactoring is a good opportunity to fix flags' naming:
--log-level--log-level-verbose(what's that?)--log-format--log-no-color--log-disable-stdout→ is a more suitable name IMOUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trying to reduce API breakage here, leaning towards keeping the flags the same
as for
--log-disable-stdout, kinda lean against that as well. we can log to stderr as well, and using a flag with that name could imply stderr logs will display, when the flag currently disables all console output entirely.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to break a couple of flags since this PR already introduces breaking changes. Especially, since current log flags have this weird
--+_casing.good call, maybe then
--log-disable-console?