Skip to content

Commit e8dc902

Browse files
committed
Wire up tests to support otel tracing
Integration tests will now configure clients to propagate traces as well as create spans for all tests. Some extra changes were needed (or desired for trace propagation) in the test helpers to pass through tracing spans via context. Signed-off-by: Brian Goff <[email protected]>
1 parent 642e991 commit e8dc902

211 files changed

Lines changed: 3827 additions & 2709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ DOCKER_ENVS := \
7575
-e PLATFORM \
7676
-e DEFAULT_PRODUCT_LICENSE \
7777
-e PRODUCT \
78-
-e PACKAGER_NAME
78+
-e PACKAGER_NAME \
79+
-e OTEL_EXPORTER_OTLP_ENDPOINT \
80+
-e OTEL_EXPORTER_OTLP_PROTOCOL \
81+
-e OTEL_SERVICE_NAME
7982
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
8083

8184
# to allow `make BIND_DIR=. shell` or `make BIND_DIR= test`

hack/make/.integration-test-helpers

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ test_env() {
197197
TEMP="$TEMP" \
198198
TEST_CLIENT_BINARY="$TEST_CLIENT_BINARY" \
199199
TEST_INTEGRATION_USE_SNAPSHOTTER="$TEST_INTEGRATION_USE_SNAPSHOTTER" \
200+
OTEL_EXPORTER_OTLP_ENDPOINT="$OTEL_EXPORTER_OTLP_ENDPOINT" \
201+
OTEL_SERVICE_NAME="$OTEL_SERVICE_NAME" \
200202
"$@"
201203
)
202204
}

integration-cli/benchmark_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"context"
45
"fmt"
56
"os"
67
"runtime"
@@ -16,8 +17,8 @@ type DockerBenchmarkSuite struct {
1617
ds *DockerSuite
1718
}
1819

19-
func (s *DockerBenchmarkSuite) TearDownTest(c *testing.T) {
20-
s.ds.TearDownTest(c)
20+
func (s *DockerBenchmarkSuite) TearDownTest(ctx context.Context, c *testing.T) {
21+
s.ds.TearDownTest(ctx, c)
2122
}
2223

2324
func (s *DockerBenchmarkSuite) OnTimeout(c *testing.T) {

0 commit comments

Comments
 (0)