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

Allow to customize which Elasticsearch request bodies are captured #665

Closed
danielmitterdorfer opened this issue Jul 28, 2022 · 2 comments · Fixed by #670
Closed

Allow to customize which Elasticsearch request bodies are captured #665

danielmitterdorfer opened this issue Jul 28, 2022 · 2 comments · Fixed by #670

Comments

@danielmitterdorfer
Copy link
Member

Currently, agent implementations have a hardcoded list of Elasticsearch request paths patterns that define when to capture a request body, e.g.

We use the APM agent to capture requests that Kibana server sends to Elasticsearch and would like to automatically generate Rally benchmarks from these request traces. The problem that we are facing is that request bodies are only captured for a subset of requests against Elasticsearch (basically searches, but also not all of them, e.g. PIT is missing). Instead, we'd like to be able to customize for which requests the agent captures request bodies. We don't mind if this creates a lot of data because we'd only use this feature in a setup we have tight control over.

This also very loosely relates to elastic/apm-agent-nodejs#2019 as the request bodies would be captured in context.db.statement.

@felixbarny
Copy link
Member

Which are the URLs you'd like to capture the request body for?

We could either add them to the static list of URLs where agents capture the body or add a config option like elasticsearch_capture_body_urls where the value would be a list of wildcard matchers.

@danielmitterdorfer
Copy link
Member Author

The URLs depend on what requests Kibana sends for these benchmarks and that can change as Kibana adopts new Elasticsearch APIs. Our plan was to cast a wide net so a property like elasticsearch_capture_body_urls would likely be the easiest and most flexible option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants