fix: append the app name to the service name for parallel deployment
This will allow multiple collaboration services to target 2, 3 or more different WOPI apps. It's expected that each different collaboration service is deployed in a different container or host
This commit is contained in:
@@ -15,7 +15,7 @@ func Server(opts ...Option) (*http.Server, error) {
|
||||
|
||||
return debug.NewService(
|
||||
debug.Logger(options.Logger),
|
||||
debug.Name(options.Config.Service.Name),
|
||||
debug.Name(options.Config.Service.Name+"."+options.Config.App.Name),
|
||||
debug.Version(version.GetString()),
|
||||
debug.Address(options.Config.Debug.Addr),
|
||||
debug.Token(options.Config.Debug.Token),
|
||||
|
||||
@@ -25,7 +25,7 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
http.TLSConfig(options.Config.HTTP.TLS),
|
||||
http.Logger(options.Logger),
|
||||
http.Namespace(options.Config.HTTP.Namespace),
|
||||
http.Name(options.Config.Service.Name),
|
||||
http.Name(options.Config.Service.Name+"."+options.Config.App.Name),
|
||||
http.Version(version.GetString()),
|
||||
http.Address(options.Config.HTTP.Addr),
|
||||
http.Context(options.Context),
|
||||
@@ -41,7 +41,7 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
middlewares := []func(stdhttp.Handler) stdhttp.Handler{
|
||||
chimiddleware.RequestID,
|
||||
middleware.Version(
|
||||
options.Config.Service.Name,
|
||||
options.Config.Service.Name+"."+options.Config.App.Name,
|
||||
version.GetString(),
|
||||
),
|
||||
middleware.Logger(
|
||||
@@ -69,7 +69,7 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
|
||||
mux.Use(
|
||||
otelchi.Middleware(
|
||||
options.Config.Service.Name,
|
||||
options.Config.Service.Name+"."+options.Config.App.Name,
|
||||
otelchi.WithChiRoutes(mux),
|
||||
otelchi.WithTracerProvider(options.TracerProvider),
|
||||
otelchi.WithPropagators(tracing.GetPropagator()),
|
||||
|
||||
Reference in New Issue
Block a user