Skip to content

fix(micrometer): publish artifact + document okapi.metrics.refresh-interval#29

Merged
endrju19 merged 1 commit intomainfrom
observ-followup
Apr 24, 2026
Merged

fix(micrometer): publish artifact + document okapi.metrics.refresh-interval#29
endrju19 merged 1 commit intomainfrom
observ-followup

Conversation

@endrju19
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #27. Two fixes discovered while testing the merged observability changes against a standalone Spring Boot demo app.

1. okapi-micrometer was not being published

The module's build.gradle.kts was missing id(\"buildsrc.convention.publish\"). Without this, the module compiles and ships in source but is not published to Maven Central, so downstream users declaring com.softwaremill.okapi:okapi-micrometer:0.1.0 would 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/ except okapi-micrometer. After the fix, all modules publish.

2. okapi.metrics.refresh-interval lacked IDE autocomplete metadata

The new property was not registered in spring-configuration-metadata.json, so users in IntelliJ / VS Code wouldn't get autocomplete or hover docs in application.yml. Same pattern as existing okapi.processor.* and okapi.purger.* entries.

Also added KDoc on OkapiMetricsProperties and a Configuration table to the README Observability section.

Test plan

  • ./gradlew publishToMavenLocal -PskipSigning=true produces okapi-micrometer-0.1.0.jar containing both MicrometerOutboxMetrics and OutboxMetricsRefresher
  • Demo app at consumer-side (Spring Boot + Postgres + Prometheus actuator) successfully imports okapi-micrometer:0.1.0 and renders all expected metrics on /actuator/prometheus:
    • Counters: okapi_entries_delivered_total, okapi_entries_retry_scheduled_total, okapi_entries_failed_total
    • Timer: okapi_batch_duration_seconds_*
    • MultiGauge: okapi_entries_count{status=...}, okapi_entries_lag_seconds{status=...} (3 status rows each, one query per refresh)
  • ./gradlew ktlintCheck clean

Notes

The publish-plugin omission would surface at the next Maven Central release of okapi (i.e. when 0.1.0 artifacts are pushed). Worth catching before then.

…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.
@endrju19 endrju19 merged commit 53bccac into main Apr 24, 2026
8 checks passed
@endrju19 endrju19 deleted the observ-followup branch April 24, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant