[APM] Add elasticsearch queries to api response#95146
[APM] Add elasticsearch queries to api response#95146sorenlouv merged 1 commit intoelastic:masterfrom
Conversation
|
Pinging @elastic/apm-ui (Team:apm) |
|
Pinging @elastic/uptime (Team:uptime) |
smith
left a comment
There was a problem hiding this comment.
Works!
I think if you're adding an advanced setting you'll also need to add the field in src/plugins/kibana_usage_collection/server/collectors/management/schema.ts and src/plugins/kibana_usage_collection/server/collectors/management/types.ts and run the telemetry script.
|
Can we please make this observability wide setting? We have the same kind of debug mode in uptime. Consolidating UI setting observability wide will make lot of sense. WDYT? |
It's already in the Observability section of Advanced Settings. I can move the settings implementation out of the APM app if that's what you mean? And then each app can choose whether they want to implement the feature. Sounds ok? |
edba126 to
85c8480
Compare
dgieselaar
left a comment
There was a problem hiding this comment.
Would it be feasible to add an API test to verify that it doesn't leak data from calls made as the internal user?
I also meant in terms of UI setting name, instead of saying APMDebug queries, we can say Observability Debug queries. That way i don't want to add another checkbox there with Uptime Debug queries or User Experience debug quries. |
|
does this still logs to kibana logs? |
Makes sense. I've updated the setting description to not mention APM.
Yes, nothing changes there. |
e98bf85 to
39b6572
Compare
Good idea, will add that |
shahzad31
left a comment
There was a problem hiding this comment.
Code Changes LGTM for UX and Uptime !!
4b7b88d to
be064b6
Compare
ts fixes Fix APIs to always return objects minor fixes use beaker icon update copy move setting to observability Rename `_debug` to `_inspect` fix api tests disallow empty responses rename test fix i18n WIP fix param type check fix remaining tests minor improvements Fix jest Add api test for inspect flag Fix tsc Fix jest tests Fix tsc issues
152c41e to
1b9def7
Compare
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
In elastic/kibana#95146 the response structure for listing APM agent central config changed. Update system tests to match.
* tests/system: adapt to new API response In elastic/kibana#95146 the response structure for listing APM agent central config changed. Update system tests to match. * tests/system: add user_agent.device.type elastic/elasticsearch#69322 added support for extracting device types to the user_agent ingest processors. Update approvals to match.
* tests/system: adapt to new API response In elastic/kibana#95146 the response structure for listing APM agent central config changed. Update system tests to match. * tests/system: add user_agent.device.type elastic/elasticsearch#69322 added support for extracting device types to the user_agent ingest processors. Update approvals to match. (cherry picked from commit 0e09aa6)
* tests/system: fix system tests (#5037) * tests/system: adapt to new API response In elastic/kibana#95146 the response structure for listing APM agent central config changed. Update system tests to match. * tests/system: add user_agent.device.type elastic/elasticsearch#69322 added support for extracting device types to the user_agent ingest processors. Update approvals to match. (cherry picked from commit 0e09aa6) * user_agent.device.type isn't in 7.x yet * make update * systemtest: revert approvals changes Co-authored-by: Andrew Wilkins <axw@elastic.co> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
tests ok |
* tests/system: adapt to new API response In elastic/kibana#95146 the response structure for listing APM agent central config changed. Update system tests to match. * tests/system: add user_agent.device.type elastic/elasticsearch#69322 added support for extracting device types to the user_agent ingest processors. Update approvals to match.
This PR appends elasticsearch queries to the response to allow the end user to inspect them.
Noteworthy changes:
_debug=truequery param has been renamed to_inspect=true. In addition to logging elasticsearch queries in the node process, they will also be send to the client as part of the api response. Only queries authenticated as the end user will be send to the client due to security concerns.sessionStorage.set('apm_debug', 'true')has been replaced with a setting in Kibana Advanced SettingsDebug mode is disabled by default but can be enabled in Advanced Settings

When debug mode is enabled a callout will make the user aware of this

When debug mode all API requests will contain

_debugQueries