-
Notifications
You must be signed in to change notification settings - Fork 144
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
[otel] Add basic configuration samples #5002
[otel] Add basic configuration samples #5002
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
afaik these will need to follow the format provided in the ticket with the specified placeholders present |
will we replace placeholders by any means using template engine? |
indeed, the onboarding flow will replace the placeholders we will also need to update the placeholders with the infraprocessor included |
I updated the issue #4785 with updated configs that should work with the infra processor, just waiting on if the index names need to change |
updated configs |
we may remove the logs_index and metrics_index parameters, I guess there's some discussion about having the index pulled from the datastream values: open-telemetry/opentelemetry-collector-contrib#33755 edit: yeah confirmed we'll want to pull the metrics_index and logs_index settings as that is planned to merge shortly |
@strawgate In the snippet for the onboarding flow, we try to get the |
@flash1293 can you get me everything you need, filenames, content etc.in the meantime i will add what you requested here |
…c-agent into otel/config-samples
@michalpristas Here is the PR for the onboarding flow: elastic/kibana#183732 The snippet for Linux looks like this:
it should prepare everything to collect and ship host logs and metrics |
There should be 2 configs for each platform:
I need to double check if we need to include the resource detection processor in these |
Yes, we need the resource detection processor to populate the resource attributes properly. |
@michalpristas In the latest state, these samples now use env variables for ES host and API key: https://github.com/elastic/elastic-agent/pull/5002/files#diff-f10f8ed3393ab509de41e1eaea7fc6bbced0a461041b3fd79ad0eb53165ae030R25 However, the quickstart snippet in the Kibana UI is looking for placeholders: How should we bring them together?
I would prefer the first option, the second one seems like a weird middle ground and the third one makes the host and api key a little too ephemeral to me - as they are not persisted anywhere, it would be very easy for the user to lose them by closing the terminal session. Writing them to the config file seems like the right call. Any thoughts? |
@flash1293 my issue with first option is that it provides terrible experience for user, while env is standard when it comes to otel config, you can validate and use config right away, with weird placeholders we force users to do something that is not standard way of handling configuration. providing them with sed may work for linux/mac users, but this won't work on windows i'd be for 2nd or 3rd option and as this is implementation detail on your side, i don't really have a preference, 3rd one being more standard. my goal is to have usable config packed with agent |
@michalpristas fair points, let's go with the second option for now. I will adjust the snippet |
@michalpristas On testing with
is this expected at the moment? |
Yes, because the other PR with metrics support is not included yet |
…c-agent into otel/config-samples
Co-authored-by: Carson Ip <[email protected]>
Can you help me understand why this is a terrible experience for users? I understand it is a less fun experience for developers, but a user is only going to be impacted by this once, as they only go through onboarding once. A user who wants to use environment variables can easily do so? I also believe it depends on the use-case. I believe that using environment variables for credentials is standard for application environments, but is not standard (would be considered insecure), for endpoint systems. |
Quality Gate passedIssues Measures |
i agree on the second point, but I believe these configs are not meant for production environments. I havent' seen onboarding flow Joe is working on, but copy/paste script generated by that I find fine. so my ideal behavior would require this to be implemented upstream |
I understood that @flash1293 implemented replace of env, which is great. I enable auto merge and as soon as somebody from my team hit approve, this gets in. |
I'm +1 to the environment variables approach as it provides a standard way to pass information to the config for replacement while also not precluding sed-style replacements if someone chooses to do that instead. |
(cherry picked from commit 9861bf1)
(cherry picked from commit 9861bf1) Co-authored-by: Michal Pristas <[email protected]>
Written in a waynow using placeholdersvalidate
passes on themCloses #4785