Skip to content

feat: bump minimum Go version to 1.24 #3875

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

Merged
merged 10 commits into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apps/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/DataDog/dd-trace-go/.github/workflows/apps

go 1.23.0
go 1.24.0

require (
github.com/DataDog/dd-trace-go/v2 v2.3.0-dev.1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
strategy:
matrix:
runs-on: [ macos-13, macos-15 ] # oldest and newest macos runners available - macos-15 is an ARM runner
go-version: [ "1.24", "1.23" ]
go-version: [ "1.25", "1.24" ]
fail-fast: true # saving some CI time - macos runners are too long to get
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -223,8 +223,8 @@ jobs:
needs: go-mod-caching
strategy:
matrix:
go-version: [ "1.24", "1.23" ]
distribution: [ bookworm, bullseye, alpine ]
go-version: [ "1.25", "1.24" ]
distribution: [ trixie, bookworm, alpine ]
platform: [ linux/amd64, linux/arm64 ]

fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-branch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
unit-integration-tests:
strategy:
matrix:
go-version: [ "1.23", "1.24" ]
go-version: [ "1.25", "1.24" ]
fail-fast: false
uses: ./.github/workflows/unit-integration-tests.yml
with:
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
matrix:
runs-on: [ macos-latest, windows-latest, ubuntu-latest ]
go-version: [ "1.23", "1.24" ]
go-version: [ "1.25", "1.24" ]
fail-fast: false
uses: ./.github/workflows/multios-unit-tests.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
id-token: write
pull-requests: write
with:
go-version: "1.23"
go-version: "1.24"
ref: ${{ github.ref }}
secrets: inherit
16 changes: 8 additions & 8 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Setup Go and development tools
uses: ./.github/actions/setup-go
with:
go-version: "1.23"
go-version: "1.24"
tools-dir: ${{ github.workspace }}/_tools
tools-bin: ${{ github.workspace }}/bin
- name: Run generate scripts and check diff
Expand All @@ -163,10 +163,10 @@ jobs:
matrix:
# TODO: cross-compilation from/to different hardware architectures once
# github provides native ARM runners.
go: [ "1.23", "1.24" ]
build-env: [ alpine, bookworm, bullseye ]
go: [ "1.25", "1.24" ]
build-env: [ alpine, trixie, bookworm ]
build-with-cgo: [ 0, 1 ]
deployment-env: [ alpine, debian11, debian12, al2, al2023, busybox, scratchy ]
deployment-env: [ alpine, debian12, debian13, al2, al2023, busybox, scratchy ]
include:
# GitHub limits the number of matrix jobs to 256, so we need to reduce
# it a bit, and we can reduce redundant tests.
Expand Down Expand Up @@ -194,10 +194,10 @@ jobs:
# environment: the C library isn't located at the same place.
- build-env: alpine
build-with-cgo: 1
deployment-env: debian11
deployment-env: debian12
- build-env: alpine
build-with-cgo: 1
deployment-env: debian12
deployment-env: debian13
- build-env: alpine
build-with-cgo: 1
deployment-env: al2
Expand All @@ -213,8 +213,8 @@ jobs:
# 2. Too old glibc on the deployment environment than on the build env
- build-env: bookworm
deployment-env: al2
- build-env: bookworm
deployment-env: debian11
- build-env: trixie
deployment-env: al2
# 3. Build with CGO enabled and deploying to a scratch/busybox docker
# image requires copying the dynamic lib dependencies (full example
# provided at https://github.com/DataDog/appsec-go-test-app/blob/main/examples/docker/scratch/Dockerfile)
Expand Down
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ stages:
- test-apps

variables:
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/56135449
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-go-56135449
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/73663692
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-go-73663692
INDEX_FILE: index.txt
BENCHMARK_TARGETS: "BenchmarkStartRequestSpan|BenchmarkHttpServeTrace|BenchmarkTracerAddSpans|BenchmarkStartSpan|BenchmarkSingleSpanRetention|BenchmarkOTelApiWithCustomTags|BenchmarkInjectW3C|BenchmarkExtractW3C|BenchmarkPartialFlushing|BenchmarkConfig|BenchmarkStartSpanConfig|BenchmarkGraphQL|BenchmarkSampleWAFContext|BenchmarkCaptureStackTrace|BenchmarkSetTagString|BenchmarkSetTagStringPtr|BenchmarkSetTagMetric|BenchmarkSetTagStringer|BenchmarkSerializeSpanLinksInMeta|BenchmarkLogs|BenchmarkParallelLogs|BenchmarkMetrics|BenchmarkParallelMetrics"

Expand Down Expand Up @@ -53,7 +53,7 @@ check-big-regressions:
pwd
export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :)
git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
git clone --branch hannahkm/parallel2 https://github.com/DataDog/benchmarking-platform platform && cd platform
git clone --branch dd-trace-go https://github.com/DataDog/benchmarking-platform platform && cd platform
./steps/download-child-pipeline-artifacts.sh
pushd "${ARTIFACTS_DIR}/"
pwd
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
script: |
export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :)
git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
git clone --branch hannahkm/parallel2 https://github.com/DataDog/benchmarking-platform /platform && cd /platform
git clone --branch dd-trace-go https://github.com/DataDog/benchmarking-platform /platform && cd /platform
./steps/capture-hardware-software-info.sh
TEST_NAME=$BENCHMARK_NAME bp-runner "${CI_PROJECT_DIR:-.}/.gitlab/bp-runner.yml" --debug -t
./steps/analyze-results.sh
Expand Down
20 changes: 10 additions & 10 deletions .gitlab/bp-runner.fail-on-breach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ experiments:
run: fail_on_breach
warning_range: 10
scenarios:
# Go 1.23
- name: normal_operation_cgo-cpu-bound/go123-profile-trace-asm
# Go oldstable
- name: normal_operation_cgo-cpu-bound/go124-profile-trace-asm
thresholds:
- agg_http_req_duration_p99 < 125.0 ms
- name: high_load_cgo-cpu-bound/go123-profile-trace-asm
- name: high_load_cgo-cpu-bound/go124-profile-trace-asm
thresholds:
- throughput < 40 op/s
- name: normal_operation_cgo-cpu-bound/go123-only-trace
- name: normal_operation_cgo-cpu-bound/go124-only-trace
thresholds:
- agg_http_req_duration_p99 < 125.0 ms
- name: high_load_cgo-cpu-bound/go123-only-trace
- name: high_load_cgo-cpu-bound/go124-only-trace
thresholds:
- throughput < 40 op/s
# Go 1.24
- name: normal_operation_cgo-cpu-bound/go124-profile-trace-asm
# Go stable
- name: normal_operation_cgo-cpu-bound/go125-profile-trace-asm
thresholds:
- agg_http_req_duration_p99 < 125.0 ms
- name: high_load_cgo-cpu-bound/go124-profile-trace-asm
- name: high_load_cgo-cpu-bound/go125-profile-trace-asm
thresholds:
- throughput < 40 op/s
- name: normal_operation_cgo-cpu-bound/go124-only-trace
- name: normal_operation_cgo-cpu-bound/go125-only-trace
thresholds:
- agg_http_req_duration_p99 < 125.0 ms
- name: high_load_cgo-cpu-bound/go124-only-trace
- name: high_load_cgo-cpu-bound/go125-only-trace
thresholds:
- throughput < 40 op/s
94 changes: 47 additions & 47 deletions .gitlab/macrobenchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,39 +56,39 @@ variables:
# 2. Rebuild image in Gitlab CI (build-images CI job in https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines?page=1&scope=all&ref=go%2Fgo-prof-app)
#

.go124-benchmarks:
.go-stable-benchmarks:
extends: .benchmarks-default
variables:
GO_VERSION: "1.24.0"
GO_VERSION: "1.25.0"

.go123-benchmarks:
.go-oldstable-benchmarks:
extends: .benchmarks-default
variables:
GO_VERSION: "1.23.6"
GO_VERSION: "1.24.6"

#
# Specific macrobenchmark configurations are below

go123-baseline:
extends: .go123-benchmarks
go-oldstable-baseline:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go123-only-trace:
extends: .go123-benchmarks
go-oldstable-only-trace:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go123-only-trace-with-runtime-metrics:
extends: .go123-benchmarks
go-oldstable-only-trace-with-runtime-metrics:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
Expand All @@ -97,62 +97,62 @@ go123-only-trace-with-runtime-metrics:
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
DD_RUNTIME_METRICS_ENABLED: "true"

go123-only-profile:
extends: .go123-benchmarks
go-oldstable-only-profile:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go123-profile-trace:
extends: .go123-benchmarks
go-oldstable-profile-trace:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go123-trace-asm:
extends: .go123-benchmarks
go-oldstable-trace-asm:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go123-profile-trace-asm:
extends: .go123-benchmarks
go-oldstable-profile-trace-asm:
extends: .go-oldstable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-baseline:
extends: .go124-benchmarks
go-stable-baseline:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-only-trace:
extends: .go124-benchmarks
go-stable-only-trace:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-only-trace-with-runtime-metrics:
extends: .go124-benchmarks
go-stable-only-trace-with-runtime-metrics:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
Expand All @@ -161,35 +161,35 @@ go124-only-trace-with-runtime-metrics:
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"
DD_RUNTIME_METRICS_ENABLED: "true"

go124-only-profile:
extends: .go124-benchmarks
go-stable-only-profile:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "false"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-profile-trace:
extends: .go124-benchmarks
go-stable-profile-trace:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "true"
ENABLE_APPSEC: "false"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-trace-asm:
extends: .go124-benchmarks
go-stable-trace-asm:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
ENABLE_PROFILING: "false"
ENABLE_APPSEC: "true"
DD_PROFILING_EXECUTION_TRACE_ENABLED: "false"

go124-profile-trace-asm:
extends: .go124-benchmarks
go-stable-profile-trace-asm:
extends: .go-stable-benchmarks
variables:
ENABLE_DDPROF: "false"
ENABLE_TRACING: "true"
Expand All @@ -200,20 +200,20 @@ go124-profile-trace-asm:
check-slo-breaches:
stage: gates
needs: [
"go123-baseline",
"go123-only-trace",
"go123-only-trace-with-runtime-metrics",
"go123-only-profile",
"go123-profile-trace",
"go123-trace-asm",
"go123-profile-trace-asm",
"go124-baseline",
"go124-only-trace",
"go124-only-trace-with-runtime-metrics",
"go124-only-profile",
"go124-profile-trace",
"go124-trace-asm",
"go124-profile-trace-asm",
"go-oldstable-baseline",
"go-oldstable-only-trace",
"go-oldstable-only-trace-with-runtime-metrics",
"go-oldstable-only-profile",
"go-oldstable-profile-trace",
"go-oldstable-trace-asm",
"go-oldstable-profile-trace-asm",
"go-stable-baseline",
"go-stable-only-trace",
"go-stable-only-trace-with-runtime-metrics",
"go-stable-only-profile",
"go-stable-profile-trace",
"go-stable-trace-asm",
"go-stable-profile-trace-asm",
]
when: on_success
tags: ["arch:amd64"]
Expand Down Expand Up @@ -266,7 +266,7 @@ notify-slo-breaches:
- platform/artifacts-se/
expire_in: 3 months
variables:
GO_VERSION: "1.23.0"
GO_VERSION: "1.25.0" # It needs to be at the latest stable release
ARTIFACTS_DIR: "./artifacts-se"
SERVICE_EXTENSION: "true"

Expand Down
4 changes: 1 addition & 3 deletions _tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/DataDog/dd-trace-go/_tools

go 1.23.1

toolchain go1.24.5
go 1.24.0

require (
github.com/campoy/embedmd v1.0.0
Expand Down
Loading
Loading