Skip to content

Commit

Permalink
[cherry-pick] update telemetry exporter to v0.1.1 (#6204)
Browse files Browse the repository at this point in the history
  • Loading branch information
nginx-bot authored Aug 15, 2024
1 parent 2437d58 commit c864bc2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/nginxinc/nginx-plus-go-client v1.2.2
github.com/nginxinc/nginx-prometheus-exporter v1.3.0
github.com/nginxinc/nginx-service-mesh v1.7.0
github.com/nginxinc/telemetry-exporter v0.1.0
github.com/nginxinc/telemetry-exporter v0.1.1
github.com/prometheus/client_golang v1.19.1
github.com/spiffe/go-spiffe/v2 v2.3.0
github.com/stretchr/testify v1.9.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
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/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
Expand Down Expand Up @@ -194,14 +194,14 @@ github.com/nginxinc/nginx-prometheus-exporter v1.3.0 h1:1JtdxsZH0Uwhu1nL/j/QyOXy
github.com/nginxinc/nginx-prometheus-exporter v1.3.0/go.mod h1:hXoH+X6aIKSyQuO6QTIiPKH3eZyxqy/wW8GYiE3dflU=
github.com/nginxinc/nginx-service-mesh v1.7.0 h1:oxKr+Jdbxkos10VTy5xF2UHCcmfIhqWNlsOK/zPnZDM=
github.com/nginxinc/nginx-service-mesh v1.7.0/go.mod h1:8tREM3kSEUGyk8JT8hdCf/9ol2kEo7hLR8b+m5Yd8Fs=
github.com/nginxinc/telemetry-exporter v0.1.0 h1:wF71jYx4PQpHv5ML0Ba4qN/o37ZNLfiHENXMZsVO7EQ=
github.com/nginxinc/telemetry-exporter v0.1.0/go.mod h1:Hcb/Fz6TvTZLxF/p9Fa1YDmdScnZ9Azdl8isO4Hd9v4=
github.com/nginxinc/telemetry-exporter v0.1.1 h1:6wRjxra+6997GtVrkRjq5CqJyreQTbwdtmRGyqw7VyY=
github.com/nginxinc/telemetry-exporter v0.1.1/go.mod h1:aNsh1EGGlozhvc3e8lnBfz1V+kfsknHZaUNscHV+yLo=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw=
github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
Expand Down
5 changes: 4 additions & 1 deletion internal/telemetry/data.avdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@namespace("ingress.nginx.com") protocol NICProductTelemetry {
/** Data is the product telemetry data of NGINX Ingress Controller. */
/** Data is the telemetry data for the product. */
@df_datatype("nic-product-telemetry") record Data {
/** The field that identifies what type of data this is. */
string dataType;
Expand Down Expand Up @@ -115,5 +115,8 @@ It is the UID of the `kube-system` Namespace. */
/** InstallationFlags is the list of command line arguments configured for NGINX Ingress Controller */
union {null, array<string>} InstallationFlags = null;

/** BuildOS represents the base operating system image */
string? BuildOS = null;

}
}
1 change: 0 additions & 1 deletion internal/telemetry/data_attributes_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
func (d *Data) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue
attrs = append(attrs, attribute.String("dataType", "nic-product-telemetry"))

attrs = append(attrs, d.Data.Attributes()...)
attrs = append(attrs, d.NICResourceCounts.Attributes()...)

Expand Down
4 changes: 0 additions & 4 deletions internal/telemetry/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ type ExporterCfg struct {
func NewExporter(cfg ExporterCfg) (Exporter, error) {
providerOptions := []otlptracegrpc.Option{
otlptracegrpc.WithEndpoint(cfg.Endpoint),
// This header option will be removed when https://github.com/nginxinc/telemetry-exporter/issues/41 is resolved.
otlptracegrpc.WithHeaders(map[string]string{
"X-F5-OTEL": "GRPC",
}),
}

exporter, err := tel.NewExporter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

func (d *NICResourceCounts) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue

attrs = append(attrs, attribute.Int64("VirtualServers", d.VirtualServers))
attrs = append(attrs, attribute.Int64("VirtualServerRoutes", d.VirtualServerRoutes))
attrs = append(attrs, attribute.Int64("TransportServers", d.TransportServers))
Expand Down

0 comments on commit c864bc2

Please sign in to comment.