diff --git a/.chloggen/codeboten_rm-instanaexporter.yaml b/.chloggen/codeboten_rm-instanaexporter.yaml new file mode 100644 index 000000000000..4bfbc30b4da1 --- /dev/null +++ b/.chloggen/codeboten_rm-instanaexporter.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: instanaexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove deprecated instanaexporter + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35367] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 766ed5c213b1..46dcbb6d9b13 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -61,7 +61,6 @@ exporter/googlecloudpubsubexporter/ @open-teleme exporter/googlemanagedprometheusexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95 exporter/honeycombmarkerexporter/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @fchikwekwe exporter/influxdbexporter/ @open-telemetry/collector-contrib-approvers @jacobmarble -exporter/instanaexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @hickeyma exporter/kafkaexporter/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy exporter/kineticaexporter/ @open-telemetry/collector-contrib-approvers @am-kinetica @TylerHelmuth exporter/loadbalancingexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 95ccb52f49bd..68722fe2e2d7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -60,7 +60,6 @@ body: - exporter/googlemanagedprometheus - exporter/honeycombmarker - exporter/influxdb - - exporter/instana - exporter/kafka - exporter/kinetica - exporter/loadbalancing diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 3ca09acbec30..f603b779352a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -54,7 +54,6 @@ body: - exporter/googlemanagedprometheus - exporter/honeycombmarker - exporter/influxdb - - exporter/instana - exporter/kafka - exporter/kinetica - exporter/loadbalancing diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index e0fe9c234f1e..6807b3cd69f1 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -54,7 +54,6 @@ body: - exporter/googlemanagedprometheus - exporter/honeycombmarker - exporter/influxdb - - exporter/instana - exporter/kafka - exporter/kinetica - exporter/loadbalancing diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 95278e3a6514..4fcf7319ced2 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -59,7 +59,6 @@ body: - exporter/googlemanagedprometheus - exporter/honeycombmarker - exporter/influxdb - - exporter/instana - exporter/kafka - exporter/kinetica - exporter/loadbalancing diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index be0c98aee7cd..be117534edb0 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -76,7 +76,6 @@ exporters: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.110.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.110.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.110.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.110.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.110.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.110.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.110.0 @@ -431,7 +430,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus => ../../pkg/translator/prometheus - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver => ../../receiver/googlecloudpubsubreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter => ../../exporter/sumologicexporter - - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter => ../../exporter/instanaexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter => ../../exporter/honeycombmarkerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver => ../../receiver/otlpjsonfilereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor => ../../processor/redactionprocessor diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 647c2ed796db..c56b77786a25 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -53,7 +53,6 @@ import ( googlemanagedprometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" honeycombmarkerexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter" influxdbexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter" - instanaexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" kafkaexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" loadbalancingexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" logicmonitorexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter" @@ -517,7 +516,6 @@ func components() (otelcol.Factories, error) { googlemanagedprometheusexporter.NewFactory(), honeycombmarkerexporter.NewFactory(), influxdbexporter.NewFactory(), - instanaexporter.NewFactory(), kafkaexporter.NewFactory(), loadbalancingexporter.NewFactory(), logicmonitorexporter.NewFactory(), @@ -570,7 +568,6 @@ func components() (otelcol.Factories, error) { factories.ExporterModules[googlemanagedprometheusexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.110.0" factories.ExporterModules[honeycombmarkerexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.110.0" factories.ExporterModules[influxdbexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.110.0" - factories.ExporterModules[instanaexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.110.0" factories.ExporterModules[kafkaexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.110.0" factories.ExporterModules[loadbalancingexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.110.0" factories.ExporterModules[logicmonitorexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.110.0" diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index b2f9f4be4662..c7eab2ef78e5 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -41,7 +41,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.110.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter v0.110.0 @@ -1254,8 +1253,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googl replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter => ../../exporter/sumologicexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter => ../../exporter/instanaexporter - replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter => ../../exporter/honeycombmarkerexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver => ../../receiver/otlpjsonfilereceiver diff --git a/exporter/instanaexporter/Makefile b/exporter/instanaexporter/Makefile deleted file mode 100644 index ded7a36092dc..000000000000 --- a/exporter/instanaexporter/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common diff --git a/exporter/instanaexporter/README.md b/exporter/instanaexporter/README.md deleted file mode 100644 index 90b19a8e2cb9..000000000000 --- a/exporter/instanaexporter/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Instana Exporter - - -| Status | | -| ------------- |-----------| -| Stability | [deprecated]: traces | -| Distributions | [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Finstana%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Finstana) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Finstana%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Finstana) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@hickeyma](https://www.github.com/hickeyma) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -The Instana Exporter converts OpenTelemetry trace data and then sends it to the [Instana Backend](https://www.ibm.com/docs/en/instana-observability/current?topic=setting-up-managing-instana). - -## Exporter Configuration - -The following exporter configuration parameters are supported. - - -| Parameter | Description | -|----------------|-------------| -| endpoint | The Instana backend endpoint that the Exporter connects to. It depends on your region and how it is hosted. It starts with ``https://serverless-`` for SaaS. Otherwise, it starts with ``https://``. It corresponds to the Instana environment variable ``INSTANA_ENDPOINT_URL`` | -| agent_key | Your Instana Agent key. The same agent key can be used for host agents and serverless monitoring. It corresponds to the Instana environment variable ``INSTANA_AGENT_KEY`` | -| tls/ca_file | [Optional] Certificate authority file for an Instana backend connection where the backend uses a self signed certificate. | - -> These parameters match the Instana Serverless Monitoring environment variables and can be found [here](https://www.ibm.com/docs/en/instana-observability/current?topic=references-environment-variables#serverless-monitoring). - - -### Sample Configuration - -The code snippet below shows how your configuration file should look like: - -```yaml -[...] - -exporters: - instana: - endpoint: ${env:INSTANA_ENDPOINT_URL} - agent_key: ${env:INSTANA_AGENT_KEY} - -[...] - -service: - pipelines: - traces: - exporters: [instana] - -[...] -``` - -### Full Example - -```yaml -receivers: - otlp: - protocols: - grpc: - http: - -processors: - batch: -exporters: - instana: - endpoint: ${env:INSTANA_ENDPOINT_URL} - agent_key: ${env:INSTANA_AGENT_KEY} - tls: - ca_file: someCA.pem # Optional. Certificate authority file for Instana backend connection. - -service: - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [instana] -``` diff --git a/exporter/instanaexporter/config.go b/exporter/instanaexporter/config.go deleted file mode 100644 index 7a7c6c95aba0..000000000000 --- a/exporter/instanaexporter/config.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instanaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" - -import ( - "errors" - "net/url" - "strings" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" -) - -// Config defines configuration for the Instana exporter -type Config struct { - Endpoint string `mapstructure:"endpoint"` - - AgentKey configopaque.String `mapstructure:"agent_key"` - - confighttp.ClientConfig `mapstructure:",squash"` -} - -var _ component.Config = (*Config)(nil) - -// Validate checks if the exporter configuration is valid -func (cfg *Config) Validate() error { - - if cfg.Endpoint == "" { - return errors.New("no Instana endpoint set") - } - - if cfg.AgentKey == "" { - return errors.New("no Instana agent key set") - } - - if !strings.HasPrefix(cfg.Endpoint, "https://") { - return errors.New("endpoint must start with https://") - } - _, err := url.Parse(cfg.Endpoint) - if err != nil { - return errors.New("endpoint must be a valid URL") - } - - return nil -} diff --git a/exporter/instanaexporter/config_test.go b/exporter/instanaexporter/config_test.go deleted file mode 100644 index 68074ccb8a2c..000000000000 --- a/exporter/instanaexporter/config_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instanaexporter - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configtls" -) - -func TestConfigValidate(t *testing.T) { - t.Run("Empty configuration", func(t *testing.T) { - c := &Config{} - err := c.Validate() - assert.Error(t, err) - }) - - t.Run("Valid configuration", func(t *testing.T) { - c := &Config{Endpoint: "https://example.com/", AgentKey: "key1"} - err := c.Validate() - assert.NoError(t, err) - - assert.Equal(t, "https://example.com/", c.Endpoint, "no Instana endpoint set") - assert.Equal(t, "", c.TLSSetting.CAFile, "optional ca_file property not set") - }) - - t.Run("Valid configuration with ca_file", func(t *testing.T) { - c := &Config{Endpoint: "https://example.com/", AgentKey: "key1", ClientConfig: confighttp.ClientConfig{ - TLSSetting: configtls.ClientConfig{ - Config: configtls.Config{ - CAFile: "ca.crt", - }, - }, - }} - err := c.Validate() - assert.NoError(t, err) - - assert.Equal(t, "https://example.com/", c.Endpoint, "no Instana endpoint set") - assert.Equal(t, "ca.crt", c.TLSSetting.CAFile, "optional ca_file property set") - }) - - t.Run("Invalid Endpoint Invalid URL", func(t *testing.T) { - c := &Config{Endpoint: "https://example.}~", AgentKey: "key1"} - err := c.Validate() - assert.Error(t, err) - }) - - t.Run("Invalid Endpoint No Protocol", func(t *testing.T) { - c := &Config{Endpoint: "example.com", AgentKey: "key1"} - err := c.Validate() - assert.Error(t, err) - }) - - t.Run("Invalid Endpoint No https:// Protocol", func(t *testing.T) { - c := &Config{Endpoint: "http://example.com", AgentKey: "key1"} - err := c.Validate() - assert.Error(t, err, "endpoint must start with https://") - }) - - t.Run("No Agent key", func(t *testing.T) { - c := &Config{Endpoint: "https://example.com/"} - err := c.Validate() - assert.Error(t, err) - }) -} diff --git a/exporter/instanaexporter/exporter.go b/exporter/instanaexporter/exporter.go deleted file mode 100644 index e670da66aefe..000000000000 --- a/exporter/instanaexporter/exporter.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instanaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" - -import ( - "bytes" - "context" - "fmt" - "net/http" - "runtime" - "strings" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/backend" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" -) - -type instanaExporter struct { - config *Config - client *http.Client - settings component.TelemetrySettings - userAgent string -} - -func (e *instanaExporter) start(ctx context.Context, host component.Host) error { - client, err := e.config.ClientConfig.ToClient(ctx, host, e.settings) - if err != nil { - return err - } - e.client = client - return nil -} - -func (e *instanaExporter) pushConvertedTraces(ctx context.Context, td ptrace.Traces) error { - converter := converter.NewConvertAllConverter(e.settings.Logger) - var spans []model.Span - - hostID := "" - resourceSpans := td.ResourceSpans() - for i := 0; i < resourceSpans.Len(); i++ { - resSpan := resourceSpans.At(i) - - resource := resSpan.Resource() - - hostIDAttr, ok := resource.Attributes().Get(backend.AttributeInstanaHostID) - if ok { - hostID = hostIDAttr.Str() - } - - ilSpans := resSpan.ScopeSpans() - for j := 0; j < ilSpans.Len(); j++ { - converterBundle := converter.ConvertSpans(resource.Attributes(), ilSpans.At(j).Spans()) - - spans = append(spans, converterBundle.Spans...) - } - } - - bundle := model.Bundle{Spans: spans} - if len(bundle.Spans) == 0 { - // skip exporting, nothing to do - return nil - } - - req, err := bundle.Marshal() - if err != nil { - return consumererror.NewPermanent(err) - } - - headers := map[string]string{ - backend.HeaderKey: string(e.config.AgentKey), - backend.HeaderHost: hostID, - // Used only by the Instana agent and can be set to "0" for the exporter - backend.HeaderTime: "0", - } - - return e.export(ctx, e.config.Endpoint, headers, req) -} - -func newInstanaExporter(cfg component.Config, set exporter.Settings) *instanaExporter { - iCfg := cfg.(*Config) - userAgent := fmt.Sprintf("%s/%s (%s/%s)", set.BuildInfo.Description, set.BuildInfo.Version, runtime.GOOS, runtime.GOARCH) - return &instanaExporter{ - config: iCfg, - settings: set.TelemetrySettings, - userAgent: userAgent, - } -} - -func (e *instanaExporter) export(ctx context.Context, url string, header map[string]string, request []byte) error { - url = strings.TrimSuffix(url, "/") + "/bundle" - e.settings.Logger.Debug("Preparing to make HTTP request", zap.String("url", url)) - req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(request)) - if err != nil { - return consumererror.NewPermanent(err) - } - - req.Header.Set("Content-Type", "application/json") - req.Header.Set("User-Agent", e.userAgent) - - for name, value := range header { - req.Header.Set(name, value) - } - - resp, err := e.client.Do(req) - if err != nil { - return fmt.Errorf("failed to send a request: %w", err) - } - defer resp.Body.Close() - - if resp.StatusCode >= 400 && resp.StatusCode <= 499 { - return consumererror.NewPermanent(fmt.Errorf("error when sending payload to %s: %s", - url, resp.Status)) - } - if resp.StatusCode >= 500 && resp.StatusCode <= 599 { - return fmt.Errorf("error when sending payload to %s: %s", url, resp.Status) - } - - return nil -} diff --git a/exporter/instanaexporter/exporter_test.go b/exporter/instanaexporter/exporter_test.go deleted file mode 100644 index 011b75208beb..000000000000 --- a/exporter/instanaexporter/exporter_test.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instanaexporter - -import ( - "context" - "encoding/base64" - "io" - "net/http" - "net/http/httptest" - "os" - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configtls" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func TestPushConvertedTraces(t *testing.T) { - traceServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { - rw.WriteHeader(http.StatusAccepted) - })) - defer traceServer.Close() - - cfg := Config{ - AgentKey: "key11", - ClientConfig: confighttp.ClientConfig{Endpoint: traceServer.URL}, - Endpoint: traceServer.URL, - } - - instanaExporter := newInstanaExporter(&cfg, exportertest.NewNopSettings()) - ctx := context.Background() - err := instanaExporter.start(ctx, componenttest.NewNopHost()) - assert.NoError(t, err) - - err = instanaExporter.pushConvertedTraces(ctx, newTestTraces()) - assert.NoError(t, err) -} - -func newTestTraces() ptrace.Traces { - traces := ptrace.NewTraces() - rspans := traces.ResourceSpans().AppendEmpty() - rspans.Resource().Attributes().PutStr("instana.agent", "agent1") - span := rspans.ScopeSpans().AppendEmpty().Spans().AppendEmpty() - span.SetTraceID([16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4}) - span.SetSpanID([8]byte{0, 0, 0, 0, 1, 2, 3, 4}) - return traces -} - -func TestSelfSignedBackend(t *testing.T) { - var err error - caFile := "testdata/ca.crt" - handler := http.NewServeMux() - handler.HandleFunc("/bundle", func(w http.ResponseWriter, _ *http.Request) { - _, err = io.WriteString(w, "Hello from CA self signed server") - - if err != nil { - t.Fatal(err) - } - }) - - server := httptest.NewTLSServer(handler) - defer server.Close() - - s := base64.StdEncoding.EncodeToString(server.Certificate().Raw) - wholeCert := "-----BEGIN CERTIFICATE-----\n" + s + "\n-----END CERTIFICATE-----" - - err = os.WriteFile(caFile, []byte(wholeCert), os.FileMode(0600)) - defer func() { - assert.NoError(t, os.Remove(caFile)) - }() - - if err != nil { - t.Fatal(err) - } - - // Starts the exporter to test the HTTP client request - - cfg := Config{ - AgentKey: "key11", - ClientConfig: confighttp.ClientConfig{ - Endpoint: server.URL, - TLSSetting: configtls.ClientConfig{ - Config: configtls.Config{ - CAFile: caFile, - }, - }, - }, - Endpoint: server.URL, - } - - ctx := context.Background() - - instanaExporter := newInstanaExporter(&cfg, exportertest.NewNopSettings()) - err = instanaExporter.start(ctx, componenttest.NewNopHost()) - - if err != nil { - t.Fatal(err) - } - - assert.NoError(t, instanaExporter.export(ctx, server.URL, make(map[string]string), []byte{})) -} - -func TestSelfSignedBackendCAFileNotFound(t *testing.T) { - cfg := Config{ - AgentKey: "key11", - ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - TLSSetting: configtls.ClientConfig{ - Config: configtls.Config{ - CAFile: "ca_file_not_found.pem", - }, - }, - }, - Endpoint: "", - } - - ctx := context.Background() - - instanaExporter := newInstanaExporter(&cfg, exportertest.NewNopSettings()) - - assert.Error(t, instanaExporter.start(ctx, componenttest.NewNopHost()), "expect not to find the ca file") -} diff --git a/exporter/instanaexporter/factory.go b/exporter/instanaexporter/factory.go deleted file mode 100644 index cfd13d83e242..000000000000 --- a/exporter/instanaexporter/factory.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -package instanaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" - -import ( - "context" - "sync" - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/config/configretry" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/metadata" -) - -var once sync.Once - -// NewFactory creates an Instana exporter factory -func NewFactory() exporter.Factory { - return exporter.NewFactory( - metadata.Type, - createDefaultConfig, - exporter.WithTraces(createTracesExporter, metadata.TracesStability), - ) -} - -// createDefaultConfig creates the default exporter configuration -func createDefaultConfig() component.Config { - return &Config{ - ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - }, - } -} - -func logDeprecation(logger *zap.Logger) { - once.Do(func() { - logger.Warn("instana exporter is deprecated and will be removed in the next release. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34994 for more details.") - }) -} - -// createTracesExporter creates a trace exporter based on this configuration -func createTracesExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Traces, error) { - cfg := config.(*Config) - - ctx, cancel := context.WithCancel(ctx) - - instanaExporter := newInstanaExporter(cfg, set) - logDeprecation(set.Logger) - - return exporterhelper.NewTracesExporter( - ctx, - set, - config, - instanaExporter.pushConvertedTraces, - exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - exporterhelper.WithStart(instanaExporter.start), - // Disable Timeout/RetryOnFailure and SendingQueue - exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), - exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), - exporterhelper.WithQueue(exporterhelper.QueueConfig{Enabled: false}), - exporterhelper.WithShutdown(func(context.Context) error { - cancel() - return nil - }), - ) -} diff --git a/exporter/instanaexporter/factory_test.go b/exporter/instanaexporter/factory_test.go deleted file mode 100644 index e610e6498e40..000000000000 --- a/exporter/instanaexporter/factory_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instanaexporter - -import ( - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/config/configtls" - "go.opentelemetry.io/collector/confmap/confmaptest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/metadata" -) - -// Test that the factory creates the default configuration -func TestCreateDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - assert.Equal(t, &Config{ - ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - }, - }, cfg, "failed to create default config") - - assert.NoError(t, componenttest.CheckConfigStruct(cfg)) -} - -// TestLoadConfig tests that the configuration is loaded correctly -func TestLoadConfig(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yml")) - require.NoError(t, err) - factory := NewFactory() - - t.Run("valid config", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "valid").String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - - require.NoError(t, err) - assert.Equal(t, &Config{ - ClientConfig: confighttp.ClientConfig{ - Endpoint: "https://example.com/api/", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - }, - Endpoint: "https://example.com/api/", - AgentKey: "key1", - }, cfg) - }) - - t.Run("valid config with ca_file", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "valid_with_ca_file").String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - - require.NoError(t, err) - assert.Equal(t, &Config{ - ClientConfig: confighttp.ClientConfig{ - Endpoint: "https://example.com/api/", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - TLSSetting: configtls.ClientConfig{ - Config: configtls.Config{ - CAFile: "ca.crt", - }, - }, - }, - Endpoint: "https://example.com/api/", - AgentKey: "key1", - }, cfg) - }) - - t.Run("valid config without ca_file", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "valid_no_ca_file").String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - - require.NoError(t, err) - assert.Equal(t, &Config{ - ClientConfig: confighttp.ClientConfig{ - Endpoint: "https://example.com/api/", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - }, - Endpoint: "https://example.com/api/", - AgentKey: "key1", - }, cfg) - }) - - t.Run("bad endpoint", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "bad_endpoint").String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - require.Error(t, err) - }) - - t.Run("non https endpoint", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "non_https_endpoint").String()) - - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - require.Error(t, err) - }) - - t.Run("missing agent key", func(t *testing.T) { - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "missing_agent_key").String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - err = component.ValidateConfig(cfg) - require.Error(t, err) - }) -} diff --git a/exporter/instanaexporter/generated_component_test.go b/exporter/instanaexporter/generated_component_test.go deleted file mode 100644 index c79b85419ea9..000000000000 --- a/exporter/instanaexporter/generated_component_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package instanaexporter - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/confmap/confmaptest" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/plog" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func TestComponentFactoryType(t *testing.T) { - require.Equal(t, "instana", NewFactory().Type().String()) -} - -func TestComponentConfigStruct(t *testing.T) { - require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) -} - -func TestComponentLifecycle(t *testing.T) { - factory := NewFactory() - - tests := []struct { - name string - createFn func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) - }{ - - { - name: "traces", - createFn: func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesExporter(ctx, set, cfg) - }, - }, - } - - cm, err := confmaptest.LoadConf("metadata.yaml") - require.NoError(t, err) - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub("tests::config") - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(&cfg)) - - for _, tt := range tests { - t.Run(tt.name+"-shutdown", func(t *testing.T) { - c, err := tt.createFn(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - t.Run(tt.name+"-lifecycle", func(t *testing.T) { - c, err := tt.createFn(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - host := componenttest.NewNopHost() - err = c.Start(context.Background(), host) - require.NoError(t, err) - require.NotPanics(t, func() { - switch tt.name { - case "logs": - e, ok := c.(exporter.Logs) - require.True(t, ok) - logs := generateLifecycleTestLogs() - if !e.Capabilities().MutatesData { - logs.MarkReadOnly() - } - err = e.ConsumeLogs(context.Background(), logs) - case "metrics": - e, ok := c.(exporter.Metrics) - require.True(t, ok) - metrics := generateLifecycleTestMetrics() - if !e.Capabilities().MutatesData { - metrics.MarkReadOnly() - } - err = e.ConsumeMetrics(context.Background(), metrics) - case "traces": - e, ok := c.(exporter.Traces) - require.True(t, ok) - traces := generateLifecycleTestTraces() - if !e.Capabilities().MutatesData { - traces.MarkReadOnly() - } - err = e.ConsumeTraces(context.Background(), traces) - } - }) - - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - } -} - -func generateLifecycleTestLogs() plog.Logs { - logs := plog.NewLogs() - rl := logs.ResourceLogs().AppendEmpty() - rl.Resource().Attributes().PutStr("resource", "R1") - l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() - l.Body().SetStr("test log message") - l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return logs -} - -func generateLifecycleTestMetrics() pmetric.Metrics { - metrics := pmetric.NewMetrics() - rm := metrics.ResourceMetrics().AppendEmpty() - rm.Resource().Attributes().PutStr("resource", "R1") - m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() - m.SetName("test_metric") - dp := m.SetEmptyGauge().DataPoints().AppendEmpty() - dp.Attributes().PutStr("test_attr", "value_1") - dp.SetIntValue(123) - dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return metrics -} - -func generateLifecycleTestTraces() ptrace.Traces { - traces := ptrace.NewTraces() - rs := traces.ResourceSpans().AppendEmpty() - rs.Resource().Attributes().PutStr("resource", "R1") - span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() - span.Attributes().PutStr("test_attr", "value_1") - span.SetName("test_span") - span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) - span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return traces -} diff --git a/exporter/instanaexporter/generated_package_test.go b/exporter/instanaexporter/generated_package_test.go deleted file mode 100644 index 516f339423e8..000000000000 --- a/exporter/instanaexporter/generated_package_test.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package instanaexporter - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/exporter/instanaexporter/go.mod b/exporter/instanaexporter/go.mod deleted file mode 100644 index c131a4453c68..000000000000 --- a/exporter/instanaexporter/go.mod +++ /dev/null @@ -1,90 +0,0 @@ -// Deprecated: [v0.109.0] This package is deprecated and will be removed in the next release. -module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter - -go 1.22.0 - -require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configretry v1.16.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/semconv v0.110.0 - go.uber.org/goleak v1.3.0 - go.uber.org/zap v1.27.0 -) - -require ( - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.9 // 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.1 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rs/cors v1.11.1 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.110.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/sdk v1.30.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect - google.golang.org/grpc v1.66.2 // indirect - google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden diff --git a/exporter/instanaexporter/go.sum b/exporter/instanaexporter/go.sum deleted file mode 100644 index 77b0146f6e02..000000000000 --- a/exporter/instanaexporter/go.sum +++ /dev/null @@ -1,178 +0,0 @@ -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= -github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= -github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= -github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -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/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= -github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/client v1.16.0 h1:3m7HzWR41+4M8r9q7UvEDjMBTFMrik/BdvAuwCs0cV4= -go.opentelemetry.io/collector/client v1.16.0/go.mod h1:N01Alc/CouREl18hmxdaQXGfID7dBZrrbsBar7WHkZ0= -go.opentelemetry.io/collector/component v0.110.0 h1:z7uSY/1dcK+vTY2z3v0XxeCoi2wqgHTow/ds3Gozuz4= -go.opentelemetry.io/collector/component v0.110.0/go.mod h1:W99gZdfGtQ5Zg6Bhrwrcl/uZcCG+2qBnZ1z2JO5WCW0= -go.opentelemetry.io/collector/component/componentprofiles v0.110.0 h1:YH43aYKPYfnC0TqgI+WlbHsJkTvQPO3ImJybK3oyxQ8= -go.opentelemetry.io/collector/component/componentprofiles v0.110.0/go.mod h1:ZDVFaOhCt6ce2u/HHwqxoV5f+8P2dh0Xut8laYRu4+o= -go.opentelemetry.io/collector/config/configauth v0.110.0 h1:EtrWNvrYvQzj7zYiZQUxlgAkaXKp2j1tha5AP2YnN2E= -go.opentelemetry.io/collector/config/configauth v0.110.0/go.mod h1:G0xMfX6P2wf4hjsoDLdlV4J/fPpFp7Dpe8BNQ89+IiE= -go.opentelemetry.io/collector/config/configcompression v1.16.0 h1:bi9CJON53w+yYfnSaFgJ8Fb4zGKjFhPE5dnoSc1ag58= -go.opentelemetry.io/collector/config/configcompression v1.16.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= -go.opentelemetry.io/collector/config/confighttp v0.110.0 h1:Z7kog1Oxi6P/gX9DHr+c4xWTt7xeAG6F+pYgwbuIMAc= -go.opentelemetry.io/collector/config/confighttp v0.110.0/go.mod h1:nr0PbgQ1BXfqnPrbywMOCdzplp2CLaIIoujK4EOebnQ= -go.opentelemetry.io/collector/config/configopaque v1.16.0 h1:83cVlPL151kHWrHLUAkdfwvnhp68x0XPxEkSBSfEapE= -go.opentelemetry.io/collector/config/configopaque v1.16.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= -go.opentelemetry.io/collector/config/configretry v1.16.0 h1:GUjZO3uc35vJyMeccUUY2ozYSD8jLGR2Dt7d0NQN0C8= -go.opentelemetry.io/collector/config/configretry v1.16.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= -go.opentelemetry.io/collector/config/configtelemetry v0.110.0 h1:V8Y/Xv7TJpnNGHLrheRKrMydcKBxWYAZ+dj71Kllyos= -go.opentelemetry.io/collector/config/configtelemetry v0.110.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/config/configtls v1.16.0 h1:seh/0Ph5Nkk8mdpG80o8+ExUvzdryB2UftyhnXLxv68= -go.opentelemetry.io/collector/config/configtls v1.16.0/go.mod h1:PrIG1ZamLBLdn880ud6FHv5C4/aEEVr+jPnxwdLdKeg= -go.opentelemetry.io/collector/config/internal v0.110.0 h1:yzCYmACC+lw0SIt2YjFTe0qygKXf88igitmsH6sCsXY= -go.opentelemetry.io/collector/config/internal v0.110.0/go.mod h1:yC7E4h1Uj0SubxcFImh6OvBHFTjMh99+A5PuyIgDWqc= -go.opentelemetry.io/collector/confmap v1.16.0 h1:0bWw/XSosX6xoE1sGsaD3glzRtSxanrF4sgib3jAYr4= -go.opentelemetry.io/collector/confmap v1.16.0/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k= -go.opentelemetry.io/collector/consumer v0.110.0 h1:CnB83KSFQxhFAbNJwTM0blahg16xa6CyUnIIA5qPMbA= -go.opentelemetry.io/collector/consumer v0.110.0/go.mod h1:WlzhfwDfwKkEa5XFdN5x9+jjp9ZF5EUSmtOgVe69zm0= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 h1:KlEGGPFmQN7CFbj8pkiD9J6L820kJgC0zYKqeSFGLEo= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0/go.mod h1:Br4qElhLqAYDMddroNox3CpNv+NxgPgNfGhxFXXxYIw= -go.opentelemetry.io/collector/consumer/consumertest v0.110.0 h1:/rOL4sJr4eSzOp5z6+R7MmuJ5UD6PFOs7S2FA7puE1g= -go.opentelemetry.io/collector/consumer/consumertest v0.110.0/go.mod h1:sKL3UwB6nyH/33JE173o755ekYPwlS/8fs8opTSgPiY= -go.opentelemetry.io/collector/exporter v0.110.0 h1:9XIzyk/xlNuSCfwEebJO9uiAlC4hjwhUSZbYv4JAXEE= -go.opentelemetry.io/collector/exporter v0.110.0/go.mod h1:Nr3aSDaak4j8tOCRqp4gUhsYloXwnhZnQ/sz0Qqb+yY= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 h1:zq3RDDYX7jKTNEJgFbbfAtjeOtMU+doabpZzIyRoRv0= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0/go.mod h1:dUMXYGiNnjaRvD120peFUe6XlJhk8LqbQq2C6sXBkgY= -go.opentelemetry.io/collector/extension v0.110.0 h1:AYFk57W25f7xOo3I6pV0rWNWVtOLZsW+lzFCctnvCkU= -go.opentelemetry.io/collector/extension v0.110.0/go.mod h1:zD/pw9o83SFyn/DCbBdBcH0eUPyGtYgpMSAOqotFYRc= -go.opentelemetry.io/collector/extension/auth v0.110.0 h1:9SHC2sF/KR99LciHABDXRIsXLiujzIjTJpWHO0V8Bqg= -go.opentelemetry.io/collector/extension/auth v0.110.0/go.mod h1:NjpHds6mjeT8Zn2KJVxZtV9c59AoIr6RlBha1RpmScQ= -go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 h1:G1xkNGiBkdSrdhhU5VLE9+y7sZ5fU1/CHps92KSYDLc= -go.opentelemetry.io/collector/extension/experimental/storage v0.110.0/go.mod h1:0XFrIUcbqjsSycNI6Vu7ndMnjSkglMnD2YtUl2ZrzIU= -go.opentelemetry.io/collector/internal/globalsignal v0.110.0 h1:S6bfFEiek8vJeXAbciWS7W8UR6ZrVJB3ftNyFTMHQaY= -go.opentelemetry.io/collector/internal/globalsignal v0.110.0/go.mod h1:GqMXodPWOxK5uqpX8MaMXC2389y2XJTa5nPwf8FYDK8= -go.opentelemetry.io/collector/pdata v1.16.0 h1:g02K8jlRnmQ7TQDuXpdgVL6vIxIVqr5Gbb1qIR27rto= -go.opentelemetry.io/collector/pdata v1.16.0/go.mod h1:YZZJIt2ehxosYf/Y1pbvexjNWsIGNNrzzlCTO9jC1F4= -go.opentelemetry.io/collector/pdata/pprofile v0.110.0 h1:DknuOGOdjYIzVnromhVcW5rWyyjPahf65UAfgXz1xfo= -go.opentelemetry.io/collector/pdata/pprofile v0.110.0/go.mod h1:B3GxiEt40ixeGq2r30AOB3dgKdC281rLw39IqgSTwSM= -go.opentelemetry.io/collector/pdata/testdata v0.110.0 h1:XUXuaKVpD5G7VvTlBCBo/7CDpHvbeWRLXN4zjol94kg= -go.opentelemetry.io/collector/pdata/testdata v0.110.0/go.mod h1:lvpGoQcVDbRjuH3caNIkQ+pkU/+MLKVV4MdNFcp5mxU= -go.opentelemetry.io/collector/pipeline v0.110.0 h1:nArQj8lt2R6ajbbmZ0f7JqkzAzvIOSwxsxDEv9HGKHw= -go.opentelemetry.io/collector/pipeline v0.110.0/go.mod h1:qWk90kohDYBgI/1Kw4DQaQU82+y9GJY8MDse7H2JTWg= -go.opentelemetry.io/collector/receiver v0.110.0 h1:uv+mCadEpWT7yoRvMil1bY44aZbZ7y4oAqsjvypf+t4= -go.opentelemetry.io/collector/receiver v0.110.0/go.mod h1:rTNskk6R+8bU4dlAB1IgdwkIiBl44+C6qcvdyarAyF0= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 h1:QDbKYVQFlQJfo05qS8O0zyZghxeGmxlVUKIuIJQST6U= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0/go.mod h1:DsNqyNWfax62zb1y2ek2ERzrEAiaJocSfc+QLtHNnxI= -go.opentelemetry.io/collector/semconv v0.110.0 h1:KHQnOHe3gUz0zsxe8ph9kN5OTypCFD4V+06AiBTfeNk= -go.opentelemetry.io/collector/semconv v0.110.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= -go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= -go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporter/instanaexporter/internal/backend/config.go b/exporter/instanaexporter/internal/backend/config.go deleted file mode 100644 index 45a63588fefb..000000000000 --- a/exporter/instanaexporter/internal/backend/config.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package backend // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/backend" - -const ( - // AttributeInstanaHostID can be used to distinguish multiple hosts' data - // being processed by a single collector (in a chained scenario) - AttributeInstanaHostID = "instana.host.id" - - HeaderKey = "x-instana-key" - HeaderHost = "x-instana-host" - HeaderTime = "x-instana-time" -) diff --git a/exporter/instanaexporter/internal/converter/all_converter.go b/exporter/instanaexporter/internal/converter/all_converter.go deleted file mode 100644 index e90ff5742113..000000000000 --- a/exporter/instanaexporter/internal/converter/all_converter.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package converter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter" - -import ( - "fmt" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" -) - -var _ Converter = (*ConvertAllConverter)(nil) - -type ConvertAllConverter struct { - converters []Converter - logger *zap.Logger -} - -func (c *ConvertAllConverter) AcceptsSpans(_ pcommon.Map, _ ptrace.SpanSlice) bool { - return true -} - -func (c *ConvertAllConverter) ConvertSpans(attributes pcommon.Map, spanSlice ptrace.SpanSlice) model.Bundle { - bundle := model.NewBundle() - - for i := 0; i < len(c.converters); i++ { - if !c.converters[i].AcceptsSpans(attributes, spanSlice) { - c.logger.Warn(fmt.Sprintf("Converter %q didn't accept spans", c.converters[i].Name())) - - continue - } - - converterBundle := c.converters[i].ConvertSpans(attributes, spanSlice) - if len(converterBundle.Spans) > 0 { - bundle.Spans = append(bundle.Spans, converterBundle.Spans...) - } - } - - return bundle -} - -func (c *ConvertAllConverter) Name() string { - return "ConvertAllConverter" -} - -func NewConvertAllConverter(logger *zap.Logger) Converter { - - return &ConvertAllConverter{ - converters: []Converter{ - &SpanConverter{logger: logger}, - }, - logger: logger, - } -} diff --git a/exporter/instanaexporter/internal/converter/converter.go b/exporter/instanaexporter/internal/converter/converter.go deleted file mode 100644 index 5fecf52be7f9..000000000000 --- a/exporter/instanaexporter/internal/converter/converter.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package converter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter" - -import ( - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" -) - -type Converter interface { - AcceptsSpans(attributes pcommon.Map, spanSlice ptrace.SpanSlice) bool - ConvertSpans(attributes pcommon.Map, spanSlice ptrace.SpanSlice) model.Bundle - Name() string -} diff --git a/exporter/instanaexporter/internal/converter/model/bundle.go b/exporter/instanaexporter/internal/converter/model/bundle.go deleted file mode 100644 index 52f6349bd557..000000000000 --- a/exporter/instanaexporter/internal/converter/model/bundle.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package model // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" - -import ( - "encoding/json" -) - -type Bundle struct { - Spans []Span `json:"spans,omitempty"` -} - -func NewBundle() Bundle { - return Bundle{ - Spans: []Span{}, - } -} - -func (b *Bundle) Marshal() ([]byte, error) { - json, err := json.Marshal(b) - if err != nil { - return nil, err - } - - return json, nil -} diff --git a/exporter/instanaexporter/internal/converter/model/package_test.go b/exporter/instanaexporter/internal/converter/model/package_test.go deleted file mode 100644 index 078a3432d433..000000000000 --- a/exporter/instanaexporter/internal/converter/model/package_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package model - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/exporter/instanaexporter/internal/converter/model/span.go b/exporter/instanaexporter/internal/converter/model/span.go deleted file mode 100644 index d86034211080..000000000000 --- a/exporter/instanaexporter/internal/converter/model/span.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package model // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" - -import ( - "fmt" - "time" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" -) - -const ( - OtelSpanType = "otel" - - InstanaSpanKindServer = "server" - InstanaSpanKindClient = "client" - InstanaSpanKindProducer = "producer" - InstanaSpanKindConsumer = "consumer" - InstanaSpanKindInternal = "internal" - - InstanaDataError = "error" - InstanaDataErrorDetail = "error_detail" -) - -type BatchInfo struct { - Size int `json:"s"` -} - -type FromS struct { - EntityID string `json:"e"` - // Serverless agents fields - Hostless bool `json:"hl,omitempty"` - CloudProvider string `json:"cp,omitempty"` - // Host agent fields - HostID string `json:"h,omitempty"` -} - -type TraceReference struct { - TraceID string `json:"t"` - ParentID string `json:"p,omitempty"` -} - -type OTelSpanData struct { - Kind string `json:"kind"` - HasTraceParent bool `json:"tp,omitempty"` - ServiceName string `json:"service"` - Operation string `json:"operation"` - TraceState string `json:"trace_state,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - Resource map[string]string `json:"resource,omitempty"` -} - -type Span struct { - TraceReference - - SpanID string `json:"s"` - LongTraceID string `json:"lt,omitempty"` - Timestamp uint64 `json:"ts"` - Duration uint64 `json:"d"` - Name string `json:"n"` - From *FromS `json:"f"` - Batch *BatchInfo `json:"b,omitempty"` - Ec int `json:"ec,omitempty"` - Synthetic bool `json:"sy,omitempty"` - CorrelationType string `json:"crtp,omitempty"` - CorrelationID string `json:"crid,omitempty"` - ForeignTrace bool `json:"tp,omitempty"` - Ancestor *TraceReference `json:"ia,omitempty"` - Data OTelSpanData `json:"data,omitempty"` -} - -func ConvertPDataSpanToInstanaSpan(fromS FromS, otelSpan ptrace.Span, serviceName string, attributes pcommon.Map) (Span, error) { - traceID := convertTraceID(otelSpan.TraceID()) - - instanaSpan := Span{ - Name: OtelSpanType, - TraceReference: TraceReference{}, - Timestamp: uint64(otelSpan.StartTimestamp()) / uint64(time.Millisecond), - Duration: (uint64(otelSpan.EndTimestamp()) - uint64(otelSpan.StartTimestamp())) / uint64(time.Millisecond), - Data: OTelSpanData{ - Tags: make(map[string]string), - Resource: make(map[string]string), - }, - From: &fromS, - } - - if len(traceID) != 32 { - return Span{}, fmt.Errorf("failed parsing span, length of TraceID should be 32, but got %d", len(traceID)) - } - - instanaSpan.TraceReference.TraceID = traceID[16:32] - instanaSpan.LongTraceID = traceID - - if !otelSpan.ParentSpanID().IsEmpty() { - instanaSpan.TraceReference.ParentID = convertSpanID(otelSpan.ParentSpanID()) - } - - instanaSpan.SpanID = convertSpanID(otelSpan.SpanID()) - - kind, isEntry := otelKindToInstanaKind(otelSpan.Kind()) - instanaSpan.Data.Kind = kind - - if !otelSpan.ParentSpanID().IsEmpty() && isEntry { - instanaSpan.Data.HasTraceParent = true - } - - instanaSpan.Data.ServiceName = serviceName - - instanaSpan.Data.Operation = otelSpan.Name() - - instanaSpan.Data.TraceState = otelSpan.TraceState().AsRaw() - - otelSpan.Attributes().Range(func(k string, v pcommon.Value) bool { - instanaSpan.Data.Tags[k] = v.AsString() - - return true - }) - - attributes.Range(func(k string, v pcommon.Value) bool { - instanaSpan.Data.Resource[k] = v.AsString() - - return true - }) - - errornous := false - if otelSpan.Status().Code() == ptrace.StatusCodeError { - errornous = true - instanaSpan.Data.Tags[InstanaDataError] = traceutil.StatusCodeStr(otelSpan.Status().Code()) - instanaSpan.Data.Tags[InstanaDataErrorDetail] = otelSpan.Status().Message() - } - - if errornous { - instanaSpan.Ec = 1 - } - - return instanaSpan, nil -} diff --git a/exporter/instanaexporter/internal/converter/model/util.go b/exporter/instanaexporter/internal/converter/model/util.go deleted file mode 100644 index 173fbbad7f64..000000000000 --- a/exporter/instanaexporter/internal/converter/model/util.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package model // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" - -import ( - "encoding/hex" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func convertTraceID(traceID pcommon.TraceID) string { - return hex.EncodeToString(traceID[:]) -} - -func convertSpanID(spanID pcommon.SpanID) string { - return hex.EncodeToString(spanID[:]) -} - -func otelKindToInstanaKind(otelKind ptrace.SpanKind) (string, bool) { - switch otelKind { - case ptrace.SpanKindServer: - return InstanaSpanKindServer, true - case ptrace.SpanKindClient: - return InstanaSpanKindClient, false - case ptrace.SpanKindProducer: - return InstanaSpanKindProducer, false - case ptrace.SpanKindConsumer: - return InstanaSpanKindConsumer, true - case ptrace.SpanKindInternal: - return InstanaSpanKindInternal, false - default: - return "unknown", false - } -} diff --git a/exporter/instanaexporter/internal/converter/model/util_test.go b/exporter/instanaexporter/internal/converter/model/util_test.go deleted file mode 100644 index 87273014ceb6..000000000000 --- a/exporter/instanaexporter/internal/converter/model/util_test.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package model - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -func TestCanConvertSpanID(t *testing.T) { - bytes := [8]byte{1, 2, 3, 4, 10, 11, 12, 13} - - assert.Equal(t, "010203040a0b0c0d", convertSpanID(pcommon.SpanID(bytes))) -} diff --git a/exporter/instanaexporter/internal/converter/package_test.go b/exporter/instanaexporter/internal/converter/package_test.go deleted file mode 100644 index dd30fae768ab..000000000000 --- a/exporter/instanaexporter/internal/converter/package_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package converter - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/exporter/instanaexporter/internal/converter/span_converter.go b/exporter/instanaexporter/internal/converter/span_converter.go deleted file mode 100644 index 23eae39ec9e9..000000000000 --- a/exporter/instanaexporter/internal/converter/span_converter.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package converter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter" - -import ( - "fmt" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.8.0" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/backend" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" -) - -var _ Converter = (*SpanConverter)(nil) - -type SpanConverter struct { - logger *zap.Logger -} - -func (c *SpanConverter) AcceptsSpans(_ pcommon.Map, _ ptrace.SpanSlice) bool { - return true -} - -func (c *SpanConverter) ConvertSpans(attributes pcommon.Map, spanSlice ptrace.SpanSlice) model.Bundle { - bundle := model.NewBundle() - fromS := model.FromS{} - - hostIDValue, ex := attributes.Get(backend.AttributeInstanaHostID) - if !ex { - fromS.HostID = "unknown-host-id" - } else { - fromS.HostID = hostIDValue.AsString() - } - - processIDValue, ex := attributes.Get(conventions.AttributeProcessPID) - if !ex { - fromS.EntityID = "unknown-process-id" - } else { - fromS.EntityID = processIDValue.AsString() - } - - serviceName := "" - serviceNameValue, ex := attributes.Get(conventions.AttributeServiceName) - if ex { - serviceName = serviceNameValue.AsString() - } - - for i := 0; i < spanSlice.Len(); i++ { - otelSpan := spanSlice.At(i) - - instanaSpan, err := model.ConvertPDataSpanToInstanaSpan(fromS, otelSpan, serviceName, attributes) - if err != nil { - c.logger.Warn(fmt.Sprintf("Error converting Open Telemetry span to Instana span: %s", err.Error())) - continue - } - - bundle.Spans = append(bundle.Spans, instanaSpan) - } - - return bundle -} - -func (c *SpanConverter) Name() string { - return "SpanConverter" -} diff --git a/exporter/instanaexporter/internal/converter/span_converter_test.go b/exporter/instanaexporter/internal/converter/span_converter_test.go deleted file mode 100644 index 386cc0d29960..000000000000 --- a/exporter/instanaexporter/internal/converter/span_converter_test.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package converter - -import ( - "bytes" - "crypto/rand" - "encoding/json" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.8.0" - - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/backend" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter/internal/converter/model" -) - -type SpanOptions struct { - TraceID [16]byte - SpanID [8]byte - ParentID [8]byte - Error string - StartTimestamp time.Duration - EndTimestamp time.Duration -} - -func setupSpan(span ptrace.Span, opts SpanOptions) (err error) { - var empty16 [16]byte - var empty8 [8]byte - - now := time.Now().UnixMilli() - - traceID := opts.TraceID - spanID := opts.SpanID - parentID := opts.ParentID - startTime := opts.StartTimestamp - endTime := opts.EndTimestamp - - if bytes.Equal(traceID[:], empty16[:]) { - traceID, err = generateTraceID() - } - - if bytes.Equal(spanID[:], empty8[:]) { - spanID, err = generateSpanID() - } - - if startTime == time.Second*0 { - startTime = time.Duration(now) - } - - if endTime == time.Second*0 { - endTime = startTime + 1000 - } - - if opts.Error != "" { - span.Status().SetCode(ptrace.StatusCodeError) - span.Status().SetMessage(opts.Error) - } - - if !bytes.Equal(parentID[:], empty8[:]) { - span.SetParentSpanID(parentID) - } - - span.SetStartTimestamp(pcommon.Timestamp(startTime * 1e6)) - span.SetEndTimestamp(pcommon.Timestamp(endTime * 1e6)) - - span.SetSpanID(spanID) - span.SetKind(ptrace.SpanKindClient) - span.SetName("my_operation") - span.TraceState().FromRaw("") - span.SetTraceID(traceID) - - // adding attributes (tags in the instana side) - span.Attributes().PutBool("some_key", true) - return err -} - -func generateAttrs() pcommon.Map { - attrs := pcommon.NewMap() - attrs.PutBool("some_boolean_key", true) - attrs.PutStr("custom_attribute", "ok") - - // test non empty pid - attrs.PutStr(conventions.AttributeProcessPID, "1234") - - // test non empty service name - attrs.PutStr(conventions.AttributeServiceName, "myservice") - - // test non empty instana host id - attrs.PutStr(backend.AttributeInstanaHostID, "myhost1") - - attrs.PutBool("itistrue", true) - - return attrs -} - -func validateInstanaSpanBasics(sp model.Span, t *testing.T) { - if sp.SpanID == "" { - t.Error("expected span id not to be empty") - } - - if sp.TraceID == "" { - t.Error("expected trace id not to be empty") - } - - if sp.Name != "otel" { - t.Errorf("expected span name to be 'otel' but received '%v'", sp.Name) - } - - if sp.Timestamp <= 0 { - t.Errorf("expected timestamp to be provided but received %v", sp.Timestamp) - } - - if sp.Duration <= 0 { - t.Errorf("expected duration to be provided but received %v", sp.Duration) - } - - if sp.Data.ServiceName != "myservice" { - t.Errorf("expected span name to be 'myservice' but received '%v'", sp.Data.ServiceName) - } - - if len(sp.Data.Resource) == 0 { - t.Error("expected resource block not to be empty") - } - - if sp.Data.Resource[conventions.AttributeServiceName] != sp.Data.ServiceName { - t.Errorf("expected resource block to contain same name (%v) as span.Name (%v)", - sp.Data.Resource[conventions.AttributeServiceName], sp.Data.ServiceName) - } - -} - -func validateBundle(jsonData []byte, t *testing.T, fn func(model.Span, *testing.T)) { - var bundle model.Bundle - - err := json.Unmarshal(jsonData, &bundle) - - if err != nil { - t.Fatal(err) - } - - if len(bundle.Spans) == 0 { - t.Log("bundle contains no spans") - return - } - - for _, span := range bundle.Spans { - fn(span, t) - } -} - -func validateSpanError(sp model.Span, shouldHaveError bool, t *testing.T) { - if shouldHaveError { - if sp.Ec <= 0 { - t.Error("expected span to have errors (ec = 1)") - } - - if sp.Data.Tags[model.InstanaDataError] == "" { - t.Error("expected data.error to exist") - } - - if sp.Data.Tags[model.InstanaDataErrorDetail] == "" { - t.Error("expected data.error_detail to exist") - } - - return - } - - if sp.Ec > 0 { - t.Error("expected span not to have errors (ec = 0)") - } - - if sp.Data.Tags[model.InstanaDataError] != "" { - t.Error("expected data.error to be empty") - } - - if sp.Data.Tags[model.InstanaDataErrorDetail] != "" { - t.Error("expected data.error_detail to be empty") - } -} - -func TestSpanBasics(t *testing.T) { - spanSlice := ptrace.NewSpanSlice() - - sp1 := spanSlice.AppendEmpty() - - err := setupSpan(sp1, SpanOptions{}) - require.NoError(t, err) - - attrs := generateAttrs() - conv := SpanConverter{} - bundle := conv.ConvertSpans(attrs, spanSlice) - data, _ := json.MarshalIndent(bundle, "", " ") - - validateBundle(data, t, func(sp model.Span, t *testing.T) { - validateInstanaSpanBasics(sp, t) - validateSpanError(sp, false, t) - }) -} - -func TestSpanCorrelation(t *testing.T) { - spanSlice := ptrace.NewSpanSlice() - - sp1 := spanSlice.AppendEmpty() - err := setupSpan(sp1, SpanOptions{}) - require.NoError(t, err) - - sp2 := spanSlice.AppendEmpty() - err = setupSpan(sp2, SpanOptions{ - ParentID: sp1.SpanID(), - }) - require.NoError(t, err) - - sp3 := spanSlice.AppendEmpty() - err = setupSpan(sp3, SpanOptions{ - ParentID: sp2.SpanID(), - }) - require.NoError(t, err) - - sp4 := spanSlice.AppendEmpty() - require.NoError(t, setupSpan(sp4, SpanOptions{ - ParentID: sp1.SpanID(), - })) - - attrs := generateAttrs() - conv := SpanConverter{} - bundle := conv.ConvertSpans(attrs, spanSlice) - data, _ := json.MarshalIndent(bundle, "", " ") - - spanIDList := make(map[string]bool) - - validateBundle(data, t, func(sp model.Span, t *testing.T) { - validateInstanaSpanBasics(sp, t) - validateSpanError(sp, false, t) - - spanIDList[sp.SpanID] = true - - if sp.ParentID != "" && !spanIDList[sp.ParentID] { - t.Errorf("span %v expected to have parent id %v", sp.SpanID, sp.ParentID) - } - }) -} -func TestSpanWithError(t *testing.T) { - spanSlice := ptrace.NewSpanSlice() - - sp1 := spanSlice.AppendEmpty() - require.NoError(t, setupSpan(sp1, SpanOptions{ - Error: "some error", - })) - - attrs := generateAttrs() - conv := SpanConverter{} - bundle := conv.ConvertSpans(attrs, spanSlice) - data, _ := json.MarshalIndent(bundle, "", " ") - - validateBundle(data, t, func(sp model.Span, t *testing.T) { - validateInstanaSpanBasics(sp, t) - validateSpanError(sp, true, t) - }) -} - -func generateTraceID() (data [16]byte, err error) { - _, err = rand.Read(data[:]) - return data, err -} - -func generateSpanID() (data [8]byte, err error) { - _, err = rand.Read(data[:]) - return data, err -} diff --git a/exporter/instanaexporter/internal/metadata/generated_status.go b/exporter/instanaexporter/internal/metadata/generated_status.go deleted file mode 100644 index 799844c5c322..000000000000 --- a/exporter/instanaexporter/internal/metadata/generated_status.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -var ( - Type = component.MustNewType("instana") - ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter" -) - -const ( - TracesStability = component.StabilityLevelDeprecated -) diff --git a/exporter/instanaexporter/metadata.yaml b/exporter/instanaexporter/metadata.yaml deleted file mode 100644 index c979dad2ca99..000000000000 --- a/exporter/instanaexporter/metadata.yaml +++ /dev/null @@ -1,12 +0,0 @@ -type: instana - -status: - class: exporter - stability: - deprecated: [traces] - distributions: [contrib] - codeowners: - active: [jpkrohling, hickeyma] - -tests: - expect_consumer_error: true \ No newline at end of file diff --git a/exporter/instanaexporter/testdata/config.yml b/exporter/instanaexporter/testdata/config.yml deleted file mode 100644 index f4fbb355a13a..000000000000 --- a/exporter/instanaexporter/testdata/config.yml +++ /dev/null @@ -1,23 +0,0 @@ -instana/bad_endpoint: - endpoint: never a url - agent_key: key1 - tls: - ca_file: ca.crt -instana/missing_agent_key: - endpoint: https://example.com/api/ - tls: - ca_file: ca.crt -instana/valid: - endpoint: https://example.com/api/ - agent_key: key1 -instana/valid_with_ca_file: - endpoint: https://example.com/api/ - agent_key: key1 - tls: - ca_file: ca.crt -instana/valid_no_ca_file: - endpoint: https://example.com/api/ - agent_key: key1 -instana/non_https_endpoint: - endpoint: http://example.com/api/ - agent_key: key1 diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index 3a32a52a1271..a915a45f43fa 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -35,7 +35,6 @@ components: - googlemanagedprometheus - honeycombmarker - influxdb - - instana - kafka - loadbalancing - logicmonitor diff --git a/versions.yaml b/versions.yaml index bde548ae0674..0ff26e843e6b 100644 --- a/versions.yaml +++ b/versions.yaml @@ -49,7 +49,6 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombmarkerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter - - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/instanaexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kineticaexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter