diff --git a/.codecov.yml b/.codecov.yml index 99f65b0154a..541321719e2 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -11,6 +11,7 @@ ignore: - "thrift-gen/*/*" - "**/thrift-0.9.2/*" - "**/main.go" + - "cmd/jaeger/internal/integration/datareceivers" - "examples/hotrod" coverage: diff --git a/.github/workflows/ci-grpc-badger.yml b/.github/workflows/ci-badger.yaml similarity index 86% rename from .github/workflows/ci-grpc-badger.yml rename to .github/workflows/ci-badger.yaml index ef5afd8102c..4f4dd425385 100644 --- a/.github/workflows/ci-grpc-badger.yml +++ b/.github/workflows/ci-badger.yaml @@ -1,4 +1,4 @@ -name: CIT gRPC And Badger +name: CIT Badger on: push: @@ -16,7 +16,7 @@ permissions: # added using https://github.com/step-security/secure-workflows contents: read jobs: - grpc-and-badger: + badger: runs-on: ubuntu-latest steps: - name: Harden Runner @@ -33,17 +33,14 @@ jobs: - name: Run Badger storage integration tests run: make badger-storage-integration-test - - name: Run gRPC storage integration tests - run: make grpc-storage-integration-test - - name: Setup CODECOV_TOKEN uses: ./.github/actions/setup-codecov - name: Upload coverage to codecov uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 with: - files: cover.out,cover-badger.out + files: cover.out verbose: true - flags: grpc-badger + flags: badger fail_ci_if_error: true token: ${{ env.CODECOV_TOKEN }} diff --git a/.github/workflows/ci-grpc.yml b/.github/workflows/ci-grpc.yml new file mode 100644 index 00000000000..f7087a0b1c1 --- /dev/null +++ b/.github/workflows/ci-grpc.yml @@ -0,0 +1,57 @@ +name: CIT gRPC + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + +jobs: + grpc: + runs-on: ubuntu-latest + strategy: + matrix: + version: [v1, v2] + steps: + - name: Harden Runner + uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: 1.22.x + + - name: Run gRPC storage integration tests + run: | + case ${{ matrix.version }} in + v1) + make grpc-storage-integration-test + ;; + v2) + bash scripts/grpc-integration-test.sh latest + ;; + esac + + - name: Setup CODECOV_TOKEN + uses: ./.github/actions/setup-codecov + + - name: Upload coverage to codecov + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 + with: + files: cover.out + verbose: true + flags: grpc + fail_ci_if_error: true + token: ${{ env.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index a66dcb760cd..63cd11b81bd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ cmd/collector/collector cmd/collector/collector-* cmd/ingester/ingester cmd/ingester/ingester-* +cmd/jaeger/internal/integration/results cmd/remote-storage/remote-storage cmd/remote-storage/remote-storage-* cmd/es-index-cleaner/es-index-cleaner-* diff --git a/Makefile b/Makefile index 40d8905848e..e612076cb7f 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ SHELL := /bin/bash JAEGER_IMPORT_PATH = github.com/jaegertracing/jaeger STORAGE_PKGS = ./plugin/storage/integration/... +JAEGER_STORAGE_PKGS = ./cmd/jaeger/internal/integration # These DOCKER_xxx vars are used when building Docker images. DOCKER_NAMESPACE?=jaegertracing @@ -118,9 +119,21 @@ storage-integration-test: go clean -testcache bash -c "set -e; set -o pipefail; $(GOTEST) -coverpkg=./... -coverprofile cover.out $(STORAGE_PKGS) $(COLORIZE)" +# A general integration tests for jaeger-v2 storage backends, +# these tests placed at `./cmd/jaeger/internal/integration/*_test.go`. +# The integration tests are filtered by STORAGE env, +# currently the available STORAGE variable is: +# - grpc +.PHONY: jaeger-storage-integration-test +jaeger-storage-integration-test: + # Expire tests results for jaeger storage integration tests since the environment might change + # even though the code remains the same. + go clean -testcache + bash -c "set -e; set -o pipefail; $(GOTEST) -coverpkg=./... -coverprofile cover.out $(JAEGER_STORAGE_PKGS) $(COLORIZE)" + .PHONY: badger-storage-integration-test badger-storage-integration-test: - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration -coverpkg=./... -coverprofile cover-badger.out $(STORAGE_PKGS) $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration -coverpkg=./... -coverprofile cover.out $(STORAGE_PKGS) $(COLORIZE)" .PHONY: grpc-storage-integration-test grpc-storage-integration-test: diff --git a/cmd/jaeger/internal/command.go b/cmd/jaeger/internal/command.go index 072a05e8cc1..b53e22e4307 100644 --- a/cmd/jaeger/internal/command.go +++ b/cmd/jaeger/internal/command.go @@ -29,7 +29,7 @@ func Command() *cobra.Command { settings := otelcol.CollectorSettings{ BuildInfo: info, - Factories: components, + Factories: Components, } cmd := otelcol.NewCommand(settings) diff --git a/cmd/jaeger/internal/components.go b/cmd/jaeger/internal/components.go index 2b758a55990..d98582023ba 100644 --- a/cmd/jaeger/internal/components.go +++ b/cmd/jaeger/internal/components.go @@ -116,6 +116,6 @@ func (b builders) build() (otelcol.Factories, error) { return factories, nil } -func components() (otelcol.Factories, error) { +func Components() (otelcol.Factories, error) { return defaultBuilders().build() } diff --git a/cmd/jaeger/internal/components_test.go b/cmd/jaeger/internal/components_test.go index fed360d0bdd..fd333453691 100644 --- a/cmd/jaeger/internal/components_test.go +++ b/cmd/jaeger/internal/components_test.go @@ -29,7 +29,7 @@ import ( ) func TestComponents(t *testing.T) { - factories, err := components() + factories, err := Components() require.NoError(t, err) diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go index 0ee7ed1c173..915d554efeb 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go @@ -21,6 +21,7 @@ import ( esCfg "github.com/jaegertracing/jaeger/pkg/es/config" memoryCfg "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/testutils" badgerCfg "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/storage" "github.com/jaegertracing/jaeger/storage/dependencystore" @@ -181,17 +182,19 @@ func TestESStorageExtension(t *testing.T) { } func TestESStorageExtensionError(t *testing.T) { + defer testutils.VerifyGoLeaksOnce(t) + ext := makeStorageExtenion(t, &Config{ Elasticsearch: map[string]esCfg.Configuration{ "foo": { - Servers: []string{"http://badurl"}, + Servers: []string{"http://127.0.0.1:65535"}, LogLevel: "error", }, }, }) err := ext.Start(context.Background(), componenttest.NewNopHost()) require.ErrorContains(t, err, "failed to initialize elasticsearch storage") - require.ErrorContains(t, err, "badurl") + require.ErrorContains(t, err, "http://127.0.0.1:65535") } func noopTelemetrySettings() component.TelemetrySettings { diff --git a/cmd/jaeger/internal/integration/README.md b/cmd/jaeger/internal/integration/README.md new file mode 100644 index 00000000000..e530ae36ce5 --- /dev/null +++ b/cmd/jaeger/internal/integration/README.md @@ -0,0 +1,27 @@ +# Integration + +Jaeger v2 integration tests are built on top of [OTEL Testbed module](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/testbed). OTEL Testbed provide comprehensive tools for conducting end-to-end tests for the OTEL Collector, such as reproducible short-term benchmarks, correctness tests, long-running stability tests and maximum load stress tests. However, we only utilize the correctness tests from testbed, it generates and sends every combinatorial trace attributes and matches every single of them with the received traces from another end. To learn more about OTEL Testbed, please refer to the their [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/testbed/README.md). + +## Architecture + +Here's the architecture to test the OpenTelemetry Collector pipeline from end-to-end with the designated storage backends. +![integration diagram](integration-diagram.png) + +Testbed components: +| Component | Description | +|-----------|-------------| +| **LoadGenerator** | Encapsulates DataProvider and DataSender in order to generate and send data. | +| Golden DataProvider | Generates traces from the "Golden" dataset generated using pairwise combinatorial testing techniques. Testbed example uses [PICT](https://github.com/microsoft/pict/) to generate the test data, e.g. [testdata](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/internal/coreinternal/goldendataset/testdata). | +| OTLP Trace DataSender | With the generated traces from DataProvider, the DataSender sends traces to OTLP receiver in the collector instance. | +| **Mockbackend** | Encapsulates DataReceiver and provides consume functionality. | +| DataReceiver | A custom DataReceiver that will host a Jaeger storage extension to retrieve traces from the database by pulling them using our artificial Jaeger storage receiver. | +| Consumer | Consumer does not actually a thing in MockBackend but only to make the diagram intuitive, the traces received from our artificial receiver will be stored inside MockBackend. | +| **Correctness Test Validator** | Checks if the traces received from MockBackend are all matches with the generated traces from DataProvider. | + +## gRPC Integration Test + +To conduct the tests, run the following command: + +``` +scripts/grpc-integration-test.sh +``` diff --git a/cmd/jaeger/internal/integration/datareceivers/.nocover b/cmd/jaeger/internal/integration/datareceivers/.nocover new file mode 100644 index 00000000000..8a76746bfe7 --- /dev/null +++ b/cmd/jaeger/internal/integration/datareceivers/.nocover @@ -0,0 +1 @@ +A custom testbed data receiver for integration testing purpose \ No newline at end of file diff --git a/cmd/jaeger/internal/integration/datareceivers/jaegerstorage.go b/cmd/jaeger/internal/integration/datareceivers/jaegerstorage.go new file mode 100644 index 00000000000..b6037dafb5e --- /dev/null +++ b/cmd/jaeger/internal/integration/datareceivers/jaegerstorage.go @@ -0,0 +1,87 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package datareceivers + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" + "github.com/open-telemetry/opentelemetry-collector-contrib/testbed/testbed" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" + + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/integration/receivers/storagereceiver" +) + +type jaegerStorageDataReceiver struct { + TraceStorage string + StorageConfig *jaegerstorage.Config + host *storagetest.StorageHost + receiver receiver.Traces +} + +func NewJaegerStorageDataReceiver(traceStorage string, storageConfig *jaegerstorage.Config) testbed.DataReceiver { + return &jaegerStorageDataReceiver{ + TraceStorage: traceStorage, + StorageConfig: storageConfig, + } +} + +func (dr *jaegerStorageDataReceiver) Start(tc consumer.Traces, _ consumer.Metrics, _ consumer.Logs) error { + ctx := context.Background() + + extFactory := jaegerstorage.NewFactory() + ext, err := extFactory.CreateExtension(ctx, extension.CreateSettings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + BuildInfo: component.NewDefaultBuildInfo(), + }, dr.StorageConfig) + if err != nil { + return err + } + + rcvSet := receivertest.NewNopCreateSettings() + rcvFactory := storagereceiver.NewFactory() + rcvCfg := rcvFactory.CreateDefaultConfig().(*storagereceiver.Config) + rcvCfg.TraceStorage = dr.TraceStorage + rcv, err := rcvFactory.CreateTracesReceiver(ctx, rcvSet, rcvCfg, tc) + if err != nil { + return err + } + dr.receiver = rcv + + dr.host = storagetest.NewStorageHost() + dr.host.WithExtension(jaegerstorage.ID, ext) + + err = dr.host.GetExtensions()[jaegerstorage.ID].Start(ctx, dr.host) + if err != nil { + return err + } + return dr.receiver.Start(ctx, dr.host) +} + +func (dr *jaegerStorageDataReceiver) Stop() error { + ctx := context.Background() + err := dr.receiver.Shutdown(ctx) + if err != nil { + return err + } + return dr.host.GetExtensions()[jaegerstorage.ID].Shutdown(ctx) +} + +func (dr *jaegerStorageDataReceiver) GenConfigYAMLStr() string { + return fmt.Sprintf(` + jaeger_storage_receiver: + trace_storage: %s +`, dr.TraceStorage) +} + +func (dr *jaegerStorageDataReceiver) ProtocolName() string { + return "jaeger_storage_receiver" +} diff --git a/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_spans.txt b/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_spans.txt new file mode 100644 index 00000000000..138f2974806 --- /dev/null +++ b/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_spans.txt @@ -0,0 +1,307 @@ +Parent Tracestate Kind Attributes Events Links Status +Root Empty Producer FaaSPubSub Empty Empty Ok +Child One Internal Internal Empty Empty Ok +Child Four Producer Empty Empty Empty Ok +Child One Unspecified gRPCServer Eight Empty Unset +Root Four Server HTTPServer One Empty Unset +Child Four Unspecified Internal Two Empty Ok +Root Four Producer Empty Empty Empty Unset +Child Four Server FaaSHTTP Empty Empty Unset +Child Empty Server FaaSHTTP Two Empty Error +Child Four Unspecified MessagingConsumer Two Empty Ok +Child One Producer MessagingProducer One Empty Unset +Child One Internal Internal Eight Empty Error +Child One Server FaaSTimer Eight Empty Ok +Root Empty Server FaaSTimer Two Empty Ok +Child Four Unspecified FaaSDatasource One Empty Ok +Child One Unspecified HTTPServer One Empty Ok +Root One Server gRPCServer One Empty Ok +Child Empty Unspecified DatabaseNoSQL One Empty Ok +Child One Client DatabaseNoSQL Empty Empty Error +Child Four Client HTTPClient Eight Empty Ok +Root Four Producer Empty One Empty Error +Root One Server FaaSTimer Empty Empty Ok +Child Four Consumer FaaSDatasource Eight Empty Unset +Child One Server FaaSOther Two Empty Ok +Child Four Server FaaSHTTP Two Empty Error +Child Four Unspecified gRPCClient Two Empty Ok +Root Four Producer MessagingProducer Two Empty Ok +Root One Server MaxCount Eight Empty Ok +Child Four Server MaxCount Two Empty Unset +Child One Client gRPCClient Empty Empty Error +Root Empty Producer FaaSPubSub One Empty Unset +Child Four Server FaaSTimer Two Empty Ok +Child One Producer MessagingProducer Two Empty Unset +Child Four Unspecified Empty One Empty Ok +Root One Server FaaSHTTP Eight Empty Error +Child Four Client DatabaseNoSQL Two Empty Ok +Child Empty Unspecified FaaSPubSub Eight Empty Ok +Child Empty Server gRPCServer Eight Empty Error +Child Four Client DatabaseNoSQL Two Empty Error +Root One Producer MessagingProducer One Empty Unset +Root One Server FaaSTimer One Empty Ok +Child Four Internal Internal Eight Empty Error +Child One Client DatabaseNoSQL Two Empty Error +Child Four Unspecified gRPCClient One Empty Error +Root Four Server FaaSTimer Empty Empty Ok +Child Four Client HTTPClient Eight Empty Error +Child Empty Unspecified Empty Two Empty Ok +Child One Server HTTPServer Eight Empty Ok +Child Empty Unspecified gRPCClient Empty Empty Ok +Child One Unspecified Internal Two Empty Error +Child Four Unspecified MessagingConsumer Empty Empty Ok +Child Empty Unspecified FaaSDatasource Empty Empty Error +Root One Producer MessagingProducer One Empty Ok +Child Four Unspecified DatabaseNoSQL One Empty Error +Root One Server HTTPServer Two Empty Unset +Child One Producer Empty Eight Empty Unset +Child One Unspecified DatabaseNoSQL One Empty Unset +Child Four Client DatabaseNoSQL Eight Empty Unset +Child Empty Unspecified Internal One Empty Ok +Child One Unspecified MessagingProducer Eight Empty Unset +Child Four Server FaaSOther Empty Empty Ok +Child Empty Consumer MessagingConsumer Eight Empty Unset +Child One Server FaaSOther Empty Empty Ok +Child Empty Unspecified MaxCount Empty Empty Error +Child Four Producer FaaSPubSub Two Empty Unset +Child One Client Empty One Empty Ok +Child Empty Producer Empty One Empty Unset +Child Four Client DatabaseSQL Eight Empty Error +Child Four Server FaaSOther Eight Empty Unset +Root Empty Server FaaSHTTP Two Empty Ok +Child One Client DatabaseSQL Eight Empty Unset +Child One Unspecified FaaSHTTP Empty Empty Error +Child One Unspecified MessagingProducer Eight Empty Ok +Child Empty Consumer MessagingConsumer Two Empty Unset +Child Empty Unspecified DatabaseNoSQL Two Empty Error +Child Four Unspecified FaaSDatasource Empty Empty Error +Child One Unspecified MaxCount Empty Empty Ok +Child One Unspecified FaaSDatasource Eight Empty Unset +Child Four Consumer MessagingConsumer Empty Empty Error +Child Four Client Empty Eight Empty Ok +Child One Consumer MessagingConsumer One Empty Error +Child One Client gRPCClient Eight Empty Error +Child Four Unspecified FaaSTimer Two Empty Error +Child One Client gRPCClient Eight Empty Ok +Child Empty Server FaaSHTTP Empty Empty Error +Child Four Unspecified FaaSOther Empty Empty Unset +Child Empty Consumer MessagingConsumer One Empty Ok +Child Four Client DatabaseSQL Eight Empty Unset +Child Four Unspecified MessagingProducer Empty Empty Ok +Child One Client DatabaseSQL Empty Empty Ok +Root Four Server FaaSOther Empty Empty Ok +Child Four Unspecified gRPCClient One Empty Unset +Child Empty Unspecified HTTPServer Two Empty Ok +Root One Producer Empty Eight Empty Ok +Child One Producer FaaSPubSub One Empty Error +Root Four Server FaaSHTTP Two Empty Ok +Child One Unspecified DatabaseSQL Two Empty Ok +Root Empty Server FaaSTimer Empty Empty Error +Child One Server MaxCount One Empty Unset +Child One Producer Empty Two Empty Unset +Child Four Server HTTPServer Eight Empty Unset +Root Empty Server HTTPServer One Empty Ok +Child Four Server FaaSOther One Empty Unset +Child One Producer Empty One Empty Unset +Child One Producer MessagingProducer One Empty Error +Child One Unspecified gRPCClient Two Empty Ok +Root Empty Server HTTPServer Eight Empty Error +Child Empty Unspecified FaaSHTTP One Empty Ok +Root One Server FaaSHTTP One Empty Unset +Child Four Unspecified MessagingConsumer Eight Empty Error +Child Empty Unspecified FaaSPubSub Two Empty Unset +Child Empty Client DatabaseSQL Two Empty Ok +Child Four Unspecified Empty Empty Empty Error +Child Empty Producer FaaSPubSub Eight Empty Ok +Child Four Producer Empty Two Empty Unset +Child Four Unspecified MessagingProducer Eight Empty Ok +Child Empty Unspecified MessagingProducer One Empty Error +Child Empty Server MaxCount One Empty Unset +Root Four Server FaaSHTTP One Empty Ok +Child Empty Server HTTPServer Two Empty Unset +Child One Unspecified Empty One Empty Ok +Child Empty Server gRPCServer Empty Empty Error +Child Four Unspecified gRPCServer One Empty Ok +Child Four Consumer MessagingConsumer Eight Empty Ok +Child Empty Unspecified DatabaseSQL Empty Empty Unset +Child Four Producer MessagingProducer Empty Empty Unset +Child One Client Empty Two Empty Error +Child Four Unspecified gRPCServer Empty Empty Unset +Child Empty Producer FaaSPubSub Two Empty Error +Child One Unspecified FaaSTimer Two Empty Unset +Child Empty Internal Internal One Empty Ok +Child One Client DatabaseSQL Empty Empty Error +Child Four Producer Empty Empty Empty Error +Child Four Unspecified FaaSTimer Empty Empty Unset +Child Four Client gRPCClient Two Empty Unset +Child Empty Unspecified Internal One Empty Error +Root Empty Server FaaSHTTP Empty Empty Error +Child Empty Server FaaSTimer Two Empty Unset +Child Four Consumer MessagingConsumer Empty Empty Unset +Child Empty Unspecified Internal Empty Empty Ok +Child Empty Producer MessagingProducer Two Empty Error +Child Four Client Empty Eight Empty Error +Child One Client DatabaseNoSQL One Empty Unset +Child Empty Client Empty Eight Empty Ok +Child One Server FaaSTimer One Empty Error +Child One Producer FaaSPubSub Eight Empty Ok +Child One Unspecified FaaSPubSub One Empty Ok +Child Empty Producer Empty Eight Empty Ok +Child Four Unspecified FaaSHTTP Empty Empty Unset +Child One Unspecified FaaSHTTP Empty Empty Ok +Child Empty Producer MessagingProducer One Empty Error +Child One Consumer FaaSDatasource One Empty Ok +Child One Client HTTPClient Eight Empty Error +Child Four Unspecified MaxCount Two Empty Ok +Root Empty Server HTTPServer Empty Empty Ok +Child Four Server HTTPServer Empty Empty Error +Child Four Internal Internal One Empty Error +Child Empty Server FaaSTimer Two Empty Error +Root Four Producer FaaSPubSub Two Empty Ok +Child Four Unspecified FaaSDatasource Eight Empty Error +Child One Unspecified DatabaseNoSQL Two Empty Error +Root One Server FaaSHTTP One Empty Error +Child Empty Server gRPCServer Two Empty Unset +Root Empty Producer Empty Empty Empty Error +Child Four Unspecified FaaSPubSub One Empty Error +Child One Unspecified FaaSHTTP Eight Empty Error +Child One Server MaxCount Two Empty Unset +Root Four Server FaaSOther Eight Empty Error +Child Empty Client DatabaseNoSQL Empty Empty Error +Child One Client Empty Empty Empty Error +Root Empty Server FaaSTimer One Empty Ok +Child One Consumer FaaSDatasource Empty Empty Ok +Child Empty Unspecified MessagingProducer Empty Empty Error +Child One Unspecified HTTPServer Eight Empty Error +Child Empty Server gRPCServer One Empty Ok +Child One Server MaxCount Empty Empty Error +Child Four Server FaaSOther Two Empty Error +Child Four Server HTTPServer One Empty Unset +Root One Server FaaSOther One Empty Error +Child Empty Unspecified FaaSOther One Empty Ok +Root Empty Server MaxCount Empty Empty Unset +Child Four Unspecified DatabaseSQL One Empty Unset +Child Four Unspecified Internal Two Empty Error +Child Four Unspecified DatabaseNoSQL Two Empty Unset +Child One Producer FaaSPubSub Eight Empty Error +Child Four Internal Internal Empty Empty Unset +Child Four Consumer FaaSDatasource Empty Empty Unset +Child One Client DatabaseNoSQL Two Empty Ok +Child Empty Producer FaaSPubSub One Empty Unset +Root One Server FaaSHTTP Two Empty Ok +Root Four Server gRPCServer Two Empty Ok +Child Four Unspecified DatabaseNoSQL Two Empty Error +Child Four Unspecified FaaSTimer Two Empty Unset +Child One Unspecified FaaSHTTP Eight Empty Ok +Child Empty Client DatabaseNoSQL Eight Empty Ok +Child Empty Client DatabaseSQL One Empty Error +Child Four Unspecified FaaSTimer One Empty Ok +Child Four Producer FaaSPubSub One Empty Error +Child One Server FaaSTimer Eight Empty Unset +Child Four Unspecified MessagingConsumer One Empty Unset +Root Four Server MaxCount Empty Empty Ok +Root Empty Server MaxCount Eight Empty Error +Child One Consumer FaaSDatasource Eight Empty Ok +Child Four Unspecified FaaSHTTP One Empty Error +Child Empty Server MaxCount One Empty Error +Child One Unspecified Internal One Empty Error +Child One Unspecified DatabaseSQL Eight Empty Unset +Root One Server FaaSTimer One Empty Error +Root Empty Server HTTPServer Eight Empty Unset +Child Four Server MaxCount One Empty Unset +Child One Unspecified FaaSTimer Eight Empty Error +Root Four Server FaaSTimer One Empty Unset +Root One Producer MessagingProducer Two Empty Error +Child Empty Unspecified gRPCServer Two Empty Ok +Child Four Server FaaSHTTP Two Empty Ok +Child Four Unspecified FaaSPubSub One Empty Unset +Child One Unspecified HTTPServer One Empty Unset +Child Empty Unspecified FaaSTimer One Empty Ok +Child One Unspecified gRPCServer Empty Empty Unset +Child Four Unspecified FaaSDatasource Two Empty Error +Child One Unspecified FaaSPubSub Empty Empty Unset +Root Four Server MaxCount Two Empty Error +Root Empty Producer MessagingProducer Empty Empty Ok +Child Four Unspecified FaaSOther Two Empty Unset +Child Four Server HTTPServer One Empty Error +Root Four Server HTTPServer Empty Empty Ok +Root One Server gRPCServer Two Empty Error +Root Four Server HTTPServer One Empty Error +Child Empty Client Empty Two Empty Error +Child Empty Unspecified MaxCount Empty Empty Unset +Child Empty Unspecified HTTPClient Eight Empty Error +Child Empty Producer Empty Eight Empty Unset +Child One Consumer FaaSDatasource One Empty Unset +Child Four Producer FaaSPubSub Empty Empty Error +Child One Consumer MessagingConsumer Two Empty Ok +Child Four Unspecified gRPCServer Two Empty Ok +Child One Unspecified FaaSHTTP Eight Empty Unset +Child Empty Client DatabaseNoSQL Empty Empty Ok +Child One Server FaaSHTTP One Empty Error +Child Four Unspecified MaxCount Eight Empty Ok +Child Four Unspecified MaxCount Empty Empty Ok +Child Empty Consumer FaaSDatasource Two Empty Error +Root One Server MaxCount Empty Empty Ok +Child Four Consumer FaaSDatasource One Empty Unset +Child Four Unspecified FaaSDatasource Empty Empty Ok +Child Four Unspecified gRPCClient Eight Empty Unset +Child One Unspecified DatabaseSQL One Empty Unset +Child One Internal Internal Two Empty Ok +Child Empty Client DatabaseNoSQL Two Empty Unset +Child Empty Unspecified gRPCServer Eight Empty Ok +Root One Server gRPCServer Empty Empty Ok +Child One Unspecified Empty Two Empty Error +Root Four Server MaxCount Two Empty Unset +Child Empty Unspecified HTTPClient Eight Empty Ok +Child One Server FaaSHTTP Empty Empty Ok +Child Four Unspecified HTTPServer One Empty Error +Child Empty Server FaaSOther One Empty Error +Child One Unspecified HTTPServer Empty Empty Unset +Child Four Unspecified HTTPClient Two Empty Unset +Child Empty Unspecified gRPCServer One Empty Unset +Child Empty Unspecified DatabaseNoSQL Eight Empty Unset +Child Four Unspecified HTTPServer Eight Empty Error +Root Empty Producer Empty Two Empty Ok +Root One Server gRPCServer Empty Empty Unset +Root One Producer FaaSPubSub Empty Empty Ok +Child Four Producer FaaSPubSub Empty Empty Ok +Child Four Unspecified Empty Eight Empty Ok +Child Empty Unspecified FaaSTimer One Empty Error +Child Four Unspecified FaaSTimer Two Empty Ok +Root One Server HTTPServer Eight Empty Error +Root Empty Server FaaSTimer One Empty Unset +Root Empty Server MaxCount Two Empty Unset +Child One Unspecified Empty Eight Empty Unset +Child One Unspecified HTTPServer Two Empty Ok +Child Empty Producer FaaSPubSub Empty Empty Ok +Root Four Server FaaSHTTP Eight Empty Error +Child Empty Unspecified Internal Eight Empty Ok +Child Four Unspecified HTTPServer Empty Empty Ok +Child One Client HTTPClient Two Empty Unset +Child One Unspecified FaaSTimer One Empty Unset +Child Empty Client Empty One Empty Unset +Child Four Unspecified MessagingConsumer Empty Empty Error +Child Empty Unspecified gRPCClient Eight Empty Error +Root Four Server FaaSOther Two Empty Error +Child Four Unspecified FaaSHTTP Eight Empty Ok +Child One Client Empty Eight Empty Ok +Child Empty Unspecified MaxCount Eight Empty Ok +Child Empty Unspecified FaaSOther One Empty Unset +Root Four Server FaaSTimer Eight Empty Unset +Child One Client DatabaseSQL One Empty Ok +Child Four Unspecified DatabaseNoSQL Empty Empty Unset +Child Empty Internal Internal Empty Empty Unset +Root Empty Server gRPCServer One Empty Ok +Child Four Server HTTPServer Two Empty Unset +Child One Unspecified MaxCount One Empty Unset +Child Four Client DatabaseSQL One Empty Error +Child Four Unspecified FaaSTimer One Empty Unset +Child One Unspecified gRPCClient One Empty Ok +Child Four Unspecified FaaSPubSub Eight Empty Ok +Root One Server FaaSOther Eight Empty Error +Child Empty Unspecified DatabaseSQL One Empty Error +Child Four Unspecified HTTPServer Eight Empty Unset +Root Four Server FaaSTimer Two Empty Error +Child One Unspecified MessagingConsumer Eight Empty Ok +Child Empty Unspecified HTTPServer Eight Empty Error +Root One Server gRPCServer Eight Empty Unset diff --git a/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_traces.txt b/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_traces.txt new file mode 100644 index 00000000000..ccbc54ba6c1 --- /dev/null +++ b/cmd/jaeger/internal/integration/fixtures/generated_pict_pairs_traces.txt @@ -0,0 +1,33 @@ +Resource InstrumentationLibrary Spans +Empty None Several +K8sCloud None One +VMCloud None One +VMOnPrem None All +VMCloud None Several +Exec None One +VMCloud Two One +VMOnPrem One Several +K8sCloud One All +VMCloud Two None +Faas None Several +K8sCloud Two All +Empty Two None +Empty One None +VMCloud One All +VMOnPrem None One +K8sOnPrem Two Several +Empty Two Several +Exec Two Several +K8sOnPrem None One +K8sCloud One None +Empty None All +Empty None One +VMCloud None None +K8sCloud Two One +Exec None None +K8sOnPrem One Several +VMOnPrem Two All +VMOnPrem Two Several +K8sOnPrem One One +Faas One Several +Faas None One diff --git a/cmd/jaeger/internal/integration/fixtures/grpc_config.yaml b/cmd/jaeger/internal/integration/fixtures/grpc_config.yaml new file mode 100644 index 00000000000..19cfedb693b --- /dev/null +++ b/cmd/jaeger/internal/integration/fixtures/grpc_config.yaml @@ -0,0 +1,23 @@ +service: + extensions: [jaeger_storage] + pipelines: + traces: + receivers: [otlp] + exporters: [jaeger_storage_exporter] + +extensions: + jaeger_storage: + grpc: + some-external-storage: + server: localhost:17271 + connection-timeout: 5s + +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + jaeger_storage_exporter: + trace_storage: some-external-storage diff --git a/cmd/jaeger/internal/integration/fixtures/pict_input_spans.txt b/cmd/jaeger/internal/integration/fixtures/pict_input_spans.txt new file mode 100644 index 00000000000..10cea9916ff --- /dev/null +++ b/cmd/jaeger/internal/integration/fixtures/pict_input_spans.txt @@ -0,0 +1,14 @@ +Parent: Root, Child +Tracestate: Empty, One, Four +Kind: Unspecified, Internal, Server, Client, Producer, Consumer +Attributes: Empty, DatabaseSQL, DatabaseNoSQL, FaaSDatasource, FaaSHTTP, FaaSPubSub, FaaSTimer, FaaSOther, HTTPClient, HTTPServer, MessagingProducer, MessagingConsumer, gRPCClient, gRPCServer, Internal, MaxCount +Events: Empty, One, Two, Eight +Links: Empty +Status: Unset, Ok, Error + +IF [Parent] = "Root" THEN [Kind] in {"Server", "Producer"}; +IF [Kind] = "Internal" THEN [Attributes] in {"Nil", "Internal"}; +IF [Kind] = "Server" THEN [Attributes] in {"Nil", "FaaSHTTP", "FaaSTimer", "FaaSOther", "HTTPServer", "gRPCServer", "MaxCount"}; +IF [Kind] = "Client" THEN [Attributes] in {"Empty", "DatabaseSQL", "DatabaseNoSQL", "HTTPClient", "gRPCClient"}; +IF [Kind] = "Producer" THEN [Attributes] in {"Empty", "MessagingProducer", "FaaSPubSub"}; +IF [Kind] = "Consumer" THEN [Attributes] in {"Nil", "MessagingConsumer", "FaaSDatasource"}; diff --git a/cmd/jaeger/internal/integration/fixtures/pict_input_traces.txt b/cmd/jaeger/internal/integration/fixtures/pict_input_traces.txt new file mode 100644 index 00000000000..9eb0b9a29c1 --- /dev/null +++ b/cmd/jaeger/internal/integration/fixtures/pict_input_traces.txt @@ -0,0 +1,3 @@ +Resource: Empty, VMOnPrem, VMCloud, K8sOnPrem, K8sCloud, Faas, Exec +InstrumentationLibrary: None, One, Two +Spans: None, One, Several, All diff --git a/cmd/jaeger/internal/integration/grpc_test.go b/cmd/jaeger/internal/integration/grpc_test.go new file mode 100644 index 00000000000..b5e5c4cca73 --- /dev/null +++ b/cmd/jaeger/internal/integration/grpc_test.go @@ -0,0 +1,16 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import ( + "testing" +) + +func TestGRPCStorage(t *testing.T) { + s := &StorageIntegration{ + Name: "grpc", + ConfigFile: "fixtures/grpc_config.yaml", + } + s.Test(t) +} diff --git a/cmd/jaeger/internal/integration/integration-diagram.png b/cmd/jaeger/internal/integration/integration-diagram.png new file mode 100644 index 00000000000..e4cd105bf22 Binary files /dev/null and b/cmd/jaeger/internal/integration/integration-diagram.png differ diff --git a/cmd/jaeger/internal/integration/integration.go b/cmd/jaeger/internal/integration/integration.go new file mode 100644 index 00000000000..4ffe82219b5 --- /dev/null +++ b/cmd/jaeger/internal/integration/integration.go @@ -0,0 +1,120 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import ( + "context" + "os" + "testing" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/testbed/testbed" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/otelcol" + + "github.com/jaegertracing/jaeger/cmd/jaeger/internal" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/exporters/storageexporter" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/integration/datareceivers" +) + +type StorageIntegration struct { + Name string + ConfigFile string +} + +// The data receiver will utilize the artificial jaeger receiver to pull +// the traces from the database which is through jaeger storage extension. +// Because of that, we need to host another jaeger storage extension +// that is a duplication from the collector's extension. And get +// the exporter TraceStorage name to set it to receiver TraceStorage. +func (s *StorageIntegration) newDataReceiver(t *testing.T, factories otelcol.Factories) testbed.DataReceiver { + fmp := fileprovider.New() + configProvider, err := otelcol.NewConfigProvider( + otelcol.ConfigProviderSettings{ + ResolverSettings: confmap.ResolverSettings{ + URIs: []string{s.ConfigFile}, + Providers: map[string]confmap.Provider{fmp.Scheme(): fmp}, + }, + }, + ) + require.NoError(t, err) + + cfg, err := configProvider.Get(context.Background(), factories) + require.NoError(t, err) + + storageCfg, ok := cfg.Extensions[jaegerstorage.ID].(*jaegerstorage.Config) + require.True(t, ok, "no jaeger storage extension found in the config") + + exporterCfg, ok := cfg.Exporters[storageexporter.ID].(*storageexporter.Config) + require.True(t, ok, "no jaeger storage exporter found in the config") + + receiver := datareceivers.NewJaegerStorageDataReceiver(exporterCfg.TraceStorage, storageCfg) + return receiver +} + +func (s *StorageIntegration) Test(t *testing.T) { + if os.Getenv("STORAGE") != s.Name { + t.Skipf("Integration test against Jaeger-V2 %[1]s skipped; set STORAGE env var to %[1]s to run this", s.Name) + } + + factories, err := internal.Components() + require.NoError(t, err) + + dataProvider := testbed.NewGoldenDataProvider( + "fixtures/generated_pict_pairs_traces.txt", + "fixtures/generated_pict_pairs_spans.txt", + "", + ) + sender := testbed.NewOTLPTraceDataSender(testbed.DefaultHost, 4317) + receiver := s.newDataReceiver(t, factories) + + runner := testbed.NewInProcessCollector(factories) + validator := testbed.NewCorrectTestValidator( + sender.ProtocolName(), + receiver.ProtocolName(), + dataProvider, + ) + correctnessResults := &testbed.CorrectnessResults{} + + config, err := os.ReadFile(s.ConfigFile) + require.NoError(t, err) + t.Log(string(config)) + + configCleanup, err := runner.PrepareConfig(string(config)) + require.NoError(t, err) + defer configCleanup() + + tc := testbed.NewTestCase( + t, + dataProvider, + sender, + receiver, + runner, + validator, + correctnessResults, + ) + defer tc.Stop() + + tc.EnableRecording() + tc.StartBackend() + tc.StartAgent() + + tc.StartLoad(testbed.LoadOptions{ + DataItemsPerSecond: 1024, + ItemsPerBatch: 1, + }) + tc.Sleep(5 * time.Second) + tc.StopLoad() + + tc.WaitForN(func() bool { + return tc.LoadGenerator.DataItemsSent() == tc.MockBackend.DataItemsReceived() + }, 10*time.Second, "all data items received") + + tc.StopBackend() + + tc.ValidateData() +} diff --git a/cmd/jaeger/integration/receivers/storagereceiver/README.md b/cmd/jaeger/internal/integration/receivers/storagereceiver/README.md similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/README.md rename to cmd/jaeger/internal/integration/receivers/storagereceiver/README.md diff --git a/cmd/jaeger/integration/receivers/storagereceiver/config.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/config.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/config.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/config.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/config_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/config_test.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/factory.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/factory.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/factory_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/factory_test.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/package_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/package_test.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/receiver.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/receiver.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/receiver_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/receiver_test.go rename to cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go diff --git a/cmd/jaeger/integration/receivers/storagereceiver/testdata/config.yaml b/cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml similarity index 100% rename from cmd/jaeger/integration/receivers/storagereceiver/testdata/config.yaml rename to cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml diff --git a/go.mod b/go.mod index ead162f31b5..4e513d67649 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.96.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.96.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.96.0 + github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.96.0 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.0 github.com/prometheus/common v0.49.0 @@ -89,6 +90,7 @@ require ( github.com/aws/aws-sdk-go v1.50.27 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -99,7 +101,8 @@ require ( github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/elastic/elastic-transport-go/v8 v8.4.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/expr-lang/expr v1.16.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -111,8 +114,9 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/flatbuffers v1.12.1 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect + github.com/haimrubinstein/go-syslog/v3 v3.0.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect @@ -128,18 +132,20 @@ require ( github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.7 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.0 // indirect github.com/kr/text v0.2.0 // indirect + github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect @@ -149,14 +155,23 @@ require ( github.com/mostynb/go-grpc-compression v1.2.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.96.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.96.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.96.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.96.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect @@ -164,7 +179,7 @@ require ( github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/relvacode/iso8601 v1.4.0 // indirect @@ -184,6 +199,7 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect @@ -201,6 +217,7 @@ require ( go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 // indirect go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 // indirect go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 // indirect + go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 // indirect go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect go.opentelemetry.io/collector/featuregate v1.3.0 // indirect go.opentelemetry.io/collector/semconv v0.96.0 // indirect @@ -221,8 +238,8 @@ require ( golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect golang.org/x/text v0.14.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index a1bcb34363e..991dfdce437 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,8 @@ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -81,9 +83,11 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/expr-lang/expr v1.16.1 h1:Na8CUcMdyGbnNpShY7kzcHCU7WqxuL+hnxgHZ4vaz/A= +github.com/expr-lang/expr v1.16.1/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -176,10 +180,12 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/haimrubinstein/go-syslog/v3 v3.0.0 h1:wuTrxJE60wx2pfwdERdbLNlcXEk3hk1MPagAaD2fq2g= +github.com/haimrubinstein/go-syslog/v3 v3.0.0/go.mod h1:/IKKpe5PS9pB5vJY1APQQM0ZPBrm95HWE1SQwsXWmVI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -204,6 +210,9 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/go-syslog/v3 v3.0.0/go.mod h1:tulsOp+CecTAYC27u9miMgq21GqXRW6VdKbOG+QSP4Q= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -253,10 +262,13 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= +github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= github.com/lightstep/go-expohisto v1.0.0/go.mod h1:xDXD0++Mu2FOaItXtdDfksfgxfV0z1TMPa+e/EUd0cs= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= +github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -269,8 +281,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -310,6 +322,12 @@ github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsc github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.96.0/go.mod h1:KcZjtSdoelUWRwGtVaiEX16Hw8mFH+JnYrN+r4Ox550= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.96.0 h1:2FnXGN9xxIcIz7f4hdX+OgsGowWC1D35oNtX5ErnLBc= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.96.0/go.mod h1:VPyawEuVpqKg3oemeDnYwDfBbh9gjGbrVVXl4OeHK60= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.96.0 h1:nUvVFQDNDPsItUcYYXZcbcOSv65lVai4uGHBr1czaxk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.96.0/go.mod h1:efM1kx1r7SrEEmEexQjhn69KZZSS4JSTJG+BSAgLMVI= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.96.0 h1:ruhy+EGMxhFZ8XfA6QOFjpZeI8HRY8vmibEIo0v3mAg= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.96.0/go.mod h1:UDKAMXjliMiikHBuuTwmINCKODXgOQKzdAkG+LwiprM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.96.0 h1:iymE+KruqfZlCnUOzz8PtMrQ4zFtYlMmhB0zhAVLlE4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.96.0/go.mod h1:+p3Y9GdIlG7SbkiUoUUoePDnxxLOcMXSyX86ibTmN1U= github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.96.0 h1:7ZLtvso1fCli8/Bhk2ib0c0/iT4OacRPcx8e6j74ClY= github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.96.0/go.mod h1:hcpQL/YtUYT4XF8Q6xzhW0n1GjvT5ewRF3I8uKoxTdI= github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.96.0 h1:uG8YgKM932zjruNwAicIKrGpW09bt+Ckcw5Zi4gn1qU= @@ -318,24 +336,38 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.96.0/go.mod h1:f3d2OcVhcMGgcMkyf614jPfAD8eE+zlJ6Pd5P43qWyI= github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.96.0 h1:lsOJsYuELFPTm3cm2b11DwVD18H9Mz3fWVNaRPdUxPg= github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.96.0/go.mod h1:iZi3xMSwNdGs6eAQrq2C3eWm3+PE40tQV84fNw42ERI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.96.0 h1:i4PpId1NbxqVrtTb4VLYyIE57ZhTlgEEmUbTUyULlDk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.96.0/go.mod h1:Fa/tTxfSAMyDGcbon9CqBuMe0083BY+B4/4PBhop2Ko= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.96.0 h1:wNeHYUxCxUHmT6YmUBFM8V1UyR80yV+bUIgWwNydrOU= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.96.0/go.mod h1:tV2btxxNu9EhivKU2Meq0HagHHrSkpCiwrQTcwRrsss= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.96.0 h1:6xhEYeFRjui33hCCP8tD9B2R2VCGNdNrzi+pivp0osk= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.96.0/go.mod h1:7CDMyrWBi/iST+UVvheDNjZX8VWyboTJqkXHz7gpLDI= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.96.0 h1:iynLFjnG869r53AIhiavbEVMZoPqCba7Mijm+9MRdOo= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.96.0/go.mod h1:FuTdjIZj7Un07dcbJs06IF1DJiYfpQkc4oklhNWE8fg= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.96.0 h1:nzAR1IjPcbgLNFmJElLPyRlLOfijAkQcWo4L9CXixu4= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.96.0/go.mod h1:Zn0A4V5t3uNr2FYsgnzT4t0OBqdOk8jcPjgHgy3jHG0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.96.0 h1:qDu31FoiT71TIhswpgqrfbwA+boU5a+xNWBKxl5Tkto= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.96.0/go.mod h1:wVd9yB8IEMBAdPq5iAoni3vvucIv1ahS7tFwl/n0jTA= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.96.0 h1:ZKH4+0dAqGW0Yc/W3NeP4zwcWouUoLIPgjzP0Dq9qew= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.96.0/go.mod h1:6jYdZIsLvWzVyJ7gvJ3dpTAw3WgSsSitc3+M0PzxoUM= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.96.0 h1:nRk4vyYsMkFht1Mo3n1d2X7WxLex0LzIWtQhE5/c2P8= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.96.0/go.mod h1:XTq2FQlb1ao2NHoZvkBC+LPUdMO4DG/4FJ7LqAyE8YU= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.96.0 h1:LZ2wG6AzwfOFc1bFPo1G8A9EbVcYb7pJOi9vpvoEiYE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.96.0/go.mod h1:dT01MSqUkDuSiXBpbk8IpeFe5FEYPQWKnuckJxciyBc= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.96.0 h1:rIU8xMvn8sW22/Qg1BRmUMWaVhKqfNA6XkdWaXM0v2A= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.96.0/go.mod h1:zhqxjkw5cM9reIfN7prd4RObR12jmze/bUWQU4auDB4= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.96.0 h1:5rdHJH2SKp9+g3ypk7wlRfMq1a7xRKqwvTffZHIOVgQ= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.96.0/go.mod h1:yk9+s0wSHn8WKzvBSa63puaPhCrjr+rmkfJ4/4NVyeQ= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.96.0 h1:V3DvS2g8qPp2Pr0i39iS37iByUlk7JvE6iEA6Ia1F58= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.96.0/go.mod h1:SpDMTfNxJhLoh90tzVbFVR6jBznomtSSfv1+mKR1s9I= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.96.0 h1:gK3nBuj0qhtt8HT4MuiW60KfNcnAA1hjdqnwdIbxHaU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.96.0/go.mod h1:xc2JC4VmYfGsjaH834h0O+nCTHcddAGZkt5fJxQF7LE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.96.0 h1:wqW04h5tvkYt2+7oBwvZUsrJijU7sktKSVq0fgsvKjo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.96.0/go.mod h1:Lsow/P69ua84HwOhpsZNAd1Ek1fy5LPLCRnDp8raalI= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.96.0 h1:y9QNvhQ0XjJOJid4jNlEliJQI4+AFdEaN6weB9jMWaY= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.96.0/go.mod h1:9xJFaECGKFH3U9ToFeE9f9/L5zw0fSY3jJCgHzFOBR0= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.96.0 h1:JT6kDGqnw7dzrzXZd8pgruoW5avvCm4rKVeCNg1HGbw= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.96.0/go.mod h1:8iPwXuyzz6aJJ9YHW8Z2jAJe5gKptXAs5f8ACVEXJr8= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -355,8 +387,9 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= @@ -451,6 +484,8 @@ github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVK github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= @@ -514,6 +549,8 @@ go.opentelemetry.io/collector/consumer v0.96.0 h1:JN4JHelp5EGMGoC2UVelTMG6hyZjgt go.opentelemetry.io/collector/consumer v0.96.0/go.mod h1:Vn+qzzKgekDFayCVV8peSH5Btx1xrt/bmzD9gTxgidQ= go.opentelemetry.io/collector/exporter v0.96.0 h1:SmOSaP+zUNq0nl+BcllsCSsYePdUNIIUfW5sXKKaUlI= go.opentelemetry.io/collector/exporter v0.96.0/go.mod h1:DcuGaxcINhOV2LgojDI56r3830cUtuCsNadINMIU23c= +go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 h1:88v2GWCIuYgd3e4KdwF0JLklIgBzETBw0e3dkEJ7BbI= +go.opentelemetry.io/collector/exporter/debugexporter v0.96.0/go.mod h1:mZjJ0G6Pn6aSS7T4UeEjXSHt3pgslvaZa/4Uam8DKuo= go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0 h1:fKHt4iTcD7C0utDzeww6ZYVlDYaC0dw9wtzVwLha4CM= go.opentelemetry.io/collector/exporter/loggingexporter v0.96.0/go.mod h1:vpuKdiIQ6yjwZbKiiAs/MV8rZMKiQfPF55vX8UxO8fk= go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0 h1:vZEd10B/zj7WkBWSVegDkGOwv7FZhUwyk60E2zkYwL4= @@ -698,6 +735,7 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -749,10 +787,10 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= diff --git a/plugin/storage/es/factory_test.go b/plugin/storage/es/factory_test.go index 5d3359622ff..0e424d699b9 100644 --- a/plugin/storage/es/factory_test.go +++ b/plugin/storage/es/factory_test.go @@ -315,8 +315,10 @@ func TestConfigurationValidation(t *testing.T) { } func TestESStorageFactoryWithConfigError(t *testing.T) { + defer testutils.VerifyGoLeaksOnce(t) + cfg := escfg.Configuration{ - Servers: []string{"http://badurl"}, + Servers: []string{"http://127.0.0.1:65535"}, LogLevel: "error", } _, err := NewFactoryWithConfig(cfg, metrics.NullFactory, zap.NewNop()) diff --git a/scripts/grpc-integration-test.sh b/scripts/grpc-integration-test.sh new file mode 100755 index 00000000000..73e6b4ec632 --- /dev/null +++ b/scripts/grpc-integration-test.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +PS4='T$(date "+%H:%M:%S") ' +set -euxf -o pipefail + +# use global variables to reflect status of db +db_is_up= + +usage() { + echo $"Usage: $0 " + exit 1 +} + +check_arg() { + if [ ! $# -eq 1 ]; then + echo "ERROR: need exactly one argument, " + usage + fi +} + +setup_remote_storage() { + local image=$1 + local tag=$2 + local params=( + --rm + --detach + --publish 17271:17271 + --publish 17270:17270 + --env SPAN_STORAGE_TYPE=memory + ) + local cid + cid=$(docker run "${params[@]}" "${image}:${tag}") + echo "${cid}" +} + +wait_for_storage() { + local image=$1 + local url=$2 + local cid=$3 + local params=( + --silent + --output + /dev/null + --write-out + "%{http_code}" + ) + local counter=0 + local max_counter=60 + while [[ "$(curl "${params[@]}" "${url}")" != "200" && ${counter} -le ${max_counter} ]]; do + docker inspect "${cid}" | jq '.[].State' + echo "waiting for ${url} to be up..." + sleep 10 + counter=$((counter+1)) + done + # after the loop, do final verification and set status as global var + if [[ "$(curl "${params[@]}" "${url}")" != "200" ]]; then + echo "ERROR: ${image} is not ready" + docker logs "${cid}" + docker kill "${cid}" + db_is_up=0 + else + echo "SUCCESS: ${image} is ready" + db_is_up=1 + fi +} + +bring_up_storage() { + local version=$1 + local image="jaegertracing/jaeger-remote-storage" + local cid + + echo "starting ${image} ${version}" + for retry in 1 2 3 + do + echo "attempt $retry" + cid=$(setup_remote_storage "${image}" "${version}") + + wait_for_storage "${image}" "http://localhost:17270" "${cid}" + if [ ${db_is_up} = "1" ]; then + break + fi + done + if [ ${db_is_up} = "1" ]; then + # shellcheck disable=SC2064 + trap "teardown_storage ${cid}" EXIT + else + echo "ERROR: unable to start ${image}" + exit 1 + fi +} + +teardown_storage() { + local cid=$1 + docker kill "${cid}" +} + +main() { + check_arg "$@" + local version=$1 + + bring_up_storage "${version}" + STORAGE="grpc" make jaeger-storage-integration-test +} + +main "$@"