cashapp / misk

Microservice Kontainer
https://cashapp.github.io/misk/
Apache License 2.0
399 stars 169 forks source link

Pretty-print the service graph upon start-up #3285

Closed keeferrourke closed 4 months ago

keeferrourke commented 4 months ago

It can at times be difficult to reason about what the dependency graph is in larger misk services. This change logs the ServiceGraph when the ServiceManager is created during service start-up, in order to allow service operators to better understand their constituent service dependencies.

By default, no graph is printed on service start-up, but this can be opted into by passing a ServiceManagerConfig to MiskRealServiceModule.

keeferrourke commented 4 months ago

Thanks for adding this. Not sure how big the graph will be for production services but maybe it'd be worth making this configurable by yaml since it will be log output on every pod startup?

I thought about that, and will do!