Skip to content

Introduce MP Config Property mp.metrics.enable#782

Open
Channyboy wants to merge 1 commit into
microprofile:mainfrom
Channyboy:v510-enableDisableMetric
Open

Introduce MP Config Property mp.metrics.enable#782
Channyboy wants to merge 1 commit into
microprofile:mainfrom
Channyboy:v510-enableDisableMetric

Conversation

@Channyboy

Copy link
Copy Markdown
Contributor

TCK will be delivered in another PR

For #686

mp.metrics.enable=demo.app.*=false;demo.app.testCounter=true
----

CAUTION: Before disabling metrics, be aware if your application uses any `getMetric(...)` or `getCounter(...)`/`getHistogram(...)`/`getTimer(...)`/`getGauge(...)` method calls that try to retrieve a specific metric. Due to the _disabled_ metric not being registered this may cause an `IllegalArgumentException`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returns null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using enabled (with a trailing d) in the config key.

We've talked about choosing config key names which describe states of things (enabled) rather than actions to perform on things (enable).

@Channyboy
Channyboy force-pushed the v510-enableDisableMetric branch from babbee6 to 355f797 Compare August 1, 2023 22:01
@Channyboy

Copy link
Copy Markdown
Contributor Author

Slated for future release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants