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

OpenTelemetry Output Plugin #9109

Closed
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
bd54546
initial checkin of otlp output plugin
Apr 8, 2021
7dc413a
update to use attributes from config
Apr 9, 2021
bba15cf
removing prom sidecar dependency
Apr 9, 2021
496e080
add tests around configuration
Apr 9, 2021
0eff888
adding write test
Apr 9, 2021
c67d18f
update dependencies list
Apr 9, 2021
1e6b5e4
adding more tests
Apr 9, 2021
66f3e31
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 9, 2021
2c0d9ec
mod tidy
Apr 9, 2021
a8bf7c3
lint fixes
Apr 9, 2021
b0e7b92
fix list of dependencies
Apr 9, 2021
6331204
remove use of log
Apr 9, 2021
dd9c8dc
fix test
Apr 9, 2021
90901ec
adding client tests
Apr 12, 2021
81772d7
minor cleanup
Apr 16, 2021
a44744f
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 16, 2021
1aa9a00
mod tidy
Apr 16, 2021
464c2d4
fix example
Apr 16, 2021
7648ce6
update default endpoint
Apr 16, 2021
357d793
cleaning up tests
Apr 17, 2021
b878339
cleaning up unused vars and comments
Apr 19, 2021
4eac8c2
Apply suggestions from code review
Apr 19, 2021
d211d7b
rename otlp to opentelemetry
Apr 19, 2021
6a44fb2
remove Namespace
Apr 19, 2021
020c476
remove string case
Apr 19, 2021
8e9b32d
remove newOTLP
Apr 19, 2021
63694cc
rename otlp.go -> opentelemetry.go
Apr 19, 2021
90b3ce3
dont export ping/close/store
Apr 19, 2021
60c8298
remove grpcMetadata function
Apr 19, 2021
0a243cc
dont export client, update DefaultServiceConfig link
Apr 19, 2021
2cb4d75
rename selftest, simplify client code, use telegraf loggeradd root ce…
Apr 20, 2021
6343b44
update readme
Apr 20, 2021
aaf51f4
tidy
Apr 20, 2021
859843d
rename getConnection
Apr 20, 2021
3133981
use tlsConfig
Apr 20, 2021
0322683
tidy
Apr 20, 2021
e1ceaec
update based on feedback
Apr 20, 2021
193f027
update dependencies
Apr 21, 2021
40a3ad5
remove error truncation
Apr 21, 2021
c0922fe
cleanup
Apr 21, 2021
de800ef
use config.Duration
Apr 21, 2021
1f386aa
remove sorted
Apr 21, 2021
3e6777e
use nettest and add listener to each test
Apr 21, 2021
4b9b63d
rename tss
Apr 21, 2021
a06654d
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 21, 2021
137514d
move code into transform.go
Apr 21, 2021
2c4e6b9
dont ignore error
Apr 21, 2021
8534256
Apply suggestions from code review
Apr 23, 2021
4f396c9
improve README
Apr 23, 2021
d6df1ba
review feedback
Apr 23, 2021
f07e4b9
review feedback
Apr 23, 2021
52b685b
cleanup go.mod
Apr 23, 2021
3ac6824
tidy
Apr 23, 2021
6a585e1
fix dependencies list
Apr 23, 2021
86704fb
fix test
Apr 23, 2021
b3d87fe
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 27, 2021
84adf2b
tidy
Apr 27, 2021
aed6860
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 29, 2021
8fedd60
remove separate ping function
Apr 29, 2021
37f85cd
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
Apr 30, 2021
b447006
update otlp import
Apr 30, 2021
8aee642
Merge remote-tracking branch 'upstream/master' into codeboten/otlp-ou…
May 4, 2021
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### New Outputs

- [otlp](/plugins/outputs/otlp/README.md) - Contributed by @codeboten
## v1.18.1 [2021-04-07]

#### Bugfixes
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ For documentation on the latest development code see the [documentation index][d
* [newrelic](./plugins/outputs/newrelic)
* [nsq](./plugins/outputs/nsq)
* [opentsdb](./plugins/outputs/opentsdb)
* [otlp](./plugins/outputs/otlp) (OpenTelemetry Protocol)
* [prometheus](./plugins/outputs/prometheus_client)
* [riemann](./plugins/outputs/riemann)
* [riemann_legacy](./plugins/outputs/riemann_legacy)
Expand Down
3 changes: 3 additions & 0 deletions docs/LICENSE_OF_DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ following works:
- github.com/fatih/color [MIT License](https://github.com/fatih/color/blob/master/LICENSE.md)
- github.com/form3tech-oss/jwt-go [MIT License](https://github.com/form3tech-oss/jwt-go/blob/master/LICENSE)
- github.com/ghodss/yaml [MIT License](https://github.com/ghodss/yaml/blob/master/LICENSE)
- github.com/go-kit/kit [MIT License](https://github.com/go-kit/kit/blob/master/LICENSE)
- github.com/go-logfmt/logfmt [MIT License](https://github.com/go-logfmt/logfmt/blob/master/LICENSE)
- github.com/go-logr/logr [Apache License 2.0](https://github.com/go-logr/logr/blob/master/LICENSE)
- github.com/go-ole/go-ole [MIT License](https://github.com/go-ole/go-ole/blob/master/LICENSE)
Expand Down Expand Up @@ -114,6 +115,7 @@ following works:
- github.com/james4k/rcon [MIT License](https://github.com/james4k/rcon/blob/master/LICENSE)
- github.com/jcmturner/gofork [BSD 3-Clause "New" or "Revised" License](https://github.com/jcmturner/gofork/blob/master/LICENSE)
- github.com/jmespath/go-jmespath [Apache License 2.0](https://github.com/jmespath/go-jmespath/blob/master/LICENSE)
- github.com/josharian/intern [MIT License](https://github.com/josharian/intern/blob/master/license.md)
- github.com/jpillora/backoff [MIT License](https://github.com/jpillora/backoff/blob/master/LICENSE)
- github.com/json-iterator/go [MIT License](https://github.com/json-iterator/go/blob/master/LICENSE)
- github.com/kardianos/service [zlib License](https://github.com/kardianos/service/blob/master/LICENSE)
Expand Down Expand Up @@ -187,6 +189,7 @@ following works:
- github.com/xdg/stringprep [Apache License 2.0](https://github.com/xdg-go/stringprep/blob/master/LICENSE)
- github.com/yuin/gopher-lua [MIT License](https://github.com/yuin/gopher-lua/blob/master/LICENSE)
- go.opencensus.io [Apache License 2.0](https://github.com/census-instrumentation/opencensus-go/blob/master/LICENSE)
- go.opentelemetry.io/proto/otlp [Apache License 2.0](https://pkg.go.dev/go.opentelemetry.io/proto/otlp?tab=licenses)
- go.starlark.net [BSD 3-Clause "New" or "Revised" License](https://github.com/google/starlark-go/blob/master/LICENSE)
- go.uber.org/atomic [MIT License](https://pkg.go.dev/go.uber.org/atomic?tab=licenses)
- go.uber.org/multierr [MIT License](https://pkg.go.dev/go.uber.org/multierr?tab=licenses)
Expand Down
17 changes: 17 additions & 0 deletions etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,23 @@
# separator = "_"


# # Configuration for OpenTelemetry endpoint to send metrics to
# [[outputs.otlp]]
# ## OpenTelemetry endpoint
# endpoint = "localhost:4317"

# ## Timeout used when sending data over grpc
# timeout = 10s

# # Additional resource attributes
# [outputs.otlp.attributes]
# "service.name" = "demo"

# # Additional grpc metadata
# [outputs.otlp.headers]
# key1 = "value1"


# # Configuration for the Prometheus client to spawn
# [[outputs.prometheus_client]]
# ## Address to listen on
Expand Down
51 changes: 27 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/influxdata/telegraf
go 1.16

require (
cloud.google.com/go v0.56.0
cloud.google.com/go/bigquery v1.4.0
cloud.google.com/go/pubsub v1.2.0
cloud.google.com/go v0.72.0
cloud.google.com/go/bigquery v1.8.0
cloud.google.com/go/pubsub v1.3.1
code.cloudfoundry.org/clock v1.0.0 // indirect
collectd.org v0.5.0
github.com/Azure/azure-event-hubs-go/v3 v3.2.0
Expand All @@ -18,15 +18,15 @@ require (
github.com/Shopify/sarama v1.27.2
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect
github.com/aerospike/aerospike-client-go v1.27.0
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d
github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1004
github.com/amir/raidman v0.0.0-20170415203553-1ccc43bfb9c9
github.com/antchfx/xmlquery v1.3.5
github.com/antchfx/xpath v1.1.11
github.com/apache/thrift v0.13.0
github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3 // indirect
github.com/aristanetworks/goarista v0.0.0-20190325233358-a123909ec740
github.com/aws/aws-sdk-go v1.34.34
github.com/aws/aws-sdk-go v1.36.15
github.com/aws/aws-sdk-go-v2 v1.1.0
github.com/aws/aws-sdk-go-v2/config v1.1.0
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.1
Expand All @@ -46,31 +46,31 @@ require (
github.com/denisenkom/go-mssqldb v0.9.0
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1
github.com/dimchansky/utfbom v1.1.1
github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible
github.com/docker/docker v20.10.1+incompatible
github.com/docker/libnetwork v0.8.0-dev.2.0.20181012153825-d7b61745d166
github.com/eclipse/paho.mqtt.golang v1.3.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-kit/kit v0.10.0
github.com/go-logfmt/logfmt v0.5.0
github.com/go-ping/ping v0.0.0-20210201095549-52eed920f98c
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-sql-driver/mysql v1.5.0
github.com/goburrow/modbus v0.1.0
github.com/goburrow/serial v0.1.0 // indirect
github.com/gobwas/glob v0.2.3
github.com/gofrs/uuid v2.1.0+incompatible
github.com/gogo/protobuf v1.3.1
github.com/gofrs/uuid v3.3.0+incompatible
github.com/gogo/protobuf v1.3.2
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec
github.com/golang/protobuf v1.5.1
github.com/golang/snappy v0.0.1
github.com/golang/snappy v0.0.2
github.com/google/go-cmp v0.5.5
github.com/google/go-github/v32 v32.1.0
github.com/gopcua/opcua v0.1.13
github.com/gorilla/mux v1.7.3
github.com/gosnmp/gosnmp v1.31.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/harlow/kinesis-consumer v0.3.1-0.20181230152818-2f58b136fee0
github.com/hashicorp/consul/api v1.6.0
github.com/hashicorp/consul/api v1.8.1
github.com/hashicorp/go-msgpack v0.5.5 // indirect
github.com/influxdata/go-syslog/v2 v2.0.1
github.com/influxdata/tail v1.0.1-0.20200707181643-03a791b270e4
Expand All @@ -86,7 +86,7 @@ require (
github.com/lib/pq v1.3.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/mdlayher/apcupsd v0.0.0-20200608131503-2bf01da7bf1b
github.com/miekg/dns v1.1.31
github.com/miekg/dns v1.1.35
github.com/multiplay/go-ts3 v1.0.0
github.com/naoina/go-stringutil v0.1.0 // indirect
github.com/nats-io/nats-server/v2 v2.1.4
Expand All @@ -96,13 +96,14 @@ require (
github.com/openconfig/gnmi v0.0.0-20180912164834-33a1865c3029
github.com/openzipkin/zipkin-go-opentracing v0.3.4
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.13.0
github.com/prometheus/procfs v0.1.3
github.com/prometheus/prometheus v1.8.2-0.20200911110723-e83ef207b6c2
github.com/prometheus/common v0.15.0
github.com/prometheus/procfs v0.2.0
github.com/prometheus/prometheus v1.8.2-0.20210119214810-e4487274853c
github.com/riemann/riemann-go-client v0.5.0
github.com/safchain/ethtool v0.0.0-20200218184317-f459e2d13664
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sensu/sensu-go/api/core/v2 v2.6.0
github.com/shirou/gopsutil v3.20.11+incompatible
github.com/shopspring/decimal v0.0.0-20200105231215-408a2507e114 // indirect
Expand All @@ -124,24 +125,26 @@ require (
github.com/wvanbergen/kazoo-go v0.0.0-20180202103751-f72d8611297a // indirect
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
github.com/yuin/gopher-lua v0.0.0-20180630135845-46796da1b0b4 // indirect
go.opentelemetry.io/proto/otlp v0.7.0
go.starlark.net v0.0.0-20210406145628-7a1108eaa012
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
golang.org/x/net v0.0.0-20201224014010-6772e930b67b
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
golang.org/x/sys v0.0.0-20201223074533-0d417f636930
golang.org/x/text v0.3.4
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20200205215550-e35592f146e4
google.golang.org/api v0.29.0
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70
google.golang.org/grpc v1.33.1
google.golang.org/api v0.36.0
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e
google.golang.org/grpc v1.36.0
google.golang.org/protobuf v1.26.0
gopkg.in/djherbis/times.v1 v1.2.0
gopkg.in/fatih/pool.v2 v2.0.0 // indirect
gopkg.in/gorethink/gorethink.v3 v3.0.5
gopkg.in/ldap.v3 v3.1.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/olivere/elastic.v5 v5.0.70
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v2 v2.4.0
gotest.tools v2.2.0+incompatible
k8s.io/api v0.20.4
k8s.io/apimachinery v0.20.4
Expand Down
Loading