diff --git a/go.mod b/go.mod index 9d106ea557..c8d47d5563 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index ee34ad113b..c2d6d9ff99 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= diff --git a/internal/telemetry/data.avdl b/internal/telemetry/data.avdl index bf244800f5..aae75fec77 100644 --- a/internal/telemetry/data.avdl +++ b/internal/telemetry/data.avdl @@ -1,4 +1,5 @@ @namespace("ingress.nginx.com") protocol NICProductTelemetry { + /** 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; @@ -114,7 +115,7 @@ 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} InstallationFlags = null; - /** BuildOS returns the base buildOS image */ + /** BuildOS represents the base operating system image */ string? BuildOS = null; } diff --git a/internal/telemetry/data_attributes_generated.go b/internal/telemetry/data_attributes_generated.go index 8b76883133..d527c811bf 100644 --- a/internal/telemetry/data_attributes_generated.go +++ b/internal/telemetry/data_attributes_generated.go @@ -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()...) diff --git a/internal/telemetry/exporter.go b/internal/telemetry/exporter.go index 109e453ffe..068f3755dd 100644 --- a/internal/telemetry/exporter.go +++ b/internal/telemetry/exporter.go @@ -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( diff --git a/internal/telemetry/nicresourcecounts_attributes_generated.go b/internal/telemetry/nicresourcecounts_attributes_generated.go index ca8939a20d..27a2051928 100644 --- a/internal/telemetry/nicresourcecounts_attributes_generated.go +++ b/internal/telemetry/nicresourcecounts_attributes_generated.go @@ -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))