-
Notifications
You must be signed in to change notification settings - Fork 440
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
fix(ddtrace/tracer): avoid tests to fail with error "non-constant format string" from upcoming Go 1.24 release #3048
Conversation
…mat string" from upcoming Go 1.24 release
Datadog ReportBranch report: ✅ 0 Failed, 2996 Passed, 24 Skipped, 2m 33.38s Total Time |
BenchmarksBenchmark execution time: 2025-01-13 11:41:13 Comparing candidate commit a538fc4 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 56 metrics, 1 unstable metrics. scenario:BenchmarkPartialFlushing/Disabled-24
scenario:BenchmarkPartialFlushing/Enabled-24
|
…mat string" from upcoming Go 1.24 release (#3048)
What does this PR do?
Upcoming Go 1.24 release introduces a new
go vet
check (golang/go#60529) for printf calls with non-const format and no args. This causesgo test
to fail to run ingotip
:We decided to strategically modify all logging statements, after trying refactoring
internal/log
API to offer:Debug
,Info
,Warn
,Error
functions for logging a string without argumentsDebugf
,Infof
,Warnf
,Errorf
function for logging formatted messages with argumentsThis caused a significant amount of changes across the repository, but we want to keep the API as coherent as possible. It mirrors stdlib's
log
API.Motivation
Avoid unintended consequences from upcoming Go 1.24 release.
Reviewer's Checklist
v2-dev
branch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!