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

Allow documenting optional keys #3454

Merged
merged 1 commit into from Oct 5, 2022

Conversation

shakuzen
Copy link
Member

@shakuzen shakuzen commented Oct 5, 2022

There is no distinction between required and optional keys currently when using ObservationDocumentation. This introduces a new method isRequired that will default to true. Optional keys may be documented by overriding this method.

Future use of this can be in the docs-generator marking whether a key is required or not in the generated documentation. Also, testing the instrumentation with our TCKs can check that required keys are always present, and that undocumented keys are not present but optional keys may or may not be present.

@shakuzen shakuzen added enhancement A general enhancement module: micrometer-common An issue that is related to our common module labels Oct 5, 2022
@shakuzen shakuzen added this to the 1.10.0-RC1 milestone Oct 5, 2022
There is no distinction between required and optional keys currently when using ObservationDocumentation. This introduces a new method `isRequired` that will default to true. Optional keys may be documented by overriding this method.

Future use of this can be in the docs-generator marking whether a key is required or not in the generated documentation.
Also, testing the instrumentation with our TCKs can check that required keys are always present, and that undocumented keys are not present but optional keys may or may not be present.
@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Oct 5, 2022

⚠️ 10 God Classes were detected by Lift in this project. Visit the Lift web console for more details.

@jonatan-ivanov jonatan-ivanov merged commit b732f2e into micrometer-metrics:main Oct 5, 2022
@shakuzen shakuzen deleted the obsdoc-isrequired branch October 6, 2022 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement module: micrometer-common An issue that is related to our common module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants