Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(otelcol/exporter/datadog) Add Datadog exporter wrapper #739

Merged
merged 22 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d56f896
Rework defaults, add docs, and update changelog/tests
polyrain Jul 21, 2024
21b54f6
Address PR feedback
polyrain Aug 16, 2024
20eccc9
Rebase on main, update changelog + deps
polyrain Aug 16, 2024
3aa9ad8
Add config converter
polyrain Aug 16, 2024
5603cdb
Update docs
polyrain Aug 16, 2024
13a2a02
Apply suggestions from code review
polyrain Aug 19, 2024
a696579
Apply suggestions from code review
polyrain Aug 19, 2024
7d9830f
Change client type to our own custom one and add tests its all good
polyrain Aug 22, 2024
e607e8a
Merge branch 'main' into feat/datadog-exporter
polyrain Aug 22, 2024
fd8c02a
Apply suggestions from code review
polyrain Aug 23, 2024
eaae882
PR feedback
polyrain Aug 23, 2024
2523062
Add comments around defaults/config
polyrain Aug 23, 2024
15eec99
Add community flag to get tests working in CI and attempt to fix the …
polyrain Aug 23, 2024
9ecdead
Add build tags to prevent building on freebsd
polyrain Aug 23, 2024
6cd30a6
Add datadog exporter to compat doc since doc makefile isnt working
polyrain Aug 23, 2024
874f881
Merge branch 'main' into feat/datadog-exporter
clayton-cornell Aug 26, 2024
d86bb96
Apply suggestions from code review
polyrain Aug 26, 2024
61d9db7
Add build tags to stop otelconvert failing on freebsd, as per slack
polyrain Aug 26, 2024
77658ee
Add a stub so it builds on FreeBSD still
polyrain Aug 27, 2024
cd27534
adding missing freebsd tag
wildum Aug 27, 2024
0d588a4
fix stub component
wildum Aug 27, 2024
015e8b8
fix doc link
wildum Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ internal API changes are not present.

Main (unreleased)
-----------------
### Features

- Added Datadog Exporter community component, enabling exporting of otel-formatted Metrics and traces to Datadog. (@polyrain)
### Enhancements

- Clustering peer resolution through `--cluster.join-addresses` flag has been
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/writing-component-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This guide outlines best practices for writing reference documentation for Alloy
components.

Component reference documentation is stored in [docs/sources/alloy/reference/components][docs source],
Component reference documentation is stored in [docs/sources/reference/components][docs source],
and published to [Grafana's documentation website][hosted docs].

Documentation for a component should follow best practices as much as possible
Expand Down
1 change: 1 addition & 0 deletions docs/sources/reference/compatibility/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ The following components, grouped by namespace, _export_ OpenTelemetry `otelcol.
- [otelcol.connector.spanlogs](../components/otelcol/otelcol.connector.spanlogs)
- [otelcol.connector.spanmetrics](../components/otelcol/otelcol.connector.spanmetrics)
- [otelcol.exporter.awss3](../components/otelcol/otelcol.exporter.awss3)
- [otelcol.exporter.datadog](../components/otelcol/otelcol.exporter.datadog)
- [otelcol.exporter.debug](../components/otelcol/otelcol.exporter.debug)
- [otelcol.exporter.kafka](../components/otelcol/otelcol.exporter.kafka)
- [otelcol.exporter.loadbalancing](../components/otelcol/otelcol.exporter.loadbalancing)
Expand Down

Large diffs are not rendered by default.

102 changes: 92 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.105.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.105.0
Expand Down Expand Up @@ -284,14 +285,79 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/ClickHouse/clickhouse-go v1.5.4 // indirect
github.com/Code-Hex/go-generics-cache v1.5.1 // indirect
github.com/DataDog/agent-payload/v5 v5.0.115 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.54.0-rc.4 // indirect
github.com/DataDog/datadog-api-client-go/v2 v2.25.0 // indirect
github.com/DataDog/sketches-go v1.4.4 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/DataDog/agent-payload/v5 v5.0.123 // indirect
github.com/DataDog/datadog-agent/comp/core/config v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/flare/builder v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/flare/types v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/log v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/secrets v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/core/telemetry v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/def v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/logs/agent/config v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/trace/compression/def v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/env v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/model v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/setup v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/utils v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/client v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/message v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/sources v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/status/health v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/telemetry v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.56.0-rc.1.0.20240711082232-dc70454ece9f // indirect
github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/executable v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/filesystem v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/fxutil v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/http v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/optional v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/statstracker v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/system v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/system/socket v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/winutil v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-agent/pkg/version v0.56.0-rc.1 // indirect
github.com/DataDog/datadog-api-client-go/v2 v2.27.0 // indirect
github.com/DataDog/datadog-go/v5 v5.5.0 // indirect
github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240419161837-f1b2f553edfe // indirect
github.com/DataDog/go-sqllexer v0.0.12 // indirect
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect
github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.17.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.17.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.17.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.17.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.17.0 // indirect
github.com/DataDog/sketches-go v1.4.6 // indirect
github.com/DataDog/viper v1.13.5 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.0 // indirect
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
Expand Down Expand Up @@ -340,16 +406,20 @@ require (
github.com/axiomhq/hyperloglog v0.0.0-20240124082744-24bca3a5b39b // indirect
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect
github.com/beevik/ntp v1.3.0 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/briandowns/spinner v1.23.0 // indirect
github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b // indirect
github.com/caarlos0/env/v9 v9.0.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/cilium/ebpf v0.12.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect
Expand Down Expand Up @@ -424,7 +494,7 @@ require (
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
Expand All @@ -434,6 +504,7 @@ require (
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/gomodule/redigo v1.8.9 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
Expand Down Expand Up @@ -477,6 +548,7 @@ require (
github.com/hashicorp/nomad/api v0.0.0-20240604134157-e73d8bb1140d // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 // indirect
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 // indirect
github.com/hetznercloud/hcloud-go/v2 v2.9.0 // indirect
github.com/hodgesds/perf-utils v0.7.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
Expand Down Expand Up @@ -510,6 +582,7 @@ require (
github.com/jpillora/backoff v1.0.0 // indirect
github.com/jsimonetti/rtnetlink v1.3.5 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/karrick/godirwalk v1.17.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/asmfmt v1.3.2 // indirect
Expand All @@ -519,7 +592,7 @@ require (
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect
github.com/krallistic/kazoo-go v0.0.0-20170526135507-a15279744f4e // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect
github.com/lightstep/go-expohisto v1.0.0 // indirect
github.com/linode/linodego v1.35.0 // indirect
github.com/lufia/iostat v1.2.1 // indirect
Expand Down Expand Up @@ -554,6 +627,7 @@ require (
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mostynb/go-grpc-compression v1.2.3 // indirect
Expand Down Expand Up @@ -592,10 +666,12 @@ require (
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/outcaste-io/ristretto v0.2.1 // indirect
github.com/ovh/go-ovh v1.5.1 // indirect
github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
Expand All @@ -615,12 +691,13 @@ require (
github.com/safchain/ethtool v0.3.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/samber/lo v1.38.1
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/shirou/gopsutil/v4 v4.24.6 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
Expand All @@ -634,7 +711,9 @@ require (
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/stormcat24/protodep v0.1.8 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
Expand Down Expand Up @@ -691,6 +770,8 @@ require (
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 // indirect
go.opentelemetry.io/otel/log v0.4.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.4.0 // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.18.2 // indirect
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/mod v0.18.0 // indirect
Expand All @@ -708,6 +789,7 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect
howett.net/plist v1.0.0 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b // indirect
Expand Down
Loading
Loading