Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

donoghuc
Copy link

@donoghuc donoghuc commented Nov 11, 2024

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

@@ -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
Copy link
Author

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"?

@donoghuc donoghuc changed the title Set x-elastic-internal-origin header for ES requests Set x-elastic-product-origin header for ES requests Nov 12, 2024
@donoghuc donoghuc force-pushed the ID-4384-x-elastic-internal-origin-header branch from 38cf55f to 1c54650 Compare November 12, 2024 21:52
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.
@donoghuc donoghuc force-pushed the ID-4384-x-elastic-internal-origin-header branch from 1c54650 to 9fce225 Compare November 12, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add x-elastic-internal-origin header to all places that make requests to Elasticsearch
1 participant