From b5a2577fffc7323e125dffdcd4b790b99082d6af Mon Sep 17 00:00:00 2001 From: Ron Federman Date: Thu, 22 Aug 2024 11:06:11 +0300 Subject: [PATCH] Increade BSP timeout for a more consistent batch size in e2e tests --- .github/workflows/e2e/k8s/sample-job.yml | 2 + internal/test/e2e/kafka-go/traces.json | 62 +----------------------- internal/test/e2e/kafka-go/verify.bats | 2 +- 3 files changed, 4 insertions(+), 62 deletions(-) diff --git a/.github/workflows/e2e/k8s/sample-job.yml b/.github/workflows/e2e/k8s/sample-job.yml index 40c758d6e..2ac20a83f 100644 --- a/.github/workflows/e2e/k8s/sample-job.yml +++ b/.github/workflows/e2e/k8s/sample-job.yml @@ -38,6 +38,8 @@ spec: value: "tracecontext,baggage" - name: OTEL_GO_AUTO_INCLUDE_DB_STATEMENT value: "true" + - name: OTEL_BSP_SCHEDULE_DELAY + value: "60000" resources: {} securityContext: runAsUser: 0 diff --git a/internal/test/e2e/kafka-go/traces.json b/internal/test/e2e/kafka-go/traces.json index a9aacdea8..ff84e8808 100644 --- a/internal/test/e2e/kafka-go/traces.json +++ b/internal/test/e2e/kafka-go/traces.json @@ -137,67 +137,7 @@ "spanId": "xxxxx", "status": {}, "traceId": "xxxxx" - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "process.runtime.description", - "value": { - "stringValue": "go version 1.23.0 linux/amd64" - } - }, - { - "key": "process.runtime.name", - "value": { - "stringValue": "go" - } - }, - { - "key": "process.runtime.version", - "value": { - "stringValue": "1.23.0" - } - }, - { - "key": "service.name", - "value": { - "stringValue": "sample-app" - } - }, - { - "key": "telemetry.distro.name", - "value": { - "stringValue": "opentelemetry-go-instrumentation" - } - }, - { - "key": "telemetry.distro.version", - "value": { - "stringValue": "v0.14.0-alpha" - } - }, - { - "key": "telemetry.sdk.language", - "value": { - "stringValue": "go" - } - } - ] - }, - "schemaUrl": "https://opentelemetry.io/schemas/1.26.0", - "scopeSpans": [ - { - "schemaUrl": "https://opentelemetry.io/schemas/1.26.0", - "scope": { - "name": "go.opentelemetry.io/auto/github.com/segmentio/kafka-go", - "version": "v0.14.0-alpha" - }, - "spans": [ + }, { "attributes": [ { diff --git a/internal/test/e2e/kafka-go/verify.bats b/internal/test/e2e/kafka-go/verify.bats index ae8f5a4dd..b18f2791d 100644 --- a/internal/test/e2e/kafka-go/verify.bats +++ b/internal/test/e2e/kafka-go/verify.bats @@ -7,7 +7,7 @@ SCOPE="go.opentelemetry.io/auto/github.com/segmentio/kafka-go" @test "go-auto :: includes service.name in resource attributes" { result=$(resource_attributes_received | jq "select(.key == \"service.name\").value.stringValue") result_separated=$(echo $result | sed 's/\n/,/g') - assert_equal "$result_separated" '"sample-app" "sample-app"' + assert_equal "$result_separated" '"sample-app"' } @test "kafka producer,consumer :: valid {messaging.system} for all spans" {