Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Tracing of Dependency Injection #11449

Draft
wants to merge 10 commits into
base: 4.8.x
Choose a base branch
from

Conversation

graemerocher
Copy link
Contributor

@graemerocher graemerocher commented Dec 16, 2024

Adds the ability to trace the behaviour of dependency and configuration injection. Can be activated a number of different ways, the simplest being an environment variable:

MICRONAUT_INJECT_TRACE=.+ ./gradlew run

Which enables useful output such as what is the configuration profile of the application, where configuration is read from, what beans are created, how long the bean took to be created, the graph of the bean creation and where it was created from.

To support this, the PR also adds property origin tracking so that one can inspect where a property originated from.

In addition, some of the changes in DefaultBeanContext are in order to reduce stack trace sizes which were starting to get out of hand.

@graemerocher graemerocher added the type: enhancement New feature or request label Dec 16, 2024
@graemerocher graemerocher marked this pull request as draft December 16, 2024 19:43
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8 New Critical Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

1 participant