Skip to content

Commit

Permalink
[processor/datadog] Use generated headers (#21055)
Browse files Browse the repository at this point in the history
* Use generated headers

* fix lint
  • Loading branch information
TylerHelmuth authored May 4, 2023
1 parent 51c9452 commit dda09dc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
17 changes: 9 additions & 8 deletions processor/datadogprocessor/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Datadog Processor
<!-- status autogenerated section -->
| Status | |
| ------------------------ |-----------|
| Stability | [beta] |
| Supported pipeline types | traces |
| Distributions | [contrib] |

| Status | |
|--------------------------|---------------|
| Stability | [beta] |
| Supported pipeline types | traces |
| Distributions | [contrib] |
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

## Description

Expand Down Expand Up @@ -95,6 +99,3 @@ The default value for `metrics_exporter` is `datadog`. If your Datadog Exporter
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.

[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
2 changes: 2 additions & 0 deletions processor/datadogprocessor/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//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
Expand Down
6 changes: 4 additions & 2 deletions processor/datadogprocessor/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ import (
"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 spanmetrics processor.
func NewFactory() processor.Factory {
return processor.NewFactory(
"datadog",
metadata.Type,
createDefaultConfig,
processor.WithTraces(createTracesProcessor, component.StabilityLevelBeta),
processor.WithTraces(createTracesProcessor, metadata.Stability),
)
}

Expand Down
12 changes: 12 additions & 0 deletions processor/datadogprocessor/internal/metadata/generated_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions processor/datadogprocessor/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: datadog

status:
class: processor
stability: beta
pipelines: [traces]
distributions: [contrib]

0 comments on commit dda09dc

Please sign in to comment.