Skip to content

Add Kotlin tagsOf for pairs - #7806

Open
Develop-KIM wants to merge 1 commit into
micrometer-metrics:mainfrom
Develop-KIM:add-kotlin-tags-of-pairs
Open

Add Kotlin tagsOf for pairs#7806
Develop-KIM wants to merge 1 commit into
micrometer-metrics:mainfrom
Develop-KIM:add-kotlin-tags-of-pairs

Conversation

@Develop-KIM

Copy link
Copy Markdown

Replaces #7730, which I closed by mistake — I was clearing out my open PRs across repos and this one got caught in the sweep. I deleted the fork at the same time, so GitHub would not let me reopen it. Same commit, no changes.

Fixes gh-4960

This adds a Kotlin tagsOf utility for creating Tags from Pair<String, String> values:

tagsOf("method" to "GET", "status" to "200")

This keeps the convenience API in Kotlin source so Java users do not see a Kotlin-specific Pair API on Tags.

Verification:

  • ./gradlew :micrometer-core:spotlessKotlinCheck :micrometer-core:compileKotlin :micrometer-core:compileTestKotlin

Note:

  • ./gradlew :micrometer-core:test --tests io.micrometer.core.instrument.kotlin.TagsKtTests currently fails before running the test due to existing NullAway errors in unrelated Java tests (StepMeterRegistryTest and MeterTest).

Signed-off-by: Develop-KIM <kimdonghwan913@gmail.com>
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.

Add Tags.of method taking array of Pair

1 participant