Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
Sofia Papagiannaki
afb59af79b
Usage stats: Tune collector execution startup and interval ( #72688 )
...
* Do not update statistics at service collector startup
* Configurable collector interval
* Introduce initial random delay
* Prevent reporting metrics until the stats have been collected
* Apply suggestion from code review
2023-08-03 11:01:44 +03:00
Andres Martinez Gotor
10adb1ff66
Chore: Split usagestats service ( #65191 )
2023-03-23 19:19:19 +02:00
idafurjes
725dbf8d95
Chore: Add context to datasource service ( #42294 )
...
* Add context to datasource service
* Adjust wire for ShouldBeReported method
* Replace inTransactionCtx
2021-11-26 18:10:36 +01:00
idafurjes
9340430723
Chore: Add alert ctx ( #41161 )
...
* Add context for alert
* Remove context.TODO
* Remove xorm
* Remove context.TODO
* Fix UsageStatsQuerier interface
2021-11-03 14:10:39 +01:00
Tania B
b9acdce837
Chore: Fix grafana live stats reset when sending usage stats ( #39558 )
2021-09-23 12:55:00 +03:00
Joan López de la Franca Beltran
a680162792
Usage Stats: Split domain & service packages ( #39488 )
2021-09-21 20:50:37 +02:00
Dan Cech
f8ae71af5b
Usage Stats Updates ( #39235 )
...
* add randomly-generated anonymous id to usage reports
* include uptime in stats
* add last_sent tracking, remove metricsLogger
2021-09-15 11:47:44 -04:00
Torkel Ödegaard
51776e6bd3
UsageStats: Add connected users and client ( #38811 )
2021-09-07 18:50:28 +02:00
Arve Knudsen
78596a6756
Migrate to Wire for dependency injection ( #32289 )
...
Fixes #30144
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00
Karl Persson
4127db3d3a
Remove Licensing as dependency of UsageStats ( #37259 )
...
* Remove Licensing as dependency
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-07-27 17:19:03 +02:00
Joan López de la Franca Beltran
d9e500b654
UsageStats: Expose what ds types should be reported ( #35916 )
2021-07-07 23:12:00 +02:00
idafurjes
60ac54d969
Chore: Refactor OAuth/social package to service ( #35403 )
...
* Creating SocialService
* Add GetOAuthProviders as socialService method
* Add OAuthTokenService
* Add GetOAuthHttpClient method to SocialService
* Rename services, access socialMap from GetConnector
* Fix tests by mocking oauthtoken methods
* Move NewAuthService into Init
* Move OAuthService to social pkg
* Refactor OAuthService to OAuthProvider
* Fix nil map error, rename file, simplify tests
* Fix bug for Forward OAuth Identify
* Remove file after rebase
2021-07-07 08:54:17 +02:00
Joan López de la Franca Beltran
f601921670
Usage Stats: Make the UsageStatsService extension point more flexible ( #34778 )
...
* Usage Stats: Rename service to use a more idiomatic name
* Usage Stats: Update MetricsFunc definition and implementations
* Revert "Usage Stats: Rename service to use a more idiomatic name"
This reverts commit 910ecce3e8
.
* Usage Stats: Update MetricsFunc definition and implementations
2021-05-27 10:53:10 +02:00
Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global ( #31866 )
...
* PluginManager: Make Plugins and DataSources non-global
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Replace outdated command
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove FocusConvey
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo interface changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Rename to DataSourceCount
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Consolidate dashboard interfaces into one
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix dashboard integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Arve Knudsen
04e9f6c24f
UsageStatsService: Don't use global state ( #31849 )
...
* UsageStatsService: Don't use global state
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-10 10:14:00 +01:00
Arve Knudsen
fc9381744a
UsageStatsService: Make initialization more robust ( #31761 )
...
* UsageStatsService: Make initialization more robust
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-08 10:33:20 +01:00
Emil Tullstedt
a87dd17501
UsageStats: Purpose named variables ( #31264 )
2021-02-17 10:19:27 +01:00
Carl Bergquist
b5cbbc3db1
only update usagestats every 30min ( #31131 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-02-17 09:10:36 +01:00
Vardan Torosyan
7ff37bc6bb
Usage Stats: Calculate concurrent users as a histogram ( #30006 )
...
Usage Stats: Calculate concurrent users as a histogram
Metric will help to understand if users are sharing their credentials or using one account for concurrent sessions. This will help to make more informed decisions when enforcing any license limitations on credentials usage.
2021-01-06 16:57:31 +01:00
Vardan Torosyan
de22374751
Usage Stats: Introduce an interface for usage stats service ( #29882 )
...
Adding an interface type for usage stats service allows us to not depend on the implementation outside of the package, for example when testing we can easily mock the service
2020-12-16 16:12:02 +01:00
Vardan Torosyan
fac34f65c9
Usage Stats: Allow to add additional metrics to the stats ( #29774 )
...
The change allows to add external, additional metrics which will be reported with the rest of hardcoded metrics, allowing to add metrics without a need to change the service itself.
2020-12-16 12:44:33 +01:00
Arve Knudsen
c2cad26ca9
Chore: Disable default golangci-lint filter ( #29751 )
...
* Disable default golangci-lint filter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix linter warnings
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 09:32:06 +01:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming ( #28887 )
...
* Chore: Fix variable naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
Dan Cech
53153c82fc
add method to get usage report ( #27555 )
2020-09-15 09:01:15 -04:00
Carl Bergquist
15bff3114f
Usagestats: Add usage stats about what type of datasource is used in alerting. ( #23125 )
2020-04-02 08:45:04 +02:00
Leonard Gram
992b4b8adf
Licensing service ( #19903 )
...
* Licensing: supplies a service to handle licensing information
* Licensing: uses the license service further
Uses the license service instead of settings.isEnterprise:
- external team members
- saml
- usage stats
* Licensing: fixes broken tests due to new Licensing service dependency
* Licensing: fixes linting errors
* Licensing: exposes license expiry information to the frontend
2019-11-01 14:56:12 +01:00
zhulongcheng
2fff8f77dc
move log package to /infra ( #17023 )
...
ref #14679
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00
bergquist
60fef31748
moves social package to /login
...
ref #14679
2019-02-25 15:30:40 +01:00
bergquist
2be60887ca
adds usage stats for sessions
2019-02-07 16:27:40 +01:00
bergquist
6e7941d396
moves usage stats sender to new package
2019-02-07 14:59:50 +01:00