Skip to content

Commit

Permalink
WiP: mark TODO items.
Browse files Browse the repository at this point in the history
Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Nov 9, 2024
1 parent a667399 commit 3373b82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/instrumentation/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ func start() error {
metrics.WithNamespace("nri"),
metrics.WithExporterDisabled(!cfg.PrometheusExport),
metrics.WithReportPeriod(cfg.ReportPeriod.Duration),
// TODO(klihub): make this configurable via apis/config/.../instrumentation.Config
metrics.WithMetrics([]string{"buildinfo", "policy"}, nil),
); err != nil {
return fmt.Errorf("failed to start metrics: %v", err)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/resmgr/policy/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
}
}

// TODO(klihub): protect metrics polling/collection against concurrent policy processing.

func (c *Collector) Collect(ch chan<- prometheus.Metric) {
pm, err := c.policy.CollectMetrics(c.policy.PollMetrics())
if err != nil {
Expand Down

0 comments on commit 3373b82

Please sign in to comment.