-
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
[Heartbeat] Incorporate factory metadata for autodiscover #10258
Conversation
Heartbeat factories get metadata from autodiscover and other sources. This change automatically adds that data to events keeping heartbeat behavior in-line with other beats.
Pinging @elastic/uptime |
@ruflin my original thinking was that the additional fields here might be considered 'breaking', but I no longer believe that. I think that was backwards. I've added the |
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.
Change LGTM and agree this should not be a breaking change. Could you add a changelog entry?
@exekias Can you have also a look? I'm mainly surprised how simple the change is and if we are missing something.
@ruflin added changelog entry (and fixed a previous one that was in the wrong spot) |
jenkins, test this |
@@ -112,6 +112,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d | |||
*Heartbeat* | |||
|
|||
- Made monitors.d configuration part of the default config. {pull}9004[9004] | |||
- Fixed rare issue where TLS connections to endpoints with x509 certificates missing either notBefore or notAfter would cause the check to fail with a stacktrace. {pull}9566[9566] |
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.
Does not seem to belong to this PR?
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.
Technically no, but I moved it since it was in the wrong spot. Should I make a new PR?
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.
Just realised now that you moved it only and was not added. All good.
t.client, err = t.monitor.pipelineConnector.ConnectWith(beat.ClientConfig{ | ||
EventMetadata: t.config.EventMetadata, | ||
Processor: t.processors, | ||
Fields: common.MapStr{"event": common.MapStr{"dataset": "uptime"}}, | ||
Fields: fields, |
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.
there is a DynamicFields
here in ClientConfig
, were you can pass t.monitor.factoryMetadata directly, no need for that DeepUpdate
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.
left a comment that I think needs to be addressed, but this is looking awesome!
) [Heartbeat] Incorporate factory metadata for autodiscover Heartbeat factories get metadata from autodiscover and other sources. This change automatically adds that data to events keeping heartbeat behavior in-line with other beats. (cherry picked from commit 8f4e186)
Heartbeat factories get metadata from autodiscover and other sources.
This change automatically adds that data to events keeping heartbeat behavior in-line with other beats.