Skip to content

Commit

Permalink
config moved to serviceinfo singleton (#625)
Browse files Browse the repository at this point in the history
* config moved to serviceinfo singleton

* fix integration

* schemas path

* merge

* fix port

* edit

* add version to swagger

* rename

* rename to avoid git weirdness

* remove ptr

* remove access

* comment on thread safety

* all use the same service endpoint
  • Loading branch information
decentralgabe authored Aug 2, 2023
1 parent 02d6f8f commit 5440bee
Show file tree
Hide file tree
Showing 45 changed files with 367 additions and 562 deletions.
2 changes: 1 addition & 1 deletion cmd/authserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func newTracerProvider(cfg authorizationserver.AuthConfig) (*sdktrace.TracerProv
sdktrace.WithResource(resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String(config.ServiceName),
semconv.ServiceVersionKey.String(cfg.Version.SVN),
semconv.ServiceVersionKey.String(config.ServiceVersion),
)),
)
return tp, nil
Expand Down
7 changes: 4 additions & 3 deletions cmd/ssiservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
//
// @title SSI Service API
// @description The Self Sovereign Identity Service: Managing DIDs, Verifiable Credentials, and more!
// @version 0.0.3
// @contact.name TBD
// @contact.url https://github.com/TBD54566975/ssi-service/issues
// @contact.email [email protected]
Expand Down Expand Up @@ -88,9 +89,9 @@ func run() error {
}
}

expvar.NewString("build").Set(cfg.Version.SVN)
expvar.NewString("build").Set(config.ServiceVersion)

logrus.Infof("main: Started : Service initializing : env [%s] : version %q", cfg.Server.Environment, cfg.Version.SVN)
logrus.Infof("main: Started : Service initializing : env [%s] : version %q", cfg.Server.Environment, config.ServiceVersion)
defer logrus.Info("main: Completed")

out, err := conf.String(cfg)
Expand Down Expand Up @@ -171,7 +172,7 @@ func newTracerProvider(cfg *config.SSIServiceConfig) (*sdktrace.TracerProvider,
sdktrace.WithResource(resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String(config.ServiceName),
semconv.ServiceVersionKey.String(cfg.Version.SVN),
semconv.ServiceVersionKey.String(config.ServiceVersion),
)),
)
otel.SetTracerProvider(tp)
Expand Down
Loading

0 comments on commit 5440bee

Please sign in to comment.