Skip to content

[receiver/osquery] implement scraper#47387

Merged
atoulme merged 1 commit intoopen-telemetry:mainfrom
atoulme:osquery_impl
Apr 8, 2026
Merged

[receiver/osquery] implement scraper#47387
atoulme merged 1 commit intoopen-telemetry:mainfrom
atoulme:osquery_impl

Conversation

@atoulme
Copy link
Copy Markdown
Contributor

@atoulme atoulme commented Apr 6, 2026

Description

Implement the osquery receiver scraper.

Link to tracking issue

Fixes #30375

@smithclay please review

@atoulme atoulme requested a review from a team as a code owner April 6, 2026 07:15
@atoulme atoulme requested a review from axw April 6, 2026 07:15
@github-actions github-actions bot requested a review from smithclay April 6, 2026 07:15
@smithclay
Copy link
Copy Markdown
Contributor

thanks!

Comment on lines +77 to +83
// Use a separate connection for queries in order to be able to recover from timed out queries
queryClient, err := or.connect(defaultClientConnectRetries)
if err != nil {
or.logger.Error("Could not connect to osquery socket", zap.Error(err))
return err
}
defer queryClient.Close()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the transport get closed when a query times out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this I'm not sure about. I also don't know if we should create a client per query. Definitely something to explore more.

Copy link
Copy Markdown
Contributor

@axw axw Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 maybe worth adding a TODO to come back to it? Retrying 3x with 200ms in between is a bit arbitrary, so if nothing else we should clarify why this is even needed. e.g. is it to cater for osqueryd being unavailable at dial time? And we should ideally ensure the retry loop honours context cancellation.

No problem to do all that in a followup though, just my 2c

@atoulme atoulme merged commit 17d143a into open-telemetry:main Apr 8, 2026
184 of 191 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New component: osquery

4 participants