Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/gatewayapi/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ func (r *Runner) subscribeAndTranslate(sub <-chan watchable.Snapshot[string, *re
r.Logger,
message.Metadata{Runner: r.Name(), Message: message.ProviderResourcesMessageName}, sub,
func(update message.Update[string, *resource.ControllerResourcesContext], errChan chan error) {
message.PublishRunnerEventMetric(r.Name(), update.Delete)

parentCtx := context.Background()
if update.Value != nil && update.Value.Context != nil {
parentCtx = update.Value.Context
Expand Down
2 changes: 2 additions & 0 deletions internal/globalratelimit/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ func (r *Runner) translateFromSubscription(ctx context.Context, c <-chan watchab
r.Logger,
message.Metadata{Runner: r.Name(), Message: message.XDSIRMessageName}, c,
func(update message.Update[string, *message.XdsIRWithContext], errChan chan error) {
message.PublishRunnerEventMetric(r.Name(), update.Delete)

parentCtx := ctx
if update.Value != nil && update.Value.Context != nil {
parentCtx = update.Value.Context
Expand Down
1 change: 1 addition & 0 deletions internal/infrastructure/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (r *Runner) updateProxyInfraFromSubscription(ctx context.Context, sub <-cha
default:
}
r.Logger.Info("received an update", "key", update.Key, "delete", update.Delete)
message.PublishRunnerEventMetric(r.Name(), update.Delete)
val := update.Value

if update.Delete {
Expand Down
10 changes: 8 additions & 2 deletions internal/message/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ var (
"Total number of published updates to watchable queue.",
)

runnerLabel = metrics.NewLabel("runner")
messageLabel = metrics.NewLabel("message")
watchableEventTotal = metrics.NewCounter(
"watchable_event_total",
"Total number of runner events.",
)

runnerLabel = metrics.NewLabel("runner")
messageLabel = metrics.NewLabel("message")
runnerEventTypeLabel = metrics.NewLabel("event_type")
)
11 changes: 11 additions & 0 deletions internal/message/watchutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ func PublishMetric(meta Metadata, count int) {
watchablePublishTotal.WithSuccess(meta.LabelValues()...).Add(float64(count))
}

func PublishRunnerEventMetric(runnerName string, isDelete bool) {
eventType := "update"
if isDelete {
eventType = "delete"
}
watchableEventTotal.With(
runnerEventTypeLabel.Value(eventType),
runnerLabel.Value(runnerName),
).Add(1)
}

func (m Metadata) LabelValues() []metrics.LabelValue {
labels := make([]metrics.LabelValue, 0, 2)
if m.Runner != "" {
Expand Down
2 changes: 2 additions & 0 deletions internal/xds/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func (r *Runner) translateFromSubscription(sub <-chan watchable.Snapshot[string,
r.Logger,
message.Metadata{Runner: r.Name(), Message: message.XDSIRMessageName}, sub,
func(update message.Update[string, *message.XdsIRWithContext], errChan chan error) {
message.PublishRunnerEventMetric(r.Name(), update.Delete)

parentCtx := context.Background()
if update.Value != nil && update.Value.Context != nil {
parentCtx = update.Value.Context
Expand Down
5 changes: 5 additions & 0 deletions release-notes/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ deprecations: |

# Other notable changes not covered by the above sections.
Other changes: |
Moved Envoy Gateway CRDs into a sub-chart to avoid the Helm release secret exceeding the 1MB size limit when adding new API fields. Upgrade/Install behavior is unchanged for users.
The maximum number of rules in a RateLimit policy is increased from 128 to 256.
The maximum number of JWT providers allowed in `SecurityPolicy.spec.jwt.providers` is increased from 4 to 16.
Added `runner_event_total` metric to track update and delete events in infrastructure and gateway API runners for improved observability.