Skip to content

Commit

Permalink
Change NGINXProxy to NginxProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Jun 28, 2024
1 parent 40bcc9f commit b9e571f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions internal/mode/static/telemetry/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ type NGFResourceCounts struct {
RouteAttachedClientSettingsPolicyCount int64
// ObservabilityPolicyCount is the number of relevant ObservabilityPolicies.
ObservabilityPolicyCount int64
// NGINXProxyCount is the number of NGINXProxies.
NGINXProxyCount int64
// NginxProxyCount is the number of NginxProxies.
NginxProxyCount int64
}

// DataCollectorConfig holds configuration parameters for DataCollectorImpl.
Expand Down Expand Up @@ -218,7 +218,7 @@ func collectGraphResourceCount(
}

if g.NginxProxy != nil {
ngfResourceCounts.NGINXProxyCount = 1
ngfResourceCounts.NginxProxyCount = 1
}

return ngfResourceCounts, nil
Expand Down
6 changes: 3 additions & 3 deletions internal/mode/static/telemetry/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ var _ = Describe("Collector", Ordered, func() {
GatewayAttachedClientSettingsPolicyCount: 1,
RouteAttachedClientSettingsPolicyCount: 2,
ObservabilityPolicyCount: 1,
NGINXProxyCount: 1,
NginxProxyCount: 1,
}
expData.ClusterVersion = "1.29.2"
expData.ClusterPlatform = "kind"
Expand Down Expand Up @@ -610,7 +610,7 @@ var _ = Describe("Collector", Ordered, func() {
GatewayAttachedClientSettingsPolicyCount: 1,
RouteAttachedClientSettingsPolicyCount: 1,
ObservabilityPolicyCount: 1,
NGINXProxyCount: 1,
NginxProxyCount: 1,
}

data, err := dataCollector.Collect(ctx)
Expand All @@ -634,7 +634,7 @@ var _ = Describe("Collector", Ordered, func() {
GatewayAttachedClientSettingsPolicyCount: 0,
RouteAttachedClientSettingsPolicyCount: 0,
ObservabilityPolicyCount: 0,
NGINXProxyCount: 0,
NginxProxyCount: 0,
}

data, err := dataCollector.Collect(ctx)
Expand Down
4 changes: 2 additions & 2 deletions internal/mode/static/telemetry/data.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ attached at the Gateway level. */
/** ObservabilityPolicyCount is the number of relevant ObservabilityPolicies. */
long? ObservabilityPolicyCount = null;

/** NGINXProxyCount is the number of NGINXProxies. */
long? NGINXProxyCount = null;
/** NginxProxyCount is the number of NginxProxies. */
long? NginxProxyCount = null;

/** NGFReplicaCount is the number of replicas of the NGF Pod. */
long? NGFReplicaCount = null;
Expand Down
6 changes: 3 additions & 3 deletions internal/mode/static/telemetry/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestDataAttributes(t *testing.T) {
GatewayAttachedClientSettingsPolicyCount: 9,
RouteAttachedClientSettingsPolicyCount: 10,
ObservabilityPolicyCount: 11,
NGINXProxyCount: 12,
NginxProxyCount: 12,
},
NGFReplicaCount: 3,
}
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestDataAttributes(t *testing.T) {
attribute.Int64("GatewayAttachedClientSettingsPolicyCount", 9),
attribute.Int64("RouteAttachedClientSettingsPolicyCount", 10),
attribute.Int64("ObservabilityPolicyCount", 11),
attribute.Int64("NGINXProxyCount", 12),
attribute.Int64("NginxProxyCount", 12),
attribute.Int64("NGFReplicaCount", 3),
}

Expand Down Expand Up @@ -101,7 +101,7 @@ func TestDataAttributesWithEmptyData(t *testing.T) {
attribute.Int64("GatewayAttachedClientSettingsPolicyCount", 0),
attribute.Int64("RouteAttachedClientSettingsPolicyCount", 0),
attribute.Int64("ObservabilityPolicyCount", 0),
attribute.Int64("NGINXProxyCount", 0),
attribute.Int64("NginxProxyCount", 0),
attribute.Int64("NGFReplicaCount", 0),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (d *NGFResourceCounts) Attributes() []attribute.KeyValue {
attrs = append(attrs, attribute.Int64("GatewayAttachedClientSettingsPolicyCount", d.GatewayAttachedClientSettingsPolicyCount))
attrs = append(attrs, attribute.Int64("RouteAttachedClientSettingsPolicyCount", d.RouteAttachedClientSettingsPolicyCount))
attrs = append(attrs, attribute.Int64("ObservabilityPolicyCount", d.ObservabilityPolicyCount))
attrs = append(attrs, attribute.Int64("NGINXProxyCount", d.NGINXProxyCount))
attrs = append(attrs, attribute.Int64("NginxProxyCount", d.NginxProxyCount))


return attrs
Expand Down
2 changes: 1 addition & 1 deletion site/content/overview/product-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Telemetry data is collected once every 24 hours and sent to a service managed by
- **Deployment Replica Count:** the count of NGINX Gateway Fabric Pods.
- **Image Build Source:** whether the image was built by GitHub or locally (values are `gha`, `local`, or `unknown`). The source repository of the images is **not** collected.
- **Deployment Flags:** a list of NGINX Gateway Fabric Deployment flags that are specified by a user. The actual values of non-boolean flags are **not** collected; we only record that they are either `true` or `false` for boolean flags and `default` or `user-defined` for the rest.
- **Count of Resources:** the total count of resources related to NGINX Gateway Fabric. This includes `GatewayClasses`, `Gateways`, `HTTPRoutes`,`GRPCRoutes`, `Secrets`, `Services`, `BackendTLSPolicies`, `ClientSettingsPolicies`, `NGINXProxies`, `ObservabilityPolicies`, and `Endpoints`. The data within these resources is **not** collected.
- **Count of Resources:** the total count of resources related to NGINX Gateway Fabric. This includes `GatewayClasses`, `Gateways`, `HTTPRoutes`,`GRPCRoutes`, `Secrets`, `Services`, `BackendTLSPolicies`, `ClientSettingsPolicies`, `NginxProxies`, `ObservabilityPolicies`, and `Endpoints`. The data within these resources is **not** collected.

This data is used to identify the following information:

Expand Down
2 changes: 1 addition & 1 deletion tests/suite/telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var _ = Describe("Telemetry test with OTel collector", Label("telemetry"), func(
"GatewayAttachedClientSettingsPolicyCount: Int(0)",
"RouteAttachedClientSettingsPolicyCount: Int(0)",
"ObservabilityPolicyCount: Int(0)",
"NGINXProxyCount: Int(0)",
"NginxProxyCount: Int(0)",
"NGFReplicaCount: Int(1)",
},
)
Expand Down

0 comments on commit b9e571f

Please sign in to comment.