[Telemetry] Server side fetcher#50015
Merged
Bamieh merged 64 commits intoelastic:masterfrom Nov 13, 2019
Merged
Conversation
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
|
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
justinkambic
reviewed
Nov 6, 2019
Contributor
justinkambic
left a comment
There was a problem hiding this comment.
From my side, this doesn't break the functionality my previous changes to some of this code fixed, so I am OK. I'm not going to approve because I didn't perform a full code review, but I am happy to help in that regard if needed.
Thank you for keeping me in the loop.
Contributor
💔 Build Failed |
Contributor
Author
|
@elasticmachine merge upstream |
…nto telemetry/server_fetcher
gmmorris
approved these changes
Nov 12, 2019
Contributor
gmmorris
left a comment
There was a problem hiding this comment.
LGTM, thanks for running through the changes with me
Contributor
💔 Build Failed |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💔 Build Failed |
Contributor
💚 Build Succeeded |
This was referenced Nov 13, 2019
Bamieh
added a commit
to Bamieh/kibana
that referenced
this pull request
Nov 13, 2019
* initial push * self code review * ignore node-fetch type * usageFetcher api * user agent metric * telemetry plugin collector * remove extra unused method * remove unused import * type check * fix collections tests * pass kfetch as dep * add ui metrics integration test for user agent * dont start ui metrics when not authenticated * user agent count always 1 * fix broken ui-metric integration tests * try using config.get * avoid fetching configs if sending * type unknown -> string * check if fetcher is causing the issue * disable ui_metric from functional tests * enable ui_metric back again * ignore keyword above 256 * check requesting app first * clean up after all the debugging :) * fix tests * always return 200 for ui metric reporting * remove boom import * logout after removing role/user * undo some changes in tests * inside try catch * prevent potential race conditions in priorities with = * use snake_case for telemetry plugin collection * usageFetcher -> sendUsageFrom * more replacements * remove extra unused route * config() -> config * Update src/legacy/core_plugins/telemetry/index.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * Update src/legacy/core_plugins/ui_metric/server/routes/api/ui_metric.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * config() -> config * fix SO update logic given the current changes * fix opt in check * triple check * check for non boolean * take into account older settings * import TelemetryOptInProvider * update test case
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Nov 13, 2019
* upstream/master: Remove internal platform types exports (elastic#50427) [APM] Document `apm_oss.metricsIndices` and `apm_oss.sourcemap… (elastic#50312) [Telemetry] Server side fetcher (elastic#50015) [SIEM] Detection engine placeholders (elastic#50220) [Uptime] Donut chart loader position centered vertically (elastic#50219) update telemetry banner notice text (elastic#50403) Fix aborting when searching without batching (elastic#49966) [Telemetry] Remove telemetry splash page and add conditional messaging (elastic#50189) Revert chromedriver update (elastic#50324) Remove deprecated argument include_type_name from ES calls (elastic#50285) [Maps] add settings to maps telemetry (elastic#50161) remove visualize loader (elastic#46910) Fix misuse of react-router and react-router-dom (elastic#50120)
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Nov 13, 2019
…-fallback * 'master' of github.com:elastic/kibana: Remove internal platform types exports (elastic#50427) [APM] Document `apm_oss.metricsIndices` and `apm_oss.sourcemap… (elastic#50312) [Telemetry] Server side fetcher (elastic#50015) [SIEM] Detection engine placeholders (elastic#50220) [Uptime] Donut chart loader position centered vertically (elastic#50219) update telemetry banner notice text (elastic#50403) Fix aborting when searching without batching (elastic#49966) [Telemetry] Remove telemetry splash page and add conditional messaging (elastic#50189) Revert chromedriver update (elastic#50324) Remove deprecated argument include_type_name from ES calls (elastic#50285) [Maps] add settings to maps telemetry (elastic#50161) remove visualize loader (elastic#46910) Fix misuse of react-router and react-router-dom (elastic#50120) Move table-list-view to kibana-react (elastic#50046) [ML] Stats bar for data frame analytics (elastic#49464)
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Nov 13, 2019
…ger-ace-theme * 'master' of github.com:elastic/kibana: (56 commits) [ML] Server info service refactor (elastic#50302) Remove internal platform types exports (elastic#50427) [APM] Document `apm_oss.metricsIndices` and `apm_oss.sourcemap… (elastic#50312) [Telemetry] Server side fetcher (elastic#50015) [SIEM] Detection engine placeholders (elastic#50220) [Uptime] Donut chart loader position centered vertically (elastic#50219) update telemetry banner notice text (elastic#50403) Fix aborting when searching without batching (elastic#49966) [Telemetry] Remove telemetry splash page and add conditional messaging (elastic#50189) Revert chromedriver update (elastic#50324) Remove deprecated argument include_type_name from ES calls (elastic#50285) [Maps] add settings to maps telemetry (elastic#50161) remove visualize loader (elastic#46910) Fix misuse of react-router and react-router-dom (elastic#50120) Move table-list-view to kibana-react (elastic#50046) [ML] Stats bar for data frame analytics (elastic#49464) [ML] Make navigation in tests more stable (elastic#50132) Migrate authorization subsystem to the new platform. (elastic#46145) Bugfix: Interpreter conversion of string to number should throw on NaN elastic#27788 (elastic#50063) Update dependency @elastic/charts to v14 (elastic#49947) ...
mikecote
pushed a commit
that referenced
this pull request
Nov 13, 2019
* initial push * self code review * ignore node-fetch type * usageFetcher api * user agent metric * telemetry plugin collector * remove extra unused method * remove unused import * type check * fix collections tests * pass kfetch as dep * add ui metrics integration test for user agent * dont start ui metrics when not authenticated * user agent count always 1 * fix broken ui-metric integration tests * try using config.get * avoid fetching configs if sending * type unknown -> string * check if fetcher is causing the issue * disable ui_metric from functional tests * enable ui_metric back again * ignore keyword above 256 * check requesting app first * clean up after all the debugging :) * fix tests * always return 200 for ui metric reporting * remove boom import * logout after removing role/user * undo some changes in tests * inside try catch * prevent potential race conditions in priorities with = * use snake_case for telemetry plugin collection * usageFetcher -> sendUsageFrom * more replacements * remove extra unused route * config() -> config * Update src/legacy/core_plugins/telemetry/index.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * Update src/legacy/core_plugins/ui_metric/server/routes/api/ui_metric.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * config() -> config * fix SO update logic given the current changes * fix opt in check * triple check * check for non boolean * take into account older settings * import TelemetryOptInProvider * update test case
mikecote
pushed a commit
that referenced
this pull request
Nov 13, 2019
* initial push * self code review * ignore node-fetch type * usageFetcher api * user agent metric * telemetry plugin collector * remove extra unused method * remove unused import * type check * fix collections tests * pass kfetch as dep * add ui metrics integration test for user agent * dont start ui metrics when not authenticated * user agent count always 1 * fix broken ui-metric integration tests * try using config.get * avoid fetching configs if sending * type unknown -> string * check if fetcher is causing the issue * disable ui_metric from functional tests * enable ui_metric back again * ignore keyword above 256 * check requesting app first * clean up after all the debugging :) * fix tests * always return 200 for ui metric reporting * remove boom import * logout after removing role/user * undo some changes in tests * inside try catch * prevent potential race conditions in priorities with = * use snake_case for telemetry plugin collection * usageFetcher -> sendUsageFrom * more replacements * remove extra unused route * config() -> config * Update src/legacy/core_plugins/telemetry/index.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * Update src/legacy/core_plugins/ui_metric/server/routes/api/ui_metric.ts Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com> * config() -> config * fix SO update logic given the current changes * fix opt in check * triple check * check for non boolean * take into account older settings * import TelemetryOptInProvider * update test case
tsullivan
reviewed
Nov 13, 2019
|
|
||
| export const trackUserAgent = (appName: string) => { | ||
| if (telemetryReporter) { | ||
| return telemetryReporter.reportUserAgent(appName); |
Member
Member
There was a problem hiding this comment.
As a note, this was caused by someone not running bootstrap
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Details:
This PR mainly adds server side fetcher. A few refactoring + features where needed to fully accommodate this change.
Adds server fetcher feature (Closes [Telemetry] server side fetcher #49711)
Allows telemetry to be fetched from the server instead of the browser if this kibana.yml config is set:
Currently this config accepts
serverandbrowser; in the future we might be adding abeatoption.This telemetry config, like
optIncan be overriden via saved objects. The reason behind this is to allow configuring this without restaring kibana.Adds telemetry for telemetry (Closes Add telemetry for telemetry #50013) This currently reports:
Added user-agent tracking under ui metrics:
tests for all telemetry configs
ui metric use
kfetchinstead of$httpto hide the loading bar when sending ui metrics usage to kibana server and to solvehttps://github.com/elastic/kibana/pull/49671(CC @justinkambic @epixa ).refactor configs overriding in the telemetry saved object by adding a
repositoryfile to get/update saved objetcts. (Helps resolving *yml* based setting to ship telemetry (and disable the UI to opt out) #49751 (comment))Notes
Added server fetcher feature to send telemetry from kibana server instead of browser under the flag
telemetry.usageFetcher: server.Introduced a new telemetry collector for the telemetry plugin which includes opt-in status, last report, and the type of fetcher the user is using.
Introduced user-agent tracking in ui-metrics to prevent losing this information if telemetry is sent from the server.
Replaced
$httpfetcher withkfetchas it$httpshows a loader whenever we are sending telemetry from the browser. Finally Added arepositoryfeature in telemetry to allow overriding configs via saved objects.