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

[APM] Make sure telemetry queries are scoped and have a timeout #143819

Closed
dgieselaar opened this issue Oct 21, 2022 · 1 comment · Fixed by #144061
Closed

[APM] Make sure telemetry queries are scoped and have a timeout #143819

dgieselaar opened this issue Oct 21, 2022 · 1 comment · Fixed by #144061
Labels
Team:APM All issues that need APM UI Team support

Comments

@dgieselaar
Copy link
Member

Once every twelve hours, we sequentially run a set of queries server-side (with the internal user) to collect telemetry about APM data. We should make sure that these queries only consider relevant data for performance and privacy reasons, and that they're guarded with a timeout. Right now this is not always the case. E.g., the cardinality task queries all indices, making it a relatively (and unnecessarily) expensive request. We should make both index and timeout required in the client type that is passed down to the telemetry tasks, to prevent this situation from occurring.

name: 'cardinality',
executor: async ({ search }) => {
const allAgentsCardinalityResponse = await search({
body: {
size: 0,
timeout,
query: {
bool: {
filter: [range1d],
},
},
aggs: {
[TRANSACTION_NAME]: {
cardinality: {
field: TRANSACTION_NAME,
},
},
[USER_AGENT_ORIGINAL]: {
cardinality: {
field: USER_AGENT_ORIGINAL,
},
},
},
},
});
const rumAgentCardinalityResponse = await search({

@dgieselaar dgieselaar added the Team:APM All issues that need APM UI Team support label Oct 21, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants