grafana / pyroscope-java

pyroscope java integration
Apache License 2.0
82 stars 32 forks source link

Separate components by usage of dependency injection with CDI #125

Closed zalintyre closed 6 months ago

zalintyre commented 11 months ago

Coupling of components can be lowered using a dependency injection mechanism. I'd like to propose the use of CDI (Contexts and dependency injection). It is entirely usable with Java SE:

https://www.baeldung.com/java-ee-cdi

korniltsev commented 8 months ago

What problem does it solve?

zalintyre commented 6 months ago

It mainly solves the problem of unit-testing separate components (units) instead of having to test the whole call-chain. This would be more of an integration test.

korniltsev commented 6 months ago

We don't have this problem