Commit Graph

39 Commits

Author SHA1 Message Date
Andre Pereira
c1709c9301
Tempo: TraceQL query response streaming (#69212)
* Refactor Tempo datasource backend to support multiple queryData types.
Added traceId query type that is set when performing the request but doesn't map to a tab.

* WIP data is reaching the frontend

* WIP

* Use channels and goroutines

* Some fixes

* Simplify backend code.
Return traces, metrics, state and error in a dataframe.
Shared state type between FE and BE.
Use getStream() instead of getQueryData()

* Handle errors in frontend

* Update Tempo and use same URL for RPC and HTTP

* Cleanup backend code

* Merge main

* Create grpc client only with host and authenticate

* Create grpc client only with host and authenticate

* Cleanup

* Add streaming to TraceQL Search tab

* Fix merge conflicts

* Added tests for processStream

* make gen-cue

* make gen-cue

* goimports

* lint

* Cleanup go.mod

* Comments

* Addressing PR comments

* Fix streaming for tracel search tab

* Added streaming kill switch as the disableTraceQLStreaming feature toggle

* Small comment

* Fix conflicts

* Correctly capture and send all errors as a DF to client

* Fix infinite error loop

* Fix merge conflicts

* Fix test

* Update deprecated import

* Fix feature toggles gen

* Fix merge conflicts
2023-07-14 15:10:46 +01:00
Jo
45fde4235b
Deps: Replace go-jose v2 with go-jose v3 (#64228)
replace go-jose v2 with go-jose v3
2023-03-06 15:12:51 +01:00
Emil Tullstedt
10ee900beb
Errors: Remove direct dependencies on github.com/pkg/errors (#64026)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-03-02 16:28:10 +01:00
gotjosh
178f290f0c
Update dskit to the latest main (#62616)
* Update dskit to the latest main

* Break free from a cortex depedency
2023-01-31 19:05:49 +00:00
Emil Tullstedt
a14ca8fb62
Dependencies: Clean up gofrs/uuid (#51615)
* Dependencies: switch from gofrs/uuid to google/uuid

Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-30 10:55:33 -08:00
Emil Tullstedt
b45c71c9ca
Loki: Create component for sending logs to Loki (#51500) 2022-06-30 10:24:44 +02:00
Jguer
8126331f66
Update cron library for ldap sync (#47983)
* ldap: update cron library

* Update docs/sources/enterprise/enhanced_ldap.md
2022-04-26 14:14:48 +02:00
Joan López de la Franca Beltran
2c2cf10405
Azure: Update Azure SDK dependencies (#46535)
* Azure: Update Azure SDK dependencies

* Add missing underscore imports for extensions
2022-04-06 10:19:04 +02:00
Emil Tullstedt
df4e9ca12b
Datemath: Support fiscal years (#43558) 2022-01-04 13:56:34 +01:00
Tania B
c1be17bec7
Chore: Add Google Cloud KMS dependency (#43211)
* Encryption: Add Google Cloud KMS dependency

* Change version
2021-12-21 14:15:27 +02:00
Selene
a3b9c764d3
Encryption: Add Azure key vault dependency (#41353)
* Add Azure key vault dependency

* Fix go.mod

Co-authored-by: Leonard Gram <leo@xlson.com>
2021-11-09 19:33:54 +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
Travis Patterson
00709ec1db
Add prometheus remote client (#37755) 2021-08-13 10:44:56 -06:00
Owen Diehl
e4d3161690
revendors loki & alertmanager (#33534)
* revendors loki

* revendors alertmanager
2021-04-29 18:29:42 +01:00
Joan López de la Franca Beltran
c41b08bd59
Settings: Encapsulate settings within an extensible provider (#32219)
* Encapsulate settings with a provider with support for runtime reloads

* SettingsProvider: reload is controlled by the services

* naive impl of reload handlers for settings

* working naive detection on new changes

* Trigger settings reload from API endpoint

* validation step added

* validation of settings

* Fix linting errors

* Replace DB_Varchar by DB_NVarchar

* Reduce settings columns (section, key) lenghts

* wip db update logic

* Db Settings: separate updates and removals

* Fix: removes incorrectly added code

* Minor code improvements

* Runtime settings: moved oss -> ee

* Remove no longer used setting.Cfg SAML-related fields

* Rename file setting/settings.go => setting/provider.go

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Minor code improvements on OSS settings provider

* Fix some login API tests

* Correct some GoDoc comments

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-04-28 11:26:58 +02:00
Alexander Zobnin
823f0bc460
Access Control: move features to Enterprise (#32640)
* Move db package WIP

* Implement OSS access control

* Register OSS access control

* Fix linter error in tests

* Fix linter error in evaluator

* Simplify OSS tests

* Optimize builtin roles

* Chore: add comments to the exported functions

* Remove init from ossaccesscontrol package (moved to ext)

* Add access control as a dependency for http server

* Modify middleware to receive fallback function

* Middleware: refactor fallback function call

* Move unused models to enterprise

* Simplify AccessControl type

* Chore: use bool IsDisabled() method instead of CanBeDisabled interface
2021-04-06 16:49:09 +03:00
Joan López de la Franca Beltran
15676baa4b
Enterprise: Add missing Loki dependency (#32265) 2021-03-23 19:08:31 +01:00
Joan López de la Franca Beltran
6415d2802e
Plugins: Requests validator (#30445)
* Introduce PluginRequestValidator abstraction with a NoOp implementation

* Update PluginRequestValidator abstraction to use the dsURL instead

* Inject PluginRequestValidator into the HTTPServer and validate requests going through data source proxy

* Inject PluginRequestValidator into the BackendPluginManager and validate requests going through it

* Validate requests going through QueryMetrics & QueryMetricsV2

* Validate BackendPluginManager health requests

* Fix backend plugins manager tests

* Validate requests going through alerting service

* Fix tests

* fix tests

* goimports

Co-authored-by: Leonard Gram <leo@xlson.com>
2021-02-03 20:47:45 +01:00
Joan López de la Franca Beltran
67ea8758a0
Chore: Add Enterprise dependencies (#29994)
* Docs: update auditing docs

* Chore: Add Enterprise dependencies

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-12-29 16:37:20 +01:00
Carl Bergquist
609d61dece
Adds go dep used by an Enterprise feature. (#29645)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2020-12-08 16:22:24 +01:00
Alexander Zobnin
b55a51e270
SAML Single Logout (#27995)
* SAML: single logout WIP

* SAML: sign SAML requests

* SAML: remove unnecessary logs

* fix go mod file

* Docs: Single Logout

* SAML: use api endpoint for single logout

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* SAML: save context for single logout

* Chore: add SAML dependencies

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-08 17:42:55 +03:00
Joan López de la Franca Beltran
57b2d08755
Core: Add go-grpc-middleware dependency (#27231) 2020-08-28 15:33:21 +02:00
Joan López de la Franca Beltran
c91bfd8299
Core: Add loki/logproto dependency (#27124)
* Add grafana/loki dependency and update its dependencies

* Update grpcplugin log_wrapper to implement the latest version of hclog.Logger

* Remove panic handling + test case no longer needed since the source of panics (bug) was fixed
2020-08-25 11:52:21 +02:00
Agnès Toulet
f63877f247
Core: Add go-datemath library (#22978) 2020-03-26 10:26:47 +01:00
Emil Tullstedt
29687903f8
Admin: Add promotional page for Grafana Enterprise (#21422)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-01-15 14:50:44 +01:00
Emil Tullstedt
fe8b533497
Modules: Add patched goavro dependency for extensions (#21027) 2019-12-11 14:44:29 +01:00
Emil Tullstedt
30771f25bf
Revert "Modules: Add goavro dependency for extensions (#20920)" (#20928)
Goavro doesn't compile on 32-bit systems.

This reverts commit 413be3a6a0.
2019-12-06 14:10:07 +01:00
Emil Tullstedt
413be3a6a0
Modules: Add goavro dependency for extensions (#20920) 2019-12-06 10:33:19 +01:00
Leonard Gram
30775a3f49
Build: adds the pkg/errors dependency that was missing from go.mod (#20143)
This dependency was added a while back and exists in the vendor
directory but was never properly added to go.mod.
2019-11-01 16:54:44 +01: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
Oleg Gaidarenko
1a4be4af8c
Enterprise: add dependencies for upcoming features (#18793)
* Enterprise: add dependencies for upcoming features

See enterprise issues
2019-08-30 18:14:32 +02:00
gotjosh
e6b8a1529b
SAML: Configuration defaults, examples and dependencies (#17954)
* Add SAML configuration options

* Add crewjam/saml as a depdency

Needed as part of the enterprise SAML integration.

* Vendor github.com/stretchr/testify/require

The package require implements the same assertions as the `assert` package but stops test execution when a test fails.
2019-07-05 11:27:14 +01:00
Oleg Gaidarenko
d4ef19737e
Enterprise: remove gofakeit dep (#17344)
* Enterprise: remove gofakeit dep

Since we decided to use our uuid generation inside util module

* Enterprise: result of execution of `go mod ...`
2019-05-29 15:55:51 +03:00
Oleg Gaidarenko
35f227de11
Feature: LDAP refactoring (#16950)
* incapsulates multipleldap logic under one module

* abstracts users upsert and get logic

* changes some of the text error messages and import sort sequence

* heavily refactors the LDAP module – LDAP module now only deals with LDAP related behaviour

* integrates affected auth_proxy module and their tests

* refactoring of the auth_proxy logic
2019-05-17 14:57:26 +03:00
Oleg Gaidarenko
62b85a886e
LDAP Refactoring to support syncronizing more than one user at a time. (#16705)
* Feature: add cron setting for the ldap settings

* Move ldap configuration read to special function

* Introduce cron setting (no docs for it yet, pending approval)

* Chore: duplicate ldap module as a service

* Feature: implement active sync

This is very early preliminary implementation of active sync.
There is only one thing that's going right for this code - it works.

Aside from that, there is no tests, error handling, docs, transactions,
it's very much duplicative and etc.

But this is the overall direction with architecture I'm going for

* Chore: introduce login service

* Chore: gradually switch to ldap service

* Chore: use new approach for auth_proxy

* Chore: use new approach along with refactoring

* Chore: use new ldap interface for auth_proxy

* Chore: improve auth_proxy and subsequently ldap

* Chore: more of the refactoring bits

* Chore: address comments from code review

* Chore: more refactoring stuff

* Chore: make linter happy

* Chore: add cron dep for grafana enterprise

* Chore: initialize config package var

* Chore: disable gosec for now

* Chore: update dependencies

* Chore: remove unused module

* Chore: address review comments

* Chore: make linter happy
2019-04-26 15:47:16 +03:00
Torkel Ödegaard
75f9adf44f
Build: adding dependency used by extensions (#16622) 2019-04-16 15:26:39 +02:00
Dan Cech
d20b15834f
add gopkg.in/square/go-jose.v2 to dependencies, update github.com/hashicorp/yamux 2018-10-08 17:11:24 -04:00
Torkel Ödegaard
b8724ae0c4
refactoring: enterprise build/hooks refactorings (#12478) 2018-07-02 04:33:39 -07:00
Carl Bergquist
28f7b6dad1 Enable Grafana extensions at build time. (#11752)
* extensions: import and build

* bus: use predefined error

* enterprise: build script for enterprise packages

* poc: auto registering services and dependency injection

(cherry picked from commit b5b1ef875f905473af41e49f8071cb9028edc845)

* poc: backend services registry progress

(cherry picked from commit 97be69725881241bfbf1e7adf0e66801d6b0af3d)

* poc: minor update

(cherry picked from commit 03d7a6888b81403f458b94305792e075568f0794)

* ioc: introduce manuel ioc

* enterprise: adds setting for enterprise

* build: test and build specific ee commit

* cleanup: test testing code

* removes example hello service
2018-04-27 13:41:58 +02:00