Skip to content

Commit

Permalink
Update generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Oct 10, 2024
1 parent b805ed5 commit e15a506
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions internal/mode/static/telemetry/data.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ at the same index.
Each value is either 'true' or 'false' for boolean flags and 'default' or 'user-defined' for non-boolean flags. */
union {null, array<string>} FlagValues = null;

/** SnippetsFiltersContextDirectives contains the context-directive strings of all applied SnippetsFilters.
Both lists are ordered first by count, then by lexicographical order on the context-directive string. */
union {null, array<string>} SnippetsFiltersContextDirectives = null;

/** SnippetsFiltersContextDirectivesCount contains the count of the context-directive strings, where each count
corresponds to the string from SnippetsFiltersContextDirectives at the same index. Both lists are ordered
first by count, then by lexicographical order on the context-directive string. */
union {null, array<long>} SnippetsFiltersContextDirectivesCount = null;

/** GatewayCount is the number of relevant Gateways. */
long? GatewayCount = null;

Expand Down Expand Up @@ -91,14 +100,5 @@ attached at the Gateway level. */
/** NGFReplicaCount is the number of replicas of the NGF Pod. */
long? NGFReplicaCount = null;

/** SnippetsFiltersContextDirectives contains the context-directive strings of all applied SnippetsFilters.
Both lists are ordered first by count, then by lexicographical order on the context-directive string. */
union {null, array<string>} SnippetsFiltersContextDirectives = null;

/** SnippetsFiltersContextDirectivesCount contains the count of the context-directive strings, where each count
corresponds to the string from SnippetsFiltersContextDirectives at the same index. Both lists are ordered
first by count, then by lexicographical order on the context-directive string. */
union {null, array<long>} SnippetsFiltersContextDirectivesCount = null;

}
}
4 changes: 2 additions & 2 deletions internal/mode/static/telemetry/data_attributes_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ func (d *Data) Attributes() []attribute.KeyValue {
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))
attrs = append(attrs, attribute.StringSlice("SnippetsFiltersContextDirectives", d.SnippetsFiltersContextDirectives))
attrs = append(attrs, attribute.Int64Slice("SnippetsFiltersContextDirectivesCount", d.SnippetsFiltersContextDirectivesCount))
attrs = append(attrs, d.NGFResourceCounts.Attributes()...)
attrs = append(attrs, attribute.Int64("NGFReplicaCount", d.NGFReplicaCount))

return attrs
}
Expand Down
14 changes: 7 additions & 7 deletions internal/mode/static/telemetry/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func TestDataAttributes(t *testing.T) {
attribute.Int64("ClusterNodeCount", 3),
attribute.StringSlice("FlagNames", []string{"test-flag"}),
attribute.StringSlice("FlagValues", []string{"test-value"}),
attribute.StringSlice(
"SnippetsFiltersContextDirectives",
[]string{"main-three-count", "http-two-count", "server-one-count"},
),
attribute.IntSlice("SnippetsFiltersContextDirectivesCount", []int{3, 2, 1}),
attribute.Int64("GatewayCount", 1),
attribute.Int64("GatewayClassCount", 2),
attribute.Int64("HTTPRouteCount", 3),
Expand All @@ -73,11 +78,6 @@ func TestDataAttributes(t *testing.T) {
attribute.Int64("NginxProxyCount", 12),
attribute.Int64("SnippetsFilterCount", 13),
attribute.Int64("NGFReplicaCount", 3),
attribute.StringSlice(
"SnippetsFiltersContextDirectives",
[]string{"main-three-count", "http-two-count", "server-one-count"},
),
attribute.IntSlice("SnippetsFiltersContextDirectivesCount", []int{3, 2, 1}),
}

result := data.Attributes()
Expand All @@ -103,6 +103,8 @@ func TestDataAttributesWithEmptyData(t *testing.T) {
attribute.Int64("ClusterNodeCount", 0),
attribute.StringSlice("FlagNames", nil),
attribute.StringSlice("FlagValues", nil),
attribute.StringSlice("SnippetsFiltersContextDirectives", nil),
attribute.IntSlice("SnippetsFiltersContextDirectivesCount", nil),
attribute.Int64("GatewayCount", 0),
attribute.Int64("GatewayClassCount", 0),
attribute.Int64("HTTPRouteCount", 0),
Expand All @@ -118,8 +120,6 @@ func TestDataAttributesWithEmptyData(t *testing.T) {
attribute.Int64("NginxProxyCount", 0),
attribute.Int64("SnippetsFilterCount", 0),
attribute.Int64("NGFReplicaCount", 0),
attribute.StringSlice("SnippetsFiltersContextDirectives", nil),
attribute.IntSlice("SnippetsFiltersContextDirectivesCount", nil),
}

result := data.Attributes()
Expand Down

0 comments on commit e15a506

Please sign in to comment.