-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Heartbeat Telemetry #8621
Changes from all commits
1cf1a5d
d85d186
ac5cbe4
0e20f0a
036d373
113ed51
027f045
e3f9d62
998d27a
a15ef68
fab8be9
d9995d5
7a62efb
090e920
339547c
919214d
e7374a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ import ( | |
|
||
"github.com/elastic/beats/libbeat/beat" | ||
"github.com/elastic/beats/libbeat/common" | ||
"github.com/elastic/beats/libbeat/monitoring" | ||
) | ||
|
||
type MockBeatClient struct { | ||
|
@@ -99,11 +100,13 @@ func createMockJob(name string, cfg *common.Config) ([]Job, error) { | |
} | ||
|
||
func mockPluginBuilder() pluginBuilder { | ||
return pluginBuilder{"test", ActiveMonitor, func(s string, config *common.Config) ([]Job, error) { | ||
reg := monitoring.NewRegistry() | ||
|
||
return pluginBuilder{"test", ActiveMonitor, func(s string, config *common.Config) ([]Job, int, error) { | ||
c := common.Config{} | ||
j, err := createMockJob("test", &c) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this breaks the tests because there is not monitor type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now fixed since we only log instead of panic in this case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now further improved by our dynamic creation of metrics, so this scenario is no longer possible. |
||
return j, err | ||
}} | ||
return j, 1, err | ||
}, newPluginCountersRecorder("test", reg)} | ||
} | ||
|
||
func mockPluginsReg() *pluginsReg { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was unclear before. This is really a map of
scheme(str) -> []host(str)