-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Add default HTTP log receiver #1330
Conversation
f4a5a2f
to
542b084
Compare
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.
Looks mostly good I think, I think I still need to test but had one potential optimization that may or may not be worth doing
5001091
to
28ed8dc
Compare
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.
Looking good, just one suggestion on the configuration
receiver/httpreceiver/config.go
Outdated
// Config defines the configuration for an HTTP receiver | ||
type Config struct { | ||
Path string `mapstructure:"path"` | ||
ServerSettings *confighttp.HTTPServerSettings `mapstructure:"server"` |
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.
Small recommendation here:
ServerSettings *confighttp.HTTPServerSettings `mapstructure:"server"` | |
ServerSettings *confighttp.HTTPServerSettings `mapstructure:",squash"` |
This way we don't need the extra server
key when specifying endpoint/tls. I think this is the usual pattern with this struct (e.g. https://github.com/open-telemetry/opentelemetry-collector/blob/2a9d870a57038cb228ef20e7620f18a93c92b9d3/receiver/otlpreceiver/config.go#L25)
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.
oh yea perfect, didn't realize i could do that
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.
Approving since I initially reviewed, I'll defer to the agent team on if/when to merge
Proposed Change
This PR adds a new receiver to the bindplane-agent which serves as a default HTTP log receiver. In actuality this was created for the sole purpose of ingesting logs from the Datadog-Agent. The receiver is made and described as a "default HTTP receiver" but the main focus of it is for this specific use case. As a result there are likely several limitations that prevent it from being a "default HTTP log receiver", but that is okay for the time being.
The correct and eventual solution for this use case and others like it is creating an HTTP input operator for Stanza and then making a receiver built around that, similar to the TCPLog receiver and Stanza TCP input operator. However that approach was not taken because we needed a solution for the Datadog-Agent use case quickly and the Stanza HTTP operator would take too long to realize.
Checklist