Profiling: Add Phlare and Parca datasources (#57809)
* Add phlare datasource * Rename * Add parca * Add self field to parca * Make sure phlare works with add to dashboard flow * Add profiling category and hide behind feature flag * Update description and logos * Update phlare icon * Cleanup logging * Clean up logging * Fix for shift+enter * onRunQuery to set label * Update type naming * Fix lint * Fix test and quality issues Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
This commit is contained in:
co-authored by
Joey Tawadrous
parent
1d53a6f57e
commit
0845ac2f53
@@ -19,6 +19,8 @@ import (
|
||||
"github.com/grafana/grafana/pkg/tsdb/mssql"
|
||||
"github.com/grafana/grafana/pkg/tsdb/mysql"
|
||||
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
|
||||
"github.com/grafana/grafana/pkg/tsdb/parca"
|
||||
"github.com/grafana/grafana/pkg/tsdb/phlare"
|
||||
"github.com/grafana/grafana/pkg/tsdb/postgres"
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus"
|
||||
"github.com/grafana/grafana/pkg/tsdb/tempo"
|
||||
@@ -41,6 +43,8 @@ const (
|
||||
MySQL = "mysql"
|
||||
MSSQL = "mssql"
|
||||
Grafana = "grafana"
|
||||
Phlare = "phlare"
|
||||
Parca = "parca"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -62,7 +66,7 @@ func NewRegistry(store map[string]backendplugin.PluginFactoryFunc) *Registry {
|
||||
func ProvideCoreRegistry(am *azuremonitor.Service, cw *cloudwatch.CloudWatchService, cm *cloudmonitoring.Service,
|
||||
es *elasticsearch.Service, grap *graphite.Service, idb *influxdb.Service, lk *loki.Service, otsdb *opentsdb.Service,
|
||||
pr *prometheus.Service, t *tempo.Service, td *testdatasource.Service, pg *postgres.Service, my *mysql.Service,
|
||||
ms *mssql.Service, graf *grafanads.Service) *Registry {
|
||||
ms *mssql.Service, graf *grafanads.Service, phlare *phlare.Service, parca *parca.Service) *Registry {
|
||||
return NewRegistry(map[string]backendplugin.PluginFactoryFunc{
|
||||
CloudWatch: asBackendPlugin(cw.Executor),
|
||||
CloudMonitoring: asBackendPlugin(cm),
|
||||
@@ -79,6 +83,8 @@ func ProvideCoreRegistry(am *azuremonitor.Service, cw *cloudwatch.CloudWatchServ
|
||||
MySQL: asBackendPlugin(my),
|
||||
MSSQL: asBackendPlugin(ms),
|
||||
Grafana: asBackendPlugin(graf),
|
||||
Phlare: asBackendPlugin(phlare),
|
||||
Parca: asBackendPlugin(parca),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
"github.com/grafana/grafana-azure-sdk-go/azsettings"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
||||
"github.com/grafana/grafana/pkg/tsdb/parca"
|
||||
"github.com/grafana/grafana/pkg/tsdb/phlare"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
@@ -97,8 +99,10 @@ func TestIntegrationPluginManager(t *testing.T) {
|
||||
ms := mssql.ProvideService(cfg)
|
||||
sv2 := searchV2.ProvideService(cfg, db.InitTestDB(t), nil, nil, tracer, features, nil, nil, nil)
|
||||
graf := grafanads.ProvideService(sv2, nil)
|
||||
phlare := phlare.ProvideService(hcp)
|
||||
parca := parca.ProvideService(hcp)
|
||||
|
||||
coreRegistry := coreplugin.ProvideCoreRegistry(am, cw, cm, es, grap, idb, lk, otsdb, pr, tmpo, td, pg, my, ms, graf)
|
||||
coreRegistry := coreplugin.ProvideCoreRegistry(am, cw, cm, es, grap, idb, lk, otsdb, pr, tmpo, td, pg, my, ms, graf, phlare, parca)
|
||||
|
||||
pCfg := config.ProvideConfig(setting.ProvideProvider(cfg), cfg)
|
||||
reg := registry.ProvideService()
|
||||
@@ -200,6 +204,8 @@ func verifyCorePluginCatalogue(t *testing.T, ctx context.Context, ps *store.Serv
|
||||
"jaeger": {},
|
||||
"mixed": {},
|
||||
"zipkin": {},
|
||||
"phlare": {},
|
||||
"parca": {},
|
||||
}
|
||||
|
||||
expApps := map[string]struct{}{
|
||||
|
||||
@@ -53,6 +53,8 @@ func coreTreeList(rt *thema.Runtime) pfs.TreeList {
|
||||
makeTreeOrPanic("public/app/plugins/datasource/loki", "loki", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/mssql", "mssql", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/mysql", "mysql", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/parca", "parca", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/phlare", "phlare", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/postgres", "postgres", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/prometheus", "prometheus", rt),
|
||||
makeTreeOrPanic("public/app/plugins/datasource/tempo", "tempo", rt),
|
||||
|
||||
Reference in New Issue
Block a user