Skip to content

Commit

Permalink
Merge branch 'main' into chore/add-telemetry-for-tls-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ADubhlaoich authored Aug 14, 2024
2 parents 8d0b13c + 9a85dbc commit 910e267
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1
github.com/nginxinc/nginx-plus-go-client v1.2.2
github.com/nginxinc/nginx-prometheus-exporter v1.3.0
github.com/nginxinc/telemetry-exporter v0.1.0
github.com/nginxinc/telemetry-exporter v0.1.1
github.com/onsi/ginkgo/v2 v2.20.0
github.com/onsi/gomega v1.34.1
github.com/prometheus/client_golang v1.19.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ github.com/nginxinc/nginx-plus-go-client v1.2.2 h1:sl7HqNDDZq2EVu0eQQVoZ6PKYGa4h
github.com/nginxinc/nginx-plus-go-client v1.2.2/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4=
github.com/nginxinc/nginx-prometheus-exporter v1.3.0 h1:1JtdxsZH0Uwhu1nL/j/QyOXytP5V5j68AEo2X+DFWb0=
github.com/nginxinc/nginx-prometheus-exporter v1.3.0/go.mod h1:hXoH+X6aIKSyQuO6QTIiPKH3eZyxqy/wW8GYiE3dflU=
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=
Expand Down
1 change: 1 addition & 0 deletions internal/mode/static/telemetry/data.avdl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@namespace("gateway.nginx.org") protocol NGFProductTelemetry {
/** Data is the telemetry data for the product. */
@df_datatype("ngf-product-telemetry") record Data {
/** The field that identifies what type of data this is. */
string dataType;
Expand Down
7 changes: 1 addition & 6 deletions internal/mode/static/telemetry/data_attributes_generated.go
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@

package telemetry

/*
This is a generated file. DO NOT EDIT.
*/

import (
"go.opentelemetry.io/otel/attribute"


ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *Data) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue
attrs = append(attrs, attribute.String("dataType", "ngf-product-telemetry"))


attrs = append(attrs, attribute.String("ImageSource", d.ImageSource))
attrs = append(attrs, d.Data.Attributes()...)
attrs = append(attrs, attribute.StringSlice("FlagNames", d.FlagNames))
attrs = append(attrs, attribute.StringSlice("FlagValues", d.FlagValues))
attrs = append(attrs, d.NGFResourceCounts.Attributes()...)
attrs = append(attrs, attribute.Int64("NGFReplicaCount", d.NGFReplicaCount))


return attrs
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@

package telemetry

/*
This is a generated file. DO NOT EDIT.
*/

import (
"go.opentelemetry.io/otel/attribute"


ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

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

attrs = append(attrs, attribute.Int64("GatewayCount", d.GatewayCount))
attrs = append(attrs, attribute.Int64("GatewayClassCount", d.GatewayClassCount))
attrs = append(attrs, attribute.Int64("HTTPRouteCount", d.HTTPRouteCount))
Expand All @@ -28,7 +25,6 @@ func (d *NGFResourceCounts) Attributes() []attribute.KeyValue {
attrs = append(attrs, attribute.Int64("RouteAttachedClientSettingsPolicyCount", d.RouteAttachedClientSettingsPolicyCount))
attrs = append(attrs, attribute.Int64("ObservabilityPolicyCount", d.ObservabilityPolicyCount))
attrs = append(attrs, attribute.Int64("NginxProxyCount", d.NginxProxyCount))


return attrs
}
Expand Down
5 changes: 4 additions & 1 deletion tests/suite/reconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
getStartTime := func() time.Time { return startTime }
modifyStartTime := func() { startTime = startTime.Add(500 * time.Millisecond) }

setup(getDefaultSetupCfg())
cfg := getDefaultSetupCfg()
cfg.nfr = true
setup(cfg)

podNames, err := framework.GetReadyNGFPodNames(k8sClient, ngfNamespace, releaseName, timeoutConfig.GetTimeout)
Expect(err).ToNot(HaveOccurred())
Expect(podNames).To(HaveLen(1))
Expand Down

0 comments on commit 910e267

Please sign in to comment.