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

Make hostmetricsreceiver available in otel mode #4724

Closed
1 task
ycombinator opened this issue May 9, 2024 · 7 comments · Fixed by #4908
Closed
1 task

Make hostmetricsreceiver available in otel mode #4724

ycombinator opened this issue May 9, 2024 · 7 comments · Fixed by #4908
Assignees
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@ycombinator
Copy link
Contributor

Describe the enhancement:

Include the hostmetricsreceiver in the OTel Collector components we bundle with Elastic Agent.

Describe a specific use case for the enhancement or feature:

Users of Elastic Agent in OTel mode (elastic-agent otel ...) would like to be able to use the hostmetricsreceiver in their OTel Collector pipeline configurations.

What is the definition of done?

  • A test that runs Elastic Agent in OTel mode (elastic-agent otel ...) includes the hostmetricsreceiver in it's test OTel Collector configuration and the test passes.
@ycombinator ycombinator added the enhancement New feature or request label May 9, 2024
@ycombinator
Copy link
Contributor Author

Note that an attempt was already made to try and bundle the hostmetricsreceiver with Elastic Agent in #4706 but CI failed Serverless tests 🤷 on the following error:

>>> (windows-amd64-2022-fleet) Test output (sudo) (stdout): Error: error starting service: failed to start service (Elastic Agent): The service did not respond to the start or control request in a timely fashion.

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@ycombinator
Copy link
Contributor Author

Please remember to backport this issue's PR to the 8.14 branch.

@jlind23
Copy link
Contributor

jlind23 commented Jun 11, 2024

Please remember to backport this issue's PR to the 8.14 branch.

@ycombinator @andrzej-stencel this is because it has to be available for 8.14.2 right?

@ycombinator
Copy link
Contributor Author

@ycombinator @andrzej-stencel this is because it has to be available for 8.14.2 right?

That's correct. We want the Elasticsearch exporter to be able to export metrics produced by the hostmetricsreceiver in ECS format for 8.14.2. So, as a dependency, we will also want the hostmetricsreceiver itself to be in 8.14.2 as well.

@ycombinator
Copy link
Contributor Author

ycombinator commented Jun 12, 2024

@cmacknz This issue came up for discussion in today's OTel Weekly sync meeting, specifically the Windows failures we were seeing the last time we tried to include the hostmetricsreceiver in Elastic Agent. @strawgate mentioned you suggested some way to exclude this receiver only on Windows. I was curious how we'd go about this, considering we'd still need the require in go.mod and the import in https://github.com/elastic/elastic-agent/blob/main/internal/pkg/otel/components.go. Were you thinking something as simple as adding a if runtime.GOOS == "windows" conditional around

factories.Receivers, err = receiver.MakeFactoryMap(
otlpreceiver.NewFactory(),
filelogreceiver.NewFactory(),
)
or something else?

@cmacknz
Copy link
Member

cmacknz commented Jun 12, 2024

I didn't have any specific way of doing this in mind, but a conditional on runtime.GOOS would work.

I don't think we've spent much time actually investigating why it fails, so I'd prefer we put a day into that first, and only make it conditional if we can't figure out what is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
5 participants