Skip to content

Commit d8581a4

Browse files
authored
Merge pull request #780 from drewelliott/drew/sync-otlp-improvements
Add OTLP output for OpenTelemetry Protocol integration
2 parents 8f187af + 17ea355 commit d8581a4

File tree

9 files changed

+1936
-20
lines changed

9 files changed

+1936
-20
lines changed

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ require (
5555
github.com/spf13/viper v1.19.0
5656
github.com/stretchr/testify v1.11.1
5757
github.com/xdg/scram v1.0.5
58+
go.opentelemetry.io/proto/otlp v1.8.0
5859
go.starlark.net v0.0.0-20250906160240-bf296ed553ea
5960
golang.org/x/crypto v0.45.0
6061
golang.org/x/oauth2 v0.32.0
@@ -124,6 +125,7 @@ require (
124125
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
125126
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
126127
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
128+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
127129
github.com/hairyhenderson/go-fsimpl v0.0.0-20220529183339-9deae3e35047 // indirect
128130
github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce // indirect
129131
github.com/hashicorp/go-msgpack v1.1.5 // indirect
@@ -181,8 +183,8 @@ require (
181183
go.yaml.in/yaml/v2 v2.4.2 // indirect
182184
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
183185
golang.org/x/term v0.37.0 // indirect
184-
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect
185-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b // indirect
186+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
187+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
186188
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
187189
gopkg.in/inf.v0 v0.9.1 // indirect
188190
k8s.io/klog/v2 v2.130.1 // indirect

go.sum

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,9 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa
616616
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
617617
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
618618
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
619-
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
620619
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
621-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
622-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
620+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
621+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
623622
github.com/guptarohit/asciigraph v0.7.3 h1:p05XDDn7cBTWiBqWb30mrwxd6oU0claAjqeytllnsPY=
624623
github.com/guptarohit/asciigraph v0.7.3/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag=
625624
github.com/hairyhenderson/go-fsimpl v0.0.0-20220529183339-9deae3e35047 h1:nSSfN9G8O8XXDqB3aDEHJ8K+0llYYToNlTcWOe1Pti8=
@@ -1181,8 +1180,8 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVW
11811180
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
11821181
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
11831182
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
1184-
go.opentelemetry.io/proto/otlp v1.6.0 h1:jQjP+AQyTf+Fe7OKj/MfkDrmK4MNVtw2NpXsf9fefDI=
1185-
go.opentelemetry.io/proto/otlp v1.6.0/go.mod h1:cicgGehlFuNdgZkcALOCh3VE6K/u2tAjzlRhDwmVpZc=
1183+
go.opentelemetry.io/proto/otlp v1.8.0 h1:fRAZQDcAFHySxpJ1TwlA1cJ4tvcrw7nXl9xWWC8N5CE=
1184+
go.opentelemetry.io/proto/otlp v1.8.0/go.mod h1:tIeYOeNBU4cvmPqpaji1P+KbB4Oloai8wN4rWzRrFF0=
11861185
go.starlark.net v0.0.0-20250906160240-bf296ed553ea h1:Rq4H4YdaOlmkqVGG+COlYFyrG/FwfB8tQa5i6mtcSe4=
11871186
go.starlark.net v0.0.0-20250906160240-bf296ed553ea/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8=
11881187
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1743,10 +1742,10 @@ google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2I
17431742
google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
17441743
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78=
17451744
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk=
1746-
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b h1:ULiyYQ0FdsJhwwZUwbaXpZF5yUE3h+RA+gxvBu37ucc=
1747-
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:oDOGiMSXHL4sDTJvFvIB9nRQCGdLP1o/iVaqQK8zB+M=
1748-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b h1:zPKJod4w6F1+nRGDI9ubnXYhU9NSWoFAijkHkUXeTK8=
1749-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
1745+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
1746+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE=
1747+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE=
1748+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
17501749
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
17511750
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
17521751
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// © 2022 Nokia.
22
//
3-
// This code is a Contribution to the gNMIc project (Work) made under the Google Software Grant and Corporate Contributor License Agreement (CLA) and governed by the Apache License 2.0.
4-
// No other rights or licenses in or to any of Nokias intellectual property are granted for any other purpose.
5-
// This code is provided on an as is basis without any warranties of any kind.
3+
// This code is a Contribution to the gNMIc project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0.
4+
// No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose.
5+
// This code is provided on an "as is" basis without any warranties of any kind.
66
//
77
// SPDX-License-Identifier: Apache-2.0
88

pkg/outputs/all/all.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
// © 2022 Nokia.
22
//
3-
// This code is a Contribution to the gNMIc project (“Work”) made under the Google Software Grant and Corporate Contributor License Agreement (“CLA”) and governed by the Apache License 2.0.
4-
// No other rights or licenses in or to any of Nokia’s intellectual property are granted for any other purpose.
5-
// This code is provided on an “as is” basis without any warranties of any kind.
3+
// This code is a Contribution to the gNMIc project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0.
4+
// No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose.
5+
// This code is provided on an "as is" basis without any warranties of any kind.
6+
//
7+
// SPDX-License-Identifier: Apache-2.0
8+
9+
// © 2025 NVIDIA Corporation
10+
//
11+
// This code is a Contribution to the gNMIc project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0.
12+
// No other rights or licenses in or to any of NVIDIA's intellectual property are granted for any other purpose.
13+
// This code is provided on an "as is" basis without any warranties of any kind.
614
//
715
// SPDX-License-Identifier: Apache-2.0
816

@@ -16,6 +24,7 @@ import (
1624
_ "github.com/openconfig/gnmic/pkg/outputs/kafka_output"
1725
_ "github.com/openconfig/gnmic/pkg/outputs/nats_outputs/jetstream"
1826
_ "github.com/openconfig/gnmic/pkg/outputs/nats_outputs/nats"
27+
_ "github.com/openconfig/gnmic/pkg/outputs/otlp_output"
1928
_ "github.com/openconfig/gnmic/pkg/outputs/prometheus_output/prometheus_output"
2029
_ "github.com/openconfig/gnmic/pkg/outputs/prometheus_output/prometheus_write_output"
2130
_ "github.com/openconfig/gnmic/pkg/outputs/snmp_output"

0 commit comments

Comments
 (0)