Skip to content

Commit ac63f91

Browse files
authored
Enable discovery manager metrics in target allocator (#2169)
1 parent bd9f804 commit ac63f91

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
5+
component: target allocator
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Enable discovery manager metrics in target allocator
9+
10+
# One or more tracking issues related to the change
11+
issues: [2170]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:

cmd/otel-allocator/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ func main() {
9090

9191
discoveryCtx, discoveryCancel := context.WithCancel(ctx)
9292
discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger())
93+
discovery.RegisterMetrics() // discovery manager metrics need to be enabled explicitly
94+
9395
targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook, srv)
9496
collectorWatcher, collectorWatcherErr := collector.NewClient(log, cfg.ClusterConfig)
9597
if collectorWatcherErr != nil {

0 commit comments

Comments
 (0)