Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya40umov committed Feb 26, 2024
1 parent 21cb5e9 commit 20e6fd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ import kotlin.coroutines.CoroutineContext
suspend fun <T> ObservationRegistry.observeAndAwait(
name: String,
contextSupplier: () -> Observation.Context = { Observation.Context() },
block: suspend () -> T
block: suspend () -> T,
): T = Observation.start(name, contextSupplier, this).run {
try {
return withContext(
openScope().use { observationRegistry.asContextElement() }
openScope().use { observationRegistry.asContextElement() },
) {
block()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import io.micrometer.observation.ObservationRegistry
fun <T> ObservationRegistry.observeAndGet(
name: String,
contextSupplier: () -> Context = { Context() },
block: () -> T
block: () -> T,
): T = Observation.start(name, contextSupplier, this).run {
try {
return openScope().use { block() }
Expand Down

0 comments on commit 20e6fd8

Please sign in to comment.