Skip to content

Commit

Permalink
[chore][receivercreator] Replace positional arguements with named
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark committed Dec 20, 2024
1 parent 08e0bb4 commit 88bc2d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions receiver/receivercreator/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestLoadConfig(t *testing.T) {
Rule: `type == "port"`,
ResourceAttributes: map[string]any{"one": "two"},
rule: portRule,
signals: receiverSignals{true, true, true},
signals: receiverSignals{metrics: true, logs: true, traces: true},
},
"nop/1": {
receiverConfig: receiverConfig{
Expand All @@ -103,7 +103,7 @@ func TestLoadConfig(t *testing.T) {
Rule: `type == "port"`,
ResourceAttributes: map[string]any{"two": "three"},
rule: portRule,
signals: receiverSignals{true, true, true},
signals: receiverSignals{metrics: true, logs: true, traces: true},
},
},
WatchObservers: []component.ID{
Expand Down
2 changes: 1 addition & 1 deletion receiver/receivercreator/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (builder *k8sHintsBuilder) createScraper(
}

recTemplate, err := newReceiverTemplate(fmt.Sprintf("%v/%v_%v", subreceiverKey, pod.UID, port), userConfMap)
recTemplate.signals = receiverSignals{true, false, false}
recTemplate.signals = receiverSignals{metrics: true, logs: false, traces: false}

return &recTemplate, err
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/receivercreator/observerhandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestOnAddForMetrics(t *testing.T) {
rule: portRule,
Rule: `type == "port"`,
ResourceAttributes: map[string]any{},
signals: receiverSignals{true, true, true},
signals: receiverSignals{metrics: true, logs: true, traces: true},
},
}

Expand Down

0 comments on commit 88bc2d0

Please sign in to comment.