-
Notifications
You must be signed in to change notification settings - Fork 84
Set x-elastic-product-origin header for ES requests #211
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
Set x-elastic-product-origin header for ES requests #211
Conversation
lib/logstash/inputs/elasticsearch.rb
Outdated
@@ -271,6 +271,8 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base | |||
|
|||
BUILD_FLAVOR_SERVERLESS = 'serverless'.freeze | |||
DEFAULT_EAV_HEADER = { "Elastic-Api-Version" => "2023-10-31" }.freeze | |||
# CODEREVIEW: What should the value be here? Logstash? Logstash-plugin? | |||
INTERNAL_ORIGIN_HEADER = { 'x-elastic-internal-origin' => 'logstash-input-elasticsearch'}.freeze |
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.
What should the value be for plugins? Do we want it to be unique for each plugin? Do we want to indicate the request is coming from a plugin at all? Should it just be something even more generic like "logstash"?
1c54650
to
9fce225
Compare
This should be ready for review. As far as release strategy... Is this something that we need to ensure goes in to a 4 series before releasing a new major version? If so, should i prepare a release as such? |
This one should be released on a new version on the Please update the version, and create a new minor. |
This commit updates the `Elasticsearch::Client` used to make requests to ES to send along a header identifying the request as originating from an internal component.
Update version and add CHANGELOG entry.
9fce225
to
a2e4241
Compare
OK, Added a release prep commit. Once this is merged and tagged I can create a 4.x branch :) |
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.
LGTM!
@donoghuc Yes, please - go ahead, and squash and merge the commit. The plugin publish github action is how we publish plugins, but please feel free to reach out to @mashhurs or any of us on any pointers on how to do so |
Publish job run: https://github.com/logstash-plugins/publisher/actions/runs/12187969326/job/33999958995 Let me know if I missed anything @robbavey or @mashhurs Thanks! |
Perfect! Thank you! |
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.
Late to party but LGTM and well released.
This commit updates the
Elasticsearch::Client
used to make requests to ES to send along a header identifying the request as originating from an internal component.Closes #212