Skip to content

Commit

Permalink
add queue capacity metric for experimental query setting
Browse files Browse the repository at this point in the history
Signed-off-by: Ziqi Zhao <[email protected]>
  • Loading branch information
fatsheep9146 committed Jul 9, 2022
1 parent c4b9b43 commit 30b28de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exporter/exporterhelper/queued_retry_experimental.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ func (qrs *queuedRetrySender) start(ctx context.Context, host component.Host) er
if err != nil {
return fmt.Errorf("failed to create retry queue size metric: %w", err)
}
err = globalInstruments.queueCapacity.UpsertEntry(func() int64 {
return int64(qrs.cfg.QueueSize)
}, metricdata.NewLabelValue(qrs.fullName()))
if err != nil {
return fmt.Errorf("failed to create retry queue capacity metric: %w", err)
}
}

return nil
Expand Down

0 comments on commit 30b28de

Please sign in to comment.