fix(micrometer): publish artifact + document okapi.metrics.refresh-interval#29
Merged
fix(micrometer): publish artifact + document okapi.metrics.refresh-interval#29
Conversation
…terval (KOJAK-44) Follow-up to PR #27: - okapi-micrometer/build.gradle.kts: add missing `publish` convention plugin. Without this the module is built but not published to Maven Central, making declared dependency `com.softwaremill.okapi:okapi-micrometer:0.1.0` unresolvable for downstream users. - Document `okapi.metrics.refresh-interval` for IDE auto-completion: - Add KDoc on OkapiMetricsProperties - Add group + property entry to spring-configuration-metadata.json (same pattern as existing okapi.processor / okapi.purger groups) - Add Configuration table to README Observability section Verified on a standalone Spring Boot demo app: observability metrics (counters, timer, MultiGauge count/lag) appear on /actuator/prometheus with default 15s refresh interval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #27. Two fixes discovered while testing the merged observability changes against a standalone Spring Boot demo app.
1.
okapi-micrometerwas not being publishedThe module's
build.gradle.ktswas missingid(\"buildsrc.convention.publish\"). Without this, the module compiles and ships in source but is not published to Maven Central, so downstream users declaringcom.softwaremill.okapi:okapi-micrometer:0.1.0would get an unresolvable dependency.Verified by reproducing the issue with
./gradlew publishToMavenLocal: before the fix, every other module appeared in~/.m2/repository/com/softwaremill/okapi/exceptokapi-micrometer. After the fix, all modules publish.2.
okapi.metrics.refresh-intervallacked IDE autocomplete metadataThe new property was not registered in
spring-configuration-metadata.json, so users in IntelliJ / VS Code wouldn't get autocomplete or hover docs inapplication.yml. Same pattern as existingokapi.processor.*andokapi.purger.*entries.Also added KDoc on
OkapiMetricsPropertiesand a Configuration table to the README Observability section.Test plan
./gradlew publishToMavenLocal -PskipSigning=trueproducesokapi-micrometer-0.1.0.jarcontaining bothMicrometerOutboxMetricsandOutboxMetricsRefresherokapi-micrometer:0.1.0and renders all expected metrics on/actuator/prometheus:okapi_entries_delivered_total,okapi_entries_retry_scheduled_total,okapi_entries_failed_totalokapi_batch_duration_seconds_*okapi_entries_count{status=...},okapi_entries_lag_seconds{status=...}(3 status rows each, one query per refresh)./gradlew ktlintCheckcleanNotes
The publish-plugin omission would surface at the next Maven Central release of okapi (i.e. when
0.1.0artifacts are pushed). Worth catching before then.