public class DiagnosticBundle extends java.lang.Object implements GuiceyBundle
Sections:
Reporting is highly configurable. Default configuration shows most valuable (but not all possible) info. To create bundle with custom configuration use builder:
DiagnosticBundle.builder()
.printStartupStats(true)
.printConfiguration(new DiagnosticConfig().printAll())
.build();
Actual diagnostic rendering is performed by DiagnosticRenderer
, ContextTreeRenderer
,
OptionsRenderer
and StatsRenderer
. They may be used directly, for example, to show report
on web page.
Reporting is performed after context startup (pure guicey context (in tests) or entire web context) and so does not affect collected statistics.
Modifier and Type | Class and Description |
---|---|
static class |
DiagnosticBundle.Builder
Diagnostic bundle builder.
|
static class |
DiagnosticBundle.DiagnosticModule
Guicey configuration diagnostic module.
|
Constructor and Description |
---|
DiagnosticBundle()
Initialize bundle with default diagnostic configuration.
|
Modifier and Type | Method and Description |
---|---|
static DiagnosticBundle.Builder |
builder() |
void |
initialize(GuiceyBootstrap bootstrap)
Called in run phase.
|
public DiagnosticBundle()
public void initialize(GuiceyBootstrap bootstrap)
GuiceyBundle
GuiceyBootstrap
contains almost the same methods as
GuiceBundle.Builder
, which allows to register installers, extensions
and guice modules. Existing installer could be replaced by disabling old one and registering new.
WARNING: don't assume that this method will be called before or after dropwizard bundle run method (both possible). If configuration or environment objects required, they may be obtained from bootstrap.
initialize
in interface GuiceyBundle
bootstrap
- guicey bootstrap objectpublic static DiagnosticBundle.Builder builder()