FEMT: Basic frontend-service implementation (#104229)

* create the most basic frontend-server module

* expose prom metrics??

* add todo list

* move frontend-service to its own folder in services

* check error from writer.Write

* reword comment, add launch config
This commit is contained in:
Josh Hunt
2025-04-24 13:14:21 +01:00
committed by GitHub
parent 8e6b8fad01
commit a8aa6b74a8
5 changed files with 128 additions and 1 deletions
+6 -1
View File
@@ -15,6 +15,7 @@ import (
"github.com/grafana/grafana/pkg/modules"
"github.com/grafana/grafana/pkg/services/authz"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/frontend"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/storage/unified/resource"
"github.com/grafana/grafana/pkg/storage/unified/sql"
@@ -120,7 +121,7 @@ func (s *ModuleServer) Run() error {
// only run the instrumentation server module if were not running a module that already contains an http server
m.RegisterInvisibleModule(modules.InstrumentationServer, func() (services.Service, error) {
if m.IsModuleEnabled(modules.All) || m.IsModuleEnabled(modules.Core) {
if m.IsModuleEnabled(modules.All) || m.IsModuleEnabled(modules.Core) || m.IsModuleEnabled(modules.FrontendServer) {
return services.NewBasicService(nil, nil, nil).WithName(modules.InstrumentationServer), nil
}
return NewInstrumentationService(s.log, s.cfg, s.promGatherer)
@@ -151,6 +152,10 @@ func (s *ModuleServer) Run() error {
return authz.ProvideZanzanaService(s.cfg, s.features)
})
m.RegisterModule(modules.FrontendServer, func() (services.Service, error) {
return frontend.ProvideFrontendService(s.cfg, s.promGatherer)
})
m.RegisterModule(modules.All, nil)
return m.Run(s.context)