From 8a8d576674f50a9ad84bacf6760c2777876616aa Mon Sep 17 00:00:00 2001 From: Yang Song Date: Mon, 5 Feb 2024 11:28:44 -0500 Subject: [PATCH] [processor/datadog] Delete datadogprocessor (#31037) **Description:** Delete datadogprocessor which has been deprecated since v0.84.0 --- .chloggen/delete-datadogprcessor.yaml | 27 ++ .github/CODEOWNERS | 1 - .github/ISSUE_TEMPLATE/bug_report.yaml | 1 - .github/ISSUE_TEMPLATE/feature_request.yaml | 1 - .github/ISSUE_TEMPLATE/other.yaml | 1 - cmd/configschema/go.mod | 3 - cmd/otelcontribcol/builder-config.yaml | 2 - cmd/otelcontribcol/components.go | 2 - cmd/otelcontribcol/go.mod | 3 - go.mod | 3 - internal/components/components.go | 2 - internal/datadog/agent_test.go | 2 +- processor/datadogprocessor/Makefile | 1 - processor/datadogprocessor/README.md | 110 ----- processor/datadogprocessor/config.go | 26 -- processor/datadogprocessor/doc.go | 19 - processor/datadogprocessor/factory.go | 27 -- .../generated_component_test.go | 98 ----- processor/datadogprocessor/go.mod | 125 ------ processor/datadogprocessor/go.sum | 290 ------------- .../internal/metadata/generated_status.go | 22 - processor/datadogprocessor/metadata.yaml | 13 - processor/datadogprocessor/processor.go | 171 -------- processor/datadogprocessor/processor_test.go | 386 ------------------ reports/distributions/contrib.yaml | 1 - versions.yaml | 1 - 26 files changed, 28 insertions(+), 1310 deletions(-) create mode 100644 .chloggen/delete-datadogprcessor.yaml delete mode 100644 processor/datadogprocessor/Makefile delete mode 100644 processor/datadogprocessor/README.md delete mode 100644 processor/datadogprocessor/config.go delete mode 100644 processor/datadogprocessor/doc.go delete mode 100644 processor/datadogprocessor/factory.go delete mode 100644 processor/datadogprocessor/generated_component_test.go delete mode 100644 processor/datadogprocessor/go.mod delete mode 100644 processor/datadogprocessor/go.sum delete mode 100644 processor/datadogprocessor/internal/metadata/generated_status.go delete mode 100644 processor/datadogprocessor/metadata.yaml delete mode 100644 processor/datadogprocessor/processor.go delete mode 100644 processor/datadogprocessor/processor_test.go diff --git a/.chloggen/delete-datadogprcessor.yaml b/.chloggen/delete-datadogprcessor.yaml new file mode 100644 index 000000000000..677b670a0055 --- /dev/null +++ b/.chloggen/delete-datadogprcessor.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: datadogprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Delete datadogprocessor which has been deprecated since v0.84.0 + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [31026] + +# (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: Use datadogconnector instead. + +# 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 03676c63560d..26d48daea360 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -153,7 +153,6 @@ pkg/winperfcounters/ @open-telemetry/collect processor/attributesprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken processor/cumulativetodeltaprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth -processor/datadogprocessor/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 processor/deltatocumulativeprocessor/ @open-telemetry/collector-contrib-approvers @sh0rez processor/deltatorateprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9 processor/filterprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @boostchicken diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c96309f1a015..1a4cd0e7a80b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -149,7 +149,6 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog - processor/deltatocumulative - processor/deltatorate - processor/filter diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index a407a9880351..4d2ee4555197 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -143,7 +143,6 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog - processor/deltatocumulative - processor/deltatorate - processor/filter diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index ec95b3a4832f..da9533e74689 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -143,7 +143,6 @@ body: - pkg/winperfcounters - processor/attributes - processor/cumulativetodelta - - processor/datadog - processor/deltatocumulative - processor/deltatorate - processor/filter diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 6ed238d06ad1..ca96a0c3acd2 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -94,7 +94,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.93.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.93.0 // indirect @@ -903,8 +902,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/attr replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ../../processor/cumulativetodeltaprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor/ - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ../../processor/deltatorateprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor => ../../processor/filterprocessor diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index c30b5ebec243..6746abc99957 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -98,7 +98,6 @@ processors: - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.93.1-0.20240202170612-7abb9622312d - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.93.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.93.0 @@ -409,7 +408,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otlpjsonfilereceiver => ../../receiver/otlpjsonfilereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/processor/redactionprocessor => ../../processor/redactionprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling => ../../extension/jaegerremotesampling - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver => ../../receiver/sshcheckreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver => ../../receiver/datadogreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/chronyreceiver => ../../receiver/chronyreceiver diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 40f528e3d935..0ca921805cee 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -99,7 +99,6 @@ import ( filestorage "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" cumulativetodeltaprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" - datadogprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" deltatorateprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" filterprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" groupbyattrsprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" @@ -400,7 +399,6 @@ func components() (otelcol.Factories, error) { memorylimiterprocessor.NewFactory(), attributesprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), - datadogprocessor.NewFactory(), deltatorateprocessor.NewFactory(), filterprocessor.NewFactory(), groupbyattrsprocessor.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 74f33aaa5158..06e678aeabc1 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -87,7 +87,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.93.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.93.0 @@ -1108,8 +1107,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/reda replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling => ../../extension/jaegerremotesampling -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ../../processor/datadogprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sshcheckreceiver => ../../receiver/sshcheckreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver => ../../receiver/datadogreceiver diff --git a/go.mod b/go.mod index aa33a1cbf682..4922a146db3b 100644 --- a/go.mod +++ b/go.mod @@ -69,7 +69,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.93.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.93.0 @@ -903,8 +902,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/attr replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor => ./processor/cumulativetodeltaprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor => ./processor/datadogprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor => ./processor/deltatorateprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor => ./processor/filterprocessor diff --git a/internal/components/components.go b/internal/components/components.go index 31c9fb87e897..fa30e4294933 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -88,7 +88,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" @@ -382,7 +381,6 @@ func Components() (otelcol.Factories, error) { spanmetricsprocessor.NewFactory(), spanprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), - datadogprocessor.NewFactory(), deltatorateprocessor.NewFactory(), transformprocessor.NewFactory(), } diff --git a/internal/datadog/agent_test.go b/internal/datadog/agent_test.go index 09133528eda6..a4a06823f55e 100644 --- a/internal/datadog/agent_test.go +++ b/internal/datadog/agent_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package datadog // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadog" +package datadog // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" import ( "context" diff --git a/processor/datadogprocessor/Makefile b/processor/datadogprocessor/Makefile deleted file mode 100644 index ded7a36092dc..000000000000 --- a/processor/datadogprocessor/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common diff --git a/processor/datadogprocessor/README.md b/processor/datadogprocessor/README.md deleted file mode 100644 index 480dbc324e9b..000000000000 --- a/processor/datadogprocessor/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# Datadog Processor - -| 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%3Aprocessor%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fdatadog) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@dineshg13](https://www.github.com/dineshg13) | -| Emeritus | [@gbbr](https://www.github.com/gbbr) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -## Deprecated in favor of datadogconnector - -The `datadogprocessor` has been deprecated in favor of the `datadogconnector`. Please refer to the [following docs](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/datadogconnector/README.md#usage) in order to update to the `datadogconnector`. - -## Description - - -This component has been deprecated in favor of its successor the [Datadog Connector](../../connector/datadogconnector/README.md) which serves the same purpose and should be used in place of the Datadog processor. - -The Datadog Processor can be used to compute Datadog APM Stats pre-sampling. For example, when using the [tailsamplingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor#tail-sampling-processor) or [probabilisticsamplerprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor) components, the `datadogprocessor` can be prepended into the pipeline to ensure that Datadog APM Stats are accurate and include the dropped traces. - -## Usage - -To use the Datadog Processor, simply prepend it into a pipeline before any sampling processor. The Datadog Processor will compute APM Stats on all spans that it sees. Here is an example on how to add it to a pipeline using the [probabilisticsampler](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor): - - - - - - -
Before After
- -```yaml -# ... -processors: - # ... - probabilistic_sampler: - sampling_percentage: 20 - -exporters: - datadog: - api: - key: ${env:DD_API_KEY} - -service: - pipelines: - metrics: - receivers: [otlp] - processors: [batch] - exporters: [datadog] - traces: - receivers: [otlp] - processors: [batch, probabilistic_sampler] - exporters: [datadog] -``` - - - -```yaml -# ... -processors: - # ... - probabilistic_sampler: - sampling_percentage: 20 - # add the "datadog" processor definition - datadog: - -exporters: - datadog: - api: - key: ${env:DD_API_KEY} - -service: - pipelines: - metrics: - receivers: [otlp] - processors: [batch] - exporters: [datadog] - traces: - receivers: [otlp] - # prepend it to the sampler in your pipeline: - processors: [batch, datadog, probabilistic_sampler] - exporters: [datadog] -``` - -
- -Simply add the Datadog Processor into your list of processors and prepend it to the sampler in the traces pipeline to ensure it sees all spans. - -## Configuration - -By default, when used in conjunction with the Datadog Exporter, the processor should detect its presence (as long as it is configured within a pipeline), and use it to export the Datadog APM Stats. No configuration needed! - -If using within a gateway deployment or running alongside the Datadog Agent where the Datadog Exporter is not present, then you must specify an alternative exporter to use, such as for example an OTLP exporter: - -```yaml -processors: - datadog: - metrics_exporter: otlp -``` - -The default value for `metrics_exporter` is `datadog`. If your Datadog Exporter has a different name, you must specify it via config. Any configured metrics exporter must exist as part of a metrics pipeline. - -When using in conjunction with the Datadog Agent's OTLP Ingest, the minimum required Datadog Agent version that supports this processor is 7.42.0. - -If not using the Datadog backend, the processor will still create valid RED metrics, but in that situation you may prefer to use the [spanmetricsprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanmetricsprocessor) instead. diff --git a/processor/datadogprocessor/config.go b/processor/datadogprocessor/config.go deleted file mode 100644 index f28e7299bafe..000000000000 --- a/processor/datadogprocessor/config.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "go.opentelemetry.io/collector/component" -) - -// Config defines the configuration options for datadogprocessor. -type Config struct { - - // MetricsExporter specifies the name of the metrics exporter to be used when - // exporting stats metrics. - MetricsExporter component.ID `mapstructure:"metrics_exporter"` -} - -func createDefaultConfig() component.Config { - return &Config{ - MetricsExporter: datadogComponent, - } -} - -// datadogComponent defines the default component that will be used for -// exporting metrics. -var datadogComponent = component.NewID(component.Type("datadog")) diff --git a/processor/datadogprocessor/doc.go b/processor/datadogprocessor/doc.go deleted file mode 100644 index c223bdf9e1cf..000000000000 --- a/processor/datadogprocessor/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -// Package datadogprocessor contains the Datadog Processor. The Datadog Processor is used in -// conjunction with the Collector's tail samplers (such as the tailsamplingprocessor or the -// probabilisticsamplerprocessor) to extract accurate APM Stats in situations when not all -// traces are seen by the Datadog Exporter. -// -// By default, the processor looks for an exporter named "datadog" in a metrics pipeline. -// It can use any other exporter (in case the name is different, a gateway deployment is used -// or the collector runs alongside the Datadog Agent) but this needs to be specified via config, -// such as for example: -// -// processor: -// datadog: -// metrics_exporter: otlp -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" diff --git a/processor/datadogprocessor/factory.go b/processor/datadogprocessor/factory.go deleted file mode 100644 index 7e8f547277b8..000000000000 --- a/processor/datadogprocessor/factory.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/processor" - - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor/internal/metadata" -) - -// NewFactory creates a factory for the datadog processor. -func NewFactory() processor.Factory { - return processor.NewFactory( - metadata.Type, - createDefaultConfig, - processor.WithTraces(createTracesProcessor, metadata.TracesStability), - ) -} - -func createTracesProcessor(ctx context.Context, params processor.CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (processor.Traces, error) { - return newProcessor(ctx, params.TelemetrySettings, cfg, nextConsumer) -} diff --git a/processor/datadogprocessor/generated_component_test.go b/processor/datadogprocessor/generated_component_test.go deleted file mode 100644 index ab5236bcca01..000000000000 --- a/processor/datadogprocessor/generated_component_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package datadogprocessor - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/processor/processortest" - - "go.opentelemetry.io/collector/confmap/confmaptest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" -) - -// assertNoErrorHost implements a component.Host that asserts that there were no errors. -type assertNoErrorHost struct { - component.Host - *testing.T -} - -var _ component.Host = (*assertNoErrorHost)(nil) - -func TestComponentLifecycle(t *testing.T) { - factory := NewFactory() - - tests := []struct { - name string - createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) - }{ - - { - name: "traces", - createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) - }, - }, - } - - 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, component.UnmarshalConfig(sub, cfg)) - - for _, test := range tests { - t.Run(test.name+"-shutdown", func(t *testing.T) { - c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - - t.Run(test.name+"-lifecycle", func(t *testing.T) { - - // TODO support lifecycle - t.SkipNow() - - c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) - require.NoError(t, err) - host := componenttest.NewNopHost() - err = c.Start(context.Background(), host) - require.NoError(t, err) - require.NotPanics(t, func() { - switch e := c.(type) { - case processor.Logs: - logs := testdata.GenerateLogsManyLogRecordsSameResource(2) - if !e.Capabilities().MutatesData { - logs.MarkReadOnly() - } - err = e.ConsumeLogs(context.Background(), logs) - case processor.Metrics: - metrics := testdata.GenerateMetricsTwoMetrics() - if !e.Capabilities().MutatesData { - metrics.MarkReadOnly() - } - err = e.ConsumeMetrics(context.Background(), metrics) - case processor.Traces: - traces := testdata.GenerateTracesTwoSpansSameResource() - if !e.Capabilities().MutatesData { - traces.MarkReadOnly() - } - err = e.ConsumeTraces(context.Background(), traces) - } - }) - require.NoError(t, err) - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - } -} diff --git a/processor/datadogprocessor/go.mod b/processor/datadogprocessor/go.mod deleted file mode 100644 index 3ab49870b8cd..000000000000 --- a/processor/datadogprocessor/go.mod +++ /dev/null @@ -1,125 +0,0 @@ -// Deprecated: Use Datadog connector instead. -module github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor - -go 1.20 - -require ( - github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 - github.com/DataDog/sketches-go v1.4.4 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.93.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.93.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/collector/confmap v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/collector/consumer v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/collector/exporter v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/collector/extension v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/collector/pdata v1.0.2-0.20240202163303-26c157e3bffb - go.opentelemetry.io/collector/processor v0.93.1-0.20240202170612-7abb9622312d - go.opentelemetry.io/otel/metric v1.22.0 - go.opentelemetry.io/otel/trace v1.22.0 - go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.32.0 -) - -require ( - github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.2 // indirect - github.com/DataDog/datadog-go/v5 v5.1.1 // indirect - github.com/DataDog/go-sqllexer v0.0.8 // indirect - github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/godbus/dbus/v5 v5.0.6 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/karrick/godirwalk v1.17.0 // 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.0.1 // indirect - github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // 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/opencontainers/runtime-spec v1.1.0-rc.3 // indirect - github.com/outcaste-io/ristretto v0.2.1 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/philhofer/fwd v1.1.2 // 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-20220216144756-c35f1ee13d7c // indirect - github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.46.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.12 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/tinylib/msgp v1.1.9 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/collector v0.93.1-0.20240202170612-7abb9622312d // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240202170612-7abb9622312d // indirect - go.opentelemetry.io/collector/featuregate v1.0.2-0.20240202163303-26c157e3bffb // indirect - go.opentelemetry.io/collector/semconv v0.93.1-0.20240202170612-7abb9622312d // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.45.0 // indirect - go.opentelemetry.io/otel/sdk v1.22.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.22.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.61.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog => ../../internal/datadog - -retract ( - v0.76.2 - v0.76.1 -) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest diff --git a/processor/datadogprocessor/go.sum b/processor/datadogprocessor/go.sum deleted file mode 100644 index 47fcaae9f80f..000000000000 --- a/processor/datadogprocessor/go.sum +++ /dev/null @@ -1,290 +0,0 @@ -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.2 h1:y08IzbpFM/HBaKfgayFZe1FpcbZn6bVPXoZ++93vxv8= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.2/go.mod h1:A4nLJvxlg6BO/8/zg81til9yT0uRPuXDFMAzDMpmgn4= -github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel h1:nBejGNIU6Jk7bPBxz2bAO+f+kahAXWBXPecebY3R+Zo= -github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel/go.mod h1:wjr5YlVvGip6VmAGzHrdBaGUu1LaA9B6gHvInm5kHiY= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.2 h1:7jn5EOu84uph4sd+pB3vF8LnsdTjhh+1/NnCvfNpG4A= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.2/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= -github.com/DataDog/datadog-agent/pkg/trace v0.50.2 h1:eyjTZx3yupppiND/qwiUj6VuWHfyGfPMrqQwRgE41Rw= -github.com/DataDog/datadog-agent/pkg/trace v0.50.2/go.mod h1:SWNRcgZoBNoiyRrECEEe3xQGNCXfqzZVOB43WxDAMlc= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.2 h1:f+dYKVwMoGHZpOQM33Wogb/er8ZXeo4aUcbkSk17lM8= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.50.2/go.mod h1:4DalvbtHzT0nqpbj/36FP0IwfKWCSB5Zap7O/SGfPKI= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.2 h1:D4jzhoZtZikiugOr2pl6Xm+MMfrwkjnZziGHgTNpBLk= -github.com/DataDog/datadog-agent/pkg/util/log v0.50.2/go.mod h1:0vyUsWVWDdIRzd6Itim0ZkjCvOF7V8Yi4IzpE5q/UPo= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.2 h1:yq97sYsulZz/qyl/bogRigvUskqXPSrt8c7b+xKDs4I= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.50.2/go.mod h1:eTXti9mx7qhkoi+Qg3mMmvVY5McghUUgsf4Hrk9zY8k= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.2 h1:xFGXfIsTyHC0VlrrfoAVaZ1pBAJUh2ARZrS7gcdAooY= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.50.2/go.mod h1:EOGgNrSPskIxY3+KgCl+yEggMjrGqrA2oL5va+/p2jM= -github.com/DataDog/datadog-go/v5 v5.1.1 h1:JLZ6s2K1pG2h9GkvEvMdEGqMDyVLEAccdX5TltWcLMU= -github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E= -github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7nM0E= -github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= -github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI/w7+I= -github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= -github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= -github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= -github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= -github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/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-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -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/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= -github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= -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/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.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= -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/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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= -github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -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/opencontainers/runtime-spec v1.1.0-rc.3 h1:l04uafi6kxByhbxev7OWiuUv0LZxEsYUfDWZ6bztAuU= -github.com/opencontainers/runtime-spec v1.1.0-rc.3/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= -github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= -github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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/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/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= -github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= -github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= -github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.93.1-0.20240202170612-7abb9622312d h1:r2c6Fwvvb5tyAhvpFdeSL74TAfwSx6w6zrcIkoEFq0c= -go.opentelemetry.io/collector v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:rEqeAsOy8Mu6HA6oMjGk7NrTb7958XmShSaapxFEeTs= -go.opentelemetry.io/collector/component v0.93.1-0.20240202170612-7abb9622312d h1:bcfzj+VuZO3+MFhs/wbCDLa1Usbph/00aZ3ljtVs3PU= -go.opentelemetry.io/collector/component v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:jOHaBlhWt4aarDS6w9A9GcgGCxrtEg+8LnBK7Y/6zqo= -go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240202170612-7abb9622312d h1:bPyk4F0NyNPHqKFzfaGOVeK3tVaKTuWPgAZPwlJ3Z8Q= -go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:2XLhyR/GVpWeZ2K044vCmrvH/d4Ewt0aD/y46avZyMU= -go.opentelemetry.io/collector/confmap v0.93.1-0.20240202170612-7abb9622312d h1:mj65lrBNXdayVGeT0bD6elBgVC17Jr2bBKcxGG4YYGE= -go.opentelemetry.io/collector/confmap v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:XkIj2ynDmZk2hZLAvWuBWTbm5A8n6gDGX0sx2rNnD/w= -go.opentelemetry.io/collector/consumer v0.93.1-0.20240202170612-7abb9622312d h1:/14bZUww1EbjbNaIfdXESdb+SHpBknAYqR332DZGIaY= -go.opentelemetry.io/collector/consumer v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:RhC4X/bSMIENk68hzFS9i6I7DVsZSfF/S7JvfaqZkkI= -go.opentelemetry.io/collector/exporter v0.93.1-0.20240202170612-7abb9622312d h1:4gZCxA9PAeo9LfA7rjwjEdLqKOl2nfSjgjQKTXtb2Rc= -go.opentelemetry.io/collector/exporter v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:iqkIF8nB0FkKG2p0oIBLBwT8lQ/Ab4oZ3U9ca9tSoT8= -go.opentelemetry.io/collector/extension v0.93.1-0.20240202170612-7abb9622312d h1:2/BMG6/EsphU7YJdRfFXAl6R9SQl1iLN6pe4Ql27m7o= -go.opentelemetry.io/collector/extension v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:vT7HRXtE+5MLesDYDhIf/6cdkAaDCR3ikSlvH6PoA6A= -go.opentelemetry.io/collector/featuregate v1.0.2-0.20240202163303-26c157e3bffb h1:DQafqe/uHttedsNPrwD5jB+vyw+Gm2nR1VLt74aV9eg= -go.opentelemetry.io/collector/featuregate v1.0.2-0.20240202163303-26c157e3bffb/go.mod h1:QQXjP4etmJQhkQ20j4P/rapWuItYxoFozg/iIwuKnYg= -go.opentelemetry.io/collector/pdata v1.0.2-0.20240202163303-26c157e3bffb h1:UoRa8wN05GuqducCfH/uBwz7fO9KEeBO+nLHy51QgdE= -go.opentelemetry.io/collector/pdata v1.0.2-0.20240202163303-26c157e3bffb/go.mod h1:IDkDj+B4Fp4wWOclBELN97zcb98HugJ8Q2gA4ZFsN8Q= -go.opentelemetry.io/collector/processor v0.93.1-0.20240202170612-7abb9622312d h1:ILGYHz95LJqkr30QbR2cLecksOyXrR7qtXHIk7S/Cv0= -go.opentelemetry.io/collector/processor v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:8RhlEB6SZyCTd60aviHxmjbUT2EQ40yXOq6Bea9TOkU= -go.opentelemetry.io/collector/semconv v0.93.1-0.20240202170612-7abb9622312d h1:uYTJtEhjiUfHS/gNZqNvCX26vAJa8kLiOcUpmAvqnmw= -go.opentelemetry.io/collector/semconv v0.93.1-0.20240202170612-7abb9622312d/go.mod h1:gZ0uzkXsN+J5NpiRcdp9xOhNGQDDui8Y62p15sKrlzo= -go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= -go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel/exporters/prometheus v0.45.0 h1:BeIK2KGho0oCWa7LxEGSqfDZbs7Fpv/Viz+FS4P8CXE= -go.opentelemetry.io/otel/exporters/prometheus v0.45.0/go.mod h1:UVJZPLnfDSvHj+eJuZE+E1GjIBD267mEMfAAHJdghWg= -go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= -go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= -go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= -go.opentelemetry.io/otel/sdk/metric v1.22.0 h1:ARrRetm1HCVxq0cbnaZQlfwODYJHo3gFL8Z3tSmHBcI= -go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/69/kULDcp4gr0oLQQ= -go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= -go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -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.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -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/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -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.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/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.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -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/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= -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/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.25.5 h1:SQomYHvv+aO43qdu3QKRf9YuI0oI8w3RrOQ1qPbAUGY= diff --git a/processor/datadogprocessor/internal/metadata/generated_status.go b/processor/datadogprocessor/internal/metadata/generated_status.go deleted file mode 100644 index 8fa9cfd3f68b..000000000000 --- a/processor/datadogprocessor/internal/metadata/generated_status.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" -) - -const ( - Type = "datadog" - TracesStability = component.StabilityLevelDeprecated -) - -func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("otelcol/datadog") -} - -func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("otelcol/datadog") -} diff --git a/processor/datadogprocessor/metadata.yaml b/processor/datadogprocessor/metadata.yaml deleted file mode 100644 index df0115857325..000000000000 --- a/processor/datadogprocessor/metadata.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: datadog - -status: - class: processor - stability: - deprecated: [traces] - distributions: [contrib] - codeowners: - active: [mx-psi, dineshg13] - emeritus: [gbbr] -tests: - config: - skip_lifecycle: true diff --git a/processor/datadogprocessor/processor.go b/processor/datadogprocessor/processor.go deleted file mode 100644 index 47a29912f1af..000000000000 --- a/processor/datadogprocessor/processor.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - "fmt" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.opentelemetry.io/otel/metric/noop" - "go.uber.org/zap" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" -) - -type datadogProcessor struct { - logger *zap.Logger - nextConsumer consumer.Traces - cfg *Config - started bool - - // metricsExporter specifies the metrics exporter used to exporter APM Stats - // as metrics through - metricsExporter exporter.Metrics - - // agent specifies the agent used to ingest traces and output APM Stats. - // It is implemented by the traceagent structure; replaced in tests. - agent datadog.Ingester - - // translator specifies the translator used to transform APM Stats Payloads - // from the agent to OTLP Metrics. - translator *metrics.Translator - - // in specifies the channel through which the agent will output Stats Payloads - // resulting from ingested traces. - in chan *pb.StatsPayload - - // exit specifies the exit channel, which will be closed upon shutdown. - exit chan struct{} -} - -func newProcessor(ctx context.Context, set component.TelemetrySettings, config component.Config, nextConsumer consumer.Traces) (*datadogProcessor, error) { - cfg := config.(*Config) - in := make(chan *pb.StatsPayload, 100) - set.MeterProvider = noop.NewMeterProvider() // disable metrics for the processor - attributesTranslator, err := attributes.NewTranslator(set) - if err != nil { - return nil, err - } - trans, err := metrics.NewTranslator(set, attributesTranslator) - if err != nil { - return nil, err - } - set.Logger.Warn( - "The datadogprocessor has been deprecated in favor of the datadogconnector", - zap.String( - "documentation", - "https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/datadogprocessor/README.md#deprecated-in-favor-of-datadogconnector", - ), - ) - return &datadogProcessor{ - logger: set.Logger, - nextConsumer: nextConsumer, - agent: datadog.NewAgent(ctx, in), - translator: trans, - in: in, - cfg: cfg, - exit: make(chan struct{}), - }, nil -} - -// Start implements the component.Component interface. -func (p *datadogProcessor) Start(_ context.Context, host component.Host) error { - var datadogs []exporter.Metrics -loop: - for k, exp := range host.GetExporters()[component.DataTypeMetrics] { //nolint:staticcheck - mexp, ok := exp.(exporter.Metrics) - if !ok { - return fmt.Errorf("the exporter %q isn't a metrics exporter", k.String()) - } - switch p.cfg.MetricsExporter { - case k: - // we found exactly the configured metrics exporter - p.metricsExporter = mexp - break loop - case datadogComponent: - // we are looking for the default "datadog" component - if k.Type() == datadogComponent.Type() { - // and k has the type, but not the name, so it's not an exact match. Store - // it for later; if we discover that k was the only Datadog component, we will - // will conclude that it is safe to use. Otherwise, we will fail and force the - // user to choose. - datadogs = append(datadogs, mexp) - } - } - } - if p.metricsExporter == nil { - // the exact component was not found - switch len(datadogs) { - case 0: - // no valid defaults to fall back to - return fmt.Errorf("failed to find metrics exporter %q; please specify a valid processor::datadog::metrics_exporter", p.cfg.MetricsExporter) - case 1: - // exactly one valid default to fall back to; use it - p.metricsExporter = datadogs[0] - default: - // too many defaults to fall back to; ambiguous situation; force the user to choose: - return fmt.Errorf("too many exporters of type %q; please choose one using processor::datadog::metrics_exporter", p.cfg.MetricsExporter) - } - } - p.started = true - p.agent.Start() - go p.run() - p.logger.Debug("Started datadogprocessor", zap.Stringer("metrics_exporter", p.cfg.MetricsExporter)) - return nil -} - -// Shutdown implements the component.Component interface. -func (p *datadogProcessor) Shutdown(context.Context) error { - if !p.started { - return nil - } - p.started = false - p.agent.Stop() - p.exit <- struct{}{} // signal exit - <-p.exit // wait for close - return nil -} - -// Capabilities implements the consumer interface. -func (p *datadogProcessor) Capabilities() consumer.Capabilities { - // A resource attribute is added to traces to specify that stats have already - // been computed for them; thus, we end up mutating the data: - return consumer.Capabilities{MutatesData: true} -} - -// ConsumeTraces implements consumer.Traces. -func (p *datadogProcessor) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error { - p.logger.Debug("Received traces.", zap.Int("spans", traces.SpanCount())) - p.agent.Ingest(ctx, traces) - return p.nextConsumer.ConsumeTraces(ctx, traces) -} - -// run awaits incoming stats resulting from the agent's ingestion, converts them -// to metrics and flushes them using the configured metrics exporter. -func (p *datadogProcessor) run() { - defer close(p.exit) - for { - select { - case stats := <-p.in: - if len(stats.Stats) == 0 { - continue - } - mx := p.translator.StatsPayloadToMetrics(stats) - ctx := context.TODO() - p.logger.Debug("Exporting APM Stats metrics.", zap.Int("count", mx.MetricCount())) - if err := p.metricsExporter.ConsumeMetrics(ctx, mx); err != nil { - p.logger.Error("Error exporting metrics.", zap.Error(err)) - } - case <-p.exit: - return - } - } -} diff --git a/processor/datadogprocessor/processor_test.go b/processor/datadogprocessor/processor_test.go deleted file mode 100644 index 789a0122f640..000000000000 --- a/processor/datadogprocessor/processor_test.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package datadogprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor" - -import ( - "context" - "strings" - "sync" - "testing" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/sketches-go/ddsketch" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/pdata/ptrace" - "google.golang.org/protobuf/proto" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog" -) - -func TestProcessorStart(t *testing.T) { - ctx := context.Background() - - t.Run("fail", func(t *testing.T) { - p, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - require.True(t, p.Capabilities().MutatesData) - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - }), - }) - require.ErrorContains(t, err, `failed to find metrics exporter "datadog"`) - }) - - t.Run("fail/2", func(t *testing.T) { - p, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/1": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.ErrorContains(t, err, `too many exporters of type "datadog"`) - }) - - t.Run("succeed/0", func(t *testing.T) { - p, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) - - t.Run("succeed/1", func(t *testing.T) { - p, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), createDefaultConfig(), &mockTracesConsumer{}) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) - - t.Run("succeed/2", func(t *testing.T) { - lp, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), &Config{MetricsExporter: component.NewIDWithName("datadog", "2")}, &mockTracesConsumer{}) - require.NoError(t, err) - defer lp.Shutdown(ctx) //nolint:errcheck - err = lp.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog/1": &mockMetricsExporter{}, - "datadog/2": &mockMetricsExporter{}, - }), - }) - require.NoError(t, err) - }) -} - -func TestProcessorIngest(t *testing.T) { - var mockConsumer mockTracesConsumer - ctx := context.Background() - p, err := newProcessor(ctx, componenttest.NewNopTelemetrySettings(), createDefaultConfig(), &mockConsumer) - require.NoError(t, err) - out := make(chan *pb.StatsPayload, 1) - ing := &mockIngester{Out: out} - p.agent = ing - p.in = out - mexporter := &mockMetricsExporter{} - err = p.Start(ctx, &mockHost{ - Exporters: exporters(map[string]exporter.Metrics{ - "test-exporter": &mockMetricsExporter{}, - "datadog": mexporter, - }), - }) - require.NoError(t, err) - defer p.Shutdown(ctx) //nolint:errcheck - tracesin := ptrace.NewTraces() - err = p.ConsumeTraces(ctx, tracesin) - require.NoError(t, err) - require.Equal(t, ing.ingested, tracesin) // ingester has ingested the consumed traces - require.Equal(t, mockConsumer.In()[0], tracesin) // the consumed traces are sent to the next consumer - timeout := time.After(time.Second) -loop: - for { - select { - case <-timeout: - t.Fatal("metrics exporter should have received metrics") - default: - if len(mexporter.In()) > 0 { - break loop // the exporter has consumed the generated metrics - } - time.Sleep(5 * time.Millisecond) - } - } -} - -func exporters(names map[string]exporter.Metrics) map[component.DataType]map[component.ID]component.Component { - out := map[component.DataType]map[component.ID]component.Component{ - component.DataTypeTraces: { - component.NewID("trace-exporter-a"): &mockTracesExporter{}, - component.NewID("trace-exporter-b"): &mockTracesExporter{}, - }, - } - exps := make(map[component.ID]component.Component) - for name, exp := range names { - if strings.Contains(name, "/") { - p := strings.Split(name, "/") - exps[component.NewIDWithName(component.Type(p[0]), p[1])] = exp - } else { - exps[component.NewID(component.Type(name))] = exp - } - } - out[component.DataTypeMetrics] = exps - return out -} - -var _ consumer.Traces = (*mockTracesConsumer)(nil) - -// mockTracesConsumer implements consumer.Traces. -type mockTracesConsumer struct { - mu sync.RWMutex - in []ptrace.Traces -} - -func (m *mockTracesConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: true} -} - -func (m *mockTracesConsumer) ConsumeTraces(_ context.Context, td ptrace.Traces) error { - m.mu.Lock() - m.in = append(m.in, td) - m.mu.Unlock() - return nil -} - -func (m *mockTracesConsumer) In() []ptrace.Traces { - m.mu.RLock() - defer m.mu.RUnlock() - return m.in -} - -var _ consumer.Metrics = (*mockMetricsConsumer)(nil) - -// mockMetricsConsumer implements consumer.Traces. -type mockMetricsConsumer struct { - mu sync.RWMutex - in []pmetric.Metrics -} - -func (m *mockMetricsConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: true} -} - -func (m *mockMetricsConsumer) ConsumeMetrics(_ context.Context, td pmetric.Metrics) error { - m.mu.Lock() - m.in = append(m.in, td) - m.mu.Unlock() - return nil -} - -func (m *mockMetricsConsumer) In() []pmetric.Metrics { - m.mu.RLock() - defer m.mu.RUnlock() - return m.in -} - -var _ component.Host = (*mockHost)(nil) - -// mockHost implements component.Host. -type mockHost struct { - Exporters map[component.DataType]map[component.ID]component.Component -} - -func (m *mockHost) ReportFatalError(_ error) {} - -func (m *mockHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { - return nil -} - -func (m *mockHost) GetExtensions() map[component.ID]extension.Extension { - return nil -} - -func (m *mockHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return m.Exporters -} - -var _ component.Component = (*mockComponent)(nil) - -// mockComponent implements component.Component. -type mockComponent struct{} - -func (m *mockComponent) Start(_ context.Context, _ component.Host) error { - return nil -} - -func (m *mockComponent) Shutdown(_ context.Context) error { - return nil -} - -var _ exporter.Metrics = (*mockMetricsExporter)(nil) - -// mockMetricsExporter implements exporter.Metrics. -type mockMetricsExporter struct { - mockComponent - mockMetricsConsumer -} - -var _ exporter.Traces = (*mockTracesExporter)(nil) - -// mockTracesExporter implements exporter.Traces. -type mockTracesExporter struct { - mockComponent - mockTracesConsumer -} - -var _ datadog.Ingester = (*mockIngester)(nil) - -// mockIngester implements ingester. -type mockIngester struct { - Out chan *pb.StatsPayload - start, stop bool - ingested ptrace.Traces -} - -// Start starts the ingester. -func (m *mockIngester) Start() { - m.start = true -} - -// Ingest ingests the set of traces. -func (m *mockIngester) Ingest(_ context.Context, traces ptrace.Traces) { - m.ingested = traces - m.Out <- &testStatsPayload -} - -// Stop stops the ingester. -func (m *mockIngester) Stop() { - m.stop = true -} - -// TODO(gbbr): this is copied from exporter/datadogexporter/internal/testutil. -// We should find a way to have a shared set of test utilities in either the processor -// or the exporter. -var testStatsPayload = pb.StatsPayload{ - Stats: []*pb.ClientStatsPayload{ - { - Hostname: "host", - Env: "prod", - Version: "v1.2", - Lang: "go", - TracerVersion: "v44", - RuntimeID: "123jkl", - Sequence: 2, - AgentAggregation: "blah", - Service: "mysql", - ContainerID: "abcdef123456", - Tags: []string{"a:b", "c:d"}, - Stats: []*pb.ClientStatsBucket{ - { - Start: 10, - Duration: 1, - Stats: []*pb.ClientGroupedStats{ - { - Service: "kafka", - Name: "queue.add", - Resource: "append", - HTTPStatusCode: 220, - Type: "queue", - Hits: 15, - Errors: 3, - Duration: 143, - OkSummary: testSketchBytes(1, 2, 3), - ErrorSummary: testSketchBytes(4, 5, 6), - TopLevelHits: 5, - }, - }, - }, - }, - }, - { - Hostname: "host2", - Env: "prod2", - Version: "v1.22", - Lang: "go2", - TracerVersion: "v442", - RuntimeID: "123jkl2", - Sequence: 22, - AgentAggregation: "blah2", - Service: "mysql2", - ContainerID: "abcdef1234562", - Tags: []string{"a:b2", "c:d2"}, - Stats: []*pb.ClientStatsBucket{ - { - Start: 102, - Duration: 12, - Stats: []*pb.ClientGroupedStats{ - { - Service: "kafka2", - Name: "queue.add2", - Resource: "append2", - HTTPStatusCode: 2202, - Type: "queue2", - Hits: 152, - Errors: 32, - Duration: 1432, - OkSummary: testSketchBytes(7, 8), - ErrorSummary: testSketchBytes(9, 10, 11), - TopLevelHits: 52, - }, - }, - }, - }, - }, - }, -} - -// The sketch's relative accuracy and maximum number of bins is identical -// to the one used in the trace-agent for consistency: -// https://github.com/DataDog/datadog-agent/blob/cbac965/pkg/trace/stats/statsraw.go#L18-L26 -const ( - sketchRelativeAccuracy = 0.01 - sketchMaxBins = 2048 -) - -// testSketchBytes returns the proto-encoded version of a DDSketch containing the -// points in nums. -func testSketchBytes(nums ...float64) []byte { - sketch, err := ddsketch.LogCollapsingLowestDenseDDSketch(sketchRelativeAccuracy, sketchMaxBins) - if err != nil { - // the only possible error is if the relative accuracy is < 0 or > 1; - // we know that's not the case because it's a constant defined as 0.01 - panic(err) - } - for _, num := range nums { - if err2 := sketch.Add(num); err2 != nil { - panic(err2) // invalid input - } - } - buf, err := proto.Marshal(sketch.ToProto()) - if err != nil { - // there should be no error under any circumstances here - panic(err) - } - return buf -} diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index 9cb33e5783bb..2f003b525c6a 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -76,7 +76,6 @@ components: processor: - attributes - cumulativetodelta - - datadog - deltatorate - experimental_metricsgeneration - filter diff --git a/versions.yaml b/versions.yaml index bf624c473305..777847f719da 100644 --- a/versions.yaml +++ b/versions.yaml @@ -144,7 +144,6 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/datadogprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor