-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Telemetry] Server side fetcher #50015
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
Merged
Merged
Changes from 41 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
4860e53
initial push
Bamieh d7f7f60
self code review
Bamieh 27d6b67
ignore node-fetch type
Bamieh 0037d75
usageFetcher api
Bamieh 4436f3f
user agent metric
Bamieh 2715b43
merge master + add tests
Bamieh e0c10b6
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 0815769
telemetry plugin collector
Bamieh df1f45f
remove extra unused method
Bamieh dae375a
remove unused import
Bamieh 01cfc26
type check
Bamieh b58d029
fix collections tests
Bamieh 16c8e1d
pass kfetch as dep
Bamieh 78d4d88
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 873640f
add ui metrics integration test for user agent
Bamieh 5fcd303
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh c1926ac
dont start ui metrics when not authenticated
Bamieh 5a62e7d
user agent count always 1
Bamieh 64056ea
fix broken ui-metric integration tests
Bamieh e51c642
try using config.get
Bamieh f648bb9
avoid fetching configs if sending
Bamieh e394a78
type unknown -> string
Bamieh 5818d94
check if fetcher is causing the issue
Bamieh 120b832
disable ui_metric from functional tests
Bamieh c757cb5
enable ui_metric back again
Bamieh 087ad8e
ignore keyword above 256
Bamieh 076b06c
check requesting app first
Bamieh b954daa
clean up after all the debugging :)
Bamieh e5967de
fix tests
Bamieh 7f7b7cc
always return 200 for ui metric reporting
Bamieh 4cb7da9
remove boom import
Bamieh f8ab109
logout after removing role/user
Bamieh 0db44f2
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 993fcd7
undo some changes in tests
Bamieh 88c8fae
inside try catch
Bamieh 8b0692f
prevent potential race conditions in priorities with =
Bamieh 9a0740c
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 612252a
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 176ac34
use snake_case for telemetry plugin collection
Bamieh c72efcf
Merge branch 'master' into telemetry/server_fetcher
elasticmachine b768d19
Merge branch 'master' into telemetry/server_fetcher
elasticmachine f34101e
merge master + work on code review feedback + allowChangingOptInStatu…
Bamieh bb1e6d5
Merge branch 'telemetry/server_fetcher' of github.com:Bamieh/kibana i…
Bamieh 495fc81
usageFetcher -> sendUsageFrom
Bamieh 832841a
more replacements
Bamieh 3956c1f
remove extra unused route
Bamieh 925c3e4
config() -> config
Bamieh 703f1f3
Update src/legacy/core_plugins/telemetry/index.ts
Bamieh ec4dabf
Update src/legacy/core_plugins/ui_metric/server/routes/api/ui_metric.ts
Bamieh 17e4318
config() -> config
Bamieh 2c1aff7
Merge branch 'telemetry/server_fetcher' of github.com:Bamieh/kibana i…
Bamieh 29a6a67
fix SO update logic given the current changes
Bamieh 944599a
fix opt in check
Bamieh 4527308
triple check
Bamieh 62f65ea
check for non boolean
Bamieh c70becc
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh 73bcafd
Merge branch 'master' into telemetry/server_fetcher
elasticmachine cd0730e
take into account older settings
Bamieh 1fbcd73
Merge branch 'telemetry/server_fetcher' of github.com:Bamieh/kibana i…
Bamieh 88f1b73
import TelemetryOptInProvider
Bamieh 3961073
Merge branch 'master' into telemetry/server_fetcher
elasticmachine 2c12688
update test case
Bamieh d88e765
Merge branch 'telemetry/server_fetcher' of github.com:Bamieh/kibana i…
Bamieh 6a077d3
Merge branch 'master' of github.com:elastic/kibana into telemetry/ser…
Bamieh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| import { METRIC_TYPE } from './'; | ||
|
|
||
| export interface UserAgentMetric { | ||
| type: METRIC_TYPE.USER_AGENT; | ||
| appName: string; | ||
| userAgent: string; | ||
| } | ||
|
|
||
| export function trackUsageAgent(appName: string): UserAgentMetric { | ||
| const userAgent = | ||
| window && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : ''; | ||
| return { | ||
| type: METRIC_TYPE.USER_AGENT, | ||
| appName, | ||
| userAgent, | ||
| }; | ||
| } | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.