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.
slogpackage to log instead of usinglogr.WithLogLevelwithWithLoggergithub.com/go-logr/zapr,go.uber.org/zap v1.27.0, andgo.uber.org/multierrResolves #1104
Example Output
Raw:
Wrapped:
{ "time": "2024-09-11T17:29:35.723973977Z", "level": "INFO", "source": { "function": "main.main", "file": "/app/cli/main.go", "line": 134 }, "msg": "starting instrumentation..." }, { "time": "2024-09-11T17:29:35.731129749Z", "level": "INFO", "source": { "function": "go.opentelemetry.io/auto/internal/pkg/instrumentation.(*Manager).load", "file": "/app/internal/pkg/instrumentation/manager.go", "line": 323 }, "msg": "loading probe", "name": { "SpanKind": 2, "InstrumentedPkg": "net/http" } }, { "time": "2024-09-11T17:29:36.079187915Z", "level": "INFO", "source": { "function": "go.opentelemetry.io/auto/internal/pkg/instrumentation.(*Manager).ConfigLoop", "file": "/app/internal/pkg/instrumentation/manager.go", "line": 237 }, "msg": "Configuration provider closed, configuration updates will no longer be received" }, { "time": "2024-09-11T17:29:36.079275764Z", "level": "INFO", "source": { "function": "main.main.func3", "file": "/app/cli/main.go", "line": 130 }, "msg": "instrumentation loaded successfully" }