From 88e7be329c686545df7541e9ebc15d6ab0fc95cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:53:55 -0700 Subject: [PATCH 1/3] [auto] Update generated offsets (#1116) * Update generated offsets * Add changelog entry --------- Co-authored-by: MrAlias <5543599+MrAlias@users.noreply.github.com> Co-authored-by: Tyler Yahn --- CHANGELOG.md | 1 + internal/pkg/inject/offset_results.json | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd5677682..955edd450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http - The `WithLogger` `InstrumentationOption` is added as a replacement for `WithLogLevel`. An `slog.Logger` can now be configured by the user any way they want and then passed to the `Instrumentation` for its logging with this option. ([#1080](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1080)) - Support `google.golang.org/grpc` `1.66.2`. ([#1083](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1083)) +- Support `google.golang.org/grpc` `1.67.0`. ([#1116](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1116)) ### Changed diff --git a/internal/pkg/inject/offset_results.json b/internal/pkg/inject/offset_results.json index d41d7bfc3..cd9af04c3 100644 --- a/internal/pkg/inject/offset_results.json +++ b/internal/pkg/inject/offset_results.json @@ -1559,6 +1559,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -1768,6 +1769,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -1977,6 +1979,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -2181,6 +2184,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -2400,6 +2404,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -2599,6 +2604,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -2813,6 +2819,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -3017,6 +3024,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -3216,6 +3224,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } @@ -3445,6 +3454,7 @@ "1.66.1", "1.66.2", "1.67.0-dev", + "1.67.0", "1.68.0-dev" ] } From 8cb43be464efd54cb85fe96e1b3c38c9169a4c06 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 20 Sep 2024 13:57:00 -0700 Subject: [PATCH 2/3] Bump Go supported versions (#1115) * Bump Go supported versions Use Go 1.23 for building and testing. * Add changelog entry --- .github/workflows/build.yaml | 2 +- .github/workflows/checks.yml | 4 ++-- .github/workflows/create-dependabot-pr.yml | 2 +- .github/workflows/kind.yml | 2 +- .github/workflows/offsets.yml | 2 +- .github/workflows/probe_load.yaml | 4 ++-- CHANGELOG.md | 1 + README.md | 3 +-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 43ad35175..7c6ad5aef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ on: pull_request: env: - GO_VERSION: "~1.22.2" + GO_VERSION: "~1.23.1" jobs: generate-and-test-x86_64: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d648fb50e..0545e7107 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: env: - GO_VERSION: "~1.22.2" + GO_VERSION: "~1.23.1" jobs: check-links: @@ -57,7 +57,7 @@ jobs: compatibility-test: strategy: matrix: - go-version: ["~1.22.2", "~1.21.9"] + go-version: ["~1.23.1", "~1.22.7"] os: [ubuntu-latest] # GitHub Actions does not support arm* architectures on default # runners. It is possible to accomplish this with a self-hosted runner diff --git a/.github/workflows/create-dependabot-pr.yml b/.github/workflows/create-dependabot-pr.yml index e2abe0a19..35959fb7e 100644 --- a/.github/workflows/create-dependabot-pr.yml +++ b/.github/workflows/create-dependabot-pr.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "~1.22.1" + go-version: "~1.23.1" check-latest: true cache-dependency-path: "**/go.sum" diff --git a/.github/workflows/kind.yml b/.github/workflows/kind.yml index ab38efb11..0d304c454 100644 --- a/.github/workflows/kind.yml +++ b/.github/workflows/kind.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "~1.22.0" + go-version: "~1.23.1" check-latest: true - name: Setup BATS uses: mig4/setup-bats@v1 diff --git a/.github/workflows/offsets.yml b/.github/workflows/offsets.yml index a388ba340..beeffe399 100644 --- a/.github/workflows/offsets.yml +++ b/.github/workflows/offsets.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "~1.22.2" + go-version: "~1.23.1" check-latest: true cache-dependency-path: "**/go.sum" diff --git a/.github/workflows/probe_load.yaml b/.github/workflows/probe_load.yaml index 1333da5f3..f6ec0fc4a 100644 --- a/.github/workflows/probe_load.yaml +++ b/.github/workflows/probe_load.yaml @@ -6,7 +6,7 @@ on: pull_request: env: - go_version: '~1.22' + go_version: '~1.23' CGO_ENABLED: '0' jobs: @@ -44,4 +44,4 @@ jobs: run: OTEL_GO_AUTO_SHOW_VERIFIER_LOG=false vimto -kernel :${{ matrix.tag }} -- go test -v -count=1 -tags=multi_kernel_test go.opentelemetry.io/auto/internal/pkg/instrumentation - name: Test with verifier logs run: OTEL_GO_AUTO_SHOW_VERIFIER_LOG=true vimto -kernel :${{ matrix.tag }} -- go test -v -count=1 -tags=multi_kernel_test go.opentelemetry.io/auto/internal/pkg/instrumentation - if: always() && steps.no_verifier_logs_test.outcome == 'failure' \ No newline at end of file + if: always() && steps.no_verifier_logs_test.outcome == 'failure' diff --git a/CHANGELOG.md b/CHANGELOG.md index 955edd450..a564944bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http - The unused `LogLevelError` constant is removed. ([#1080](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1080)) - The unused `LogLevel` type is removed. ([#1080](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1080)) - The unused `ParseLogLevel` function is removed. ([#1080](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1080)) +- Drop agent build support for Go 1.21. ([#1115](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1115)) ## [v0.14.0-alpha] - 2024-07-15 diff --git a/README.md b/README.md index 9fe443acf..c9b4ef006 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,8 @@ Currently, OpenTelemetry Go Automatic Instrumentation is tested for the followin | OS | Go Version | Architecture | | ------- | ---------- | ------------ | +| Ubuntu | 1.23 | amd64 | | Ubuntu | 1.22 | amd64 | -| Ubuntu | 1.21 | amd64 | -| Ubuntu | 1.20 | amd64 | Automatic instrumentation should work on any Linux kernel above 4.4. From 246ee86357dbcf8924990fbf44144ccc51e6378f Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 20 Sep 2024 14:14:10 -0700 Subject: [PATCH 3/3] Implement the Span.TracerProvider method (#1109) --- sdk/trace.go | 4 +--- sdk/trace_test.go | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sdk/trace.go b/sdk/trace.go index b011fae2a..8e0f4fd5f 100644 --- a/sdk/trace.go +++ b/sdk/trace.go @@ -163,6 +163,4 @@ func (s *span) SetName(name string) { /* TODO: implement */ } -func (*span) TracerProvider() trace.TracerProvider { - return GetTracerProvider() -} +func (*span) TracerProvider() trace.TracerProvider { return GetTracerProvider() } diff --git a/sdk/trace_test.go b/sdk/trace_test.go index 91a9636e5..3d1013750 100644 --- a/sdk/trace_test.go +++ b/sdk/trace_test.go @@ -47,3 +47,10 @@ func TestSpanNilUnsampledGuards(t *testing.T) { t.Run("SetAttributes", run(func(s *span) { s.SetAttributes(attrs...) })) t.Run("TracerProvider", run(func(s *span) { _ = s.TracerProvider() })) } + +func TestSpanTracerProvider(t *testing.T) { + var s span + + got := s.TracerProvider() + assert.IsType(t, tracerProvider{}, got) +}