Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
1799a58
Remove deprecated code Micronaut Framework 5 and document breaking ch…
wetted Mar 18, 2024
aefe764
chore(deps): update dependency gradle to v8.7 (#723)
renovate[bot] Mar 27, 2024
3fff0af
fix(deps): update dependency io.micronaut.sql:micronaut-sql-bom to v5…
renovate[bot] Mar 27, 2024
46033ad
fix(deps): update dependency io.micronaut.platform:micronaut-platform…
renovate[bot] Mar 27, 2024
1c2230e
fix(deps): update dependency io.micronaut.gradle:micronaut-gradle-plu…
renovate[bot] Mar 27, 2024
d6e3f2d
Update common files (#720)
micronaut-build Mar 27, 2024
f9abf82
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.3.…
renovate[bot] Mar 27, 2024
cdf8e0e
chore(deps): update plugin io.micronaut.build.shared.settings to v6.7…
renovate[bot] Mar 28, 2024
bf973b6
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.4.…
renovate[bot] Apr 1, 2024
091cb8d
fix(deps): update dependency io.micronaut.gradle:micronaut-gradle-plu…
renovate[bot] Apr 6, 2024
78bd8f2
chore(deps): update gradle/gradle-build-action action to v3.2.0 (#728)
renovate[bot] Apr 6, 2024
2dcd008
Merge branch '5.6.x' into 6.0.x
sdelamo May 13, 2024
34241d0
Merge branch '5.13.x' into 6.0.x
sdelamo Oct 14, 2025
9f1d05b
gradle 9.1
sdelamo Oct 14, 2025
3ddf3a1
Micronaut Gradle Build Plugin 8.0.0-M4
sdelamo Oct 14, 2025
ad9d111
Merge branch '5.13.x' into 6.0.x
sdelamo Oct 14, 2025
5f3a313
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.10…
renovate[bot] Oct 17, 2025
f4dcdd5
Update common files (#1047)
micronaut-build Oct 17, 2025
7926d72
chore(deps): update gradle to v9.2.0 (#1063)
renovate[bot] Nov 11, 2025
ac34dc6
chore(deps): update softprops/action-gh-release action to v2.4.2 (#1060)
renovate[bot] Nov 11, 2025
874f199
fix(deps): update dependency io.micronaut.sql:micronaut-sql-bom to v6…
renovate[bot] Nov 11, 2025
64e5ad4
fix(deps): update dependency io.micronaut.reactor:micronaut-reactor-b…
renovate[bot] Nov 11, 2025
b2fe48f
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.10…
renovate[bot] Nov 11, 2025
e6a3093
chore(deps): update graalvm/setup-graalvm action to v1.4.2 (#1053)
renovate[bot] Nov 11, 2025
e88ece7
Update common files (#1049)
micronaut-build Nov 11, 2025
e6f4bbc
chore(deps): update plugin io.micronaut.build.shared.settings to v8.0…
renovate[bot] Nov 11, 2025
ff0c059
Replace Micronaut nullability annotations with JSpecify annotations (…
Copilot Dec 2, 2025
8e8c395
Update common files (#1065)
micronaut-build Dec 10, 2025
8e6bcea
fix(deps): update dependency io.micronaut.data:micronaut-data-bom to …
renovate[bot] Dec 10, 2025
1dd4773
fix(deps): update dependency io.micronaut.gradle:micronaut-gradle-plu…
renovate[bot] Dec 10, 2025
f01204c
fix(deps): update dependency io.micronaut.platform:micronaut-platform…
renovate[bot] Dec 10, 2025
61c9a20
fix(deps): update dependency io.micronaut.r2dbc:micronaut-r2dbc-bom t…
renovate[bot] Dec 10, 2025
2f2ac4e
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.10…
renovate[bot] Dec 10, 2025
42591fc
fix(deps): update dependency io.micronaut.serde:micronaut-serde-bom t…
renovate[bot] Dec 10, 2025
cf3bcad
chore(deps): update plugin io.micronaut.build.shared.settings to v8.0…
renovate[bot] Dec 10, 2025
c7ef354
fix(deps): update dependency io.micronaut.validation:micronaut-valida…
renovate[bot] Dec 10, 2025
51b5aae
chore(deps): update actions/checkout action to v6.0.1 (#1080)
renovate[bot] Dec 10, 2025
e7be6a0
Micronaut 5 compatibility (#1052)
lissam1 Dec 10, 2025
8a2cc3c
fix(deps): update dependency io.micronaut:micronaut-core-bom to v4.10…
renovate[bot] Dec 16, 2025
7ae388c
fix(deps): update dependency io.micronaut.rxjava2:micronaut-rxjava2-b…
renovate[bot] Dec 16, 2025
197652b
chore(deps): update plugin io.micronaut.build.shared.settings to v8.0…
renovate[bot] Dec 19, 2025
11790d8
chore(deps): update github artifact actions (#1094)
renovate[bot] Jan 2, 2026
999f0ff
chore(deps): update actions/cache action to v5 (#1093)
renovate[bot] Jan 2, 2026
1e8458e
Update common files (#1090)
micronaut-build Jan 2, 2026
d10abba
update to Micrometer 1.16.1 (#1087)
lissam1 Jan 2, 2026
328ee44
[skip ci] Release v6.0.1-M1
micronaut-build Jan 2, 2026
9c4a765
chore: Bump version to 6.0.0-SNAPSHOT
micronaut-build Jan 2, 2026
adddb70
test: enable “continue nested HTTP observation” (#1098)
sdelamo Jan 5, 2026
be209aa
chore(deps): update gradle to v9.3.1 (#1109)
renovate[bot] Feb 5, 2026
a4625fb
[micrometer] Update common files for branch 6.0.x (#1103)
micronaut-build Feb 5, 2026
548681a
fix(deps): update dependency net.ttddyy.observation:datasource-microm…
renovate[bot] Feb 5, 2026
d5c78a2
chore(deps): update plugin io.micronaut.build.shared.settings to v8.0…
renovate[bot] Feb 5, 2026
34fa337
fix(deps): update dependency io.micronaut.serde:micronaut-serde-bom t…
renovate[bot] Feb 5, 2026
481fb65
fix(deps): update dependency io.micronaut:micronaut-core-bom to v5.0.…
renovate[bot] Feb 6, 2026
8df4aa5
fix(deps): update dependency io.micronaut.gradle:micronaut-gradle-plu…
renovate[bot] Feb 9, 2026
e39c3fd
fix(deps): update dependency net.ttddyy.observation:datasource-microm…
renovate[bot] Feb 9, 2026
4134aaf
Update proxy datasource resolver (#1119)
radovanradic Mar 10, 2026
c7db3bd
fix(deps): update dependency io.micronaut:micronaut-core-bom to v5.0.…
renovate[bot] Mar 10, 2026
f7bb489
chore(deps): update gradle to v9.4.0 (#1124)
renovate[bot] Mar 10, 2026
5fc0f32
fix(deps): update dependency io.micronaut.data:micronaut-data-bom to …
renovate[bot] Mar 16, 2026
6138dc7
fix(deps): update dependency net.ttddyy.observation:datasource-microm…
renovate[bot] Mar 17, 2026
3003acc
Update common files (#1123)
micronaut-build Mar 17, 2026
6926476
chore(deps): update plugin io.micronaut.build.shared.settings to v8.0…
renovate[bot] Mar 17, 2026
dd7442f
fix(deps): update dependency io.micronaut:micronaut-core-bom to v5.0.…
renovate[bot] Mar 17, 2026
c0508f0
fix(deps): update dependency io.micronaut.r2dbc:micronaut-r2dbc-bom t…
renovate[bot] Mar 23, 2026
6e80ec7
fix(deps): update dependency io.micronaut.sql:micronaut-sql-bom to v7…
renovate[bot] Mar 23, 2026
fd2c64b
fix(deps): update dependency io.micronaut.data:micronaut-data-bom to …
renovate[bot] Mar 23, 2026
c984919
fixes #1122
n0tl3ss Apr 2, 2026
8d6e002
Update to micronaut M21 (#1139)
lissam1 Apr 13, 2026
fc1a92b
fix(deps): update dependency net.ttddyy.observation:datasource-microm…
renovate[bot] Apr 15, 2026
af74d29
chore(deps): update gradle to v9.4.1 (#1129)
renovate[bot] Apr 15, 2026
2860475
fix(deps): update dependency io.micronaut.serde:micronaut-serde-bom t…
renovate[bot] Apr 15, 2026
faf69b3
Update common files (#1128)
micronaut-build Apr 15, 2026
5a3cdbb
fix(deps): update dependency io.micronaut.cache:micronaut-cache-bom t…
renovate[bot] Apr 15, 2026
668f184
fix(deps): combine renovate batch for issue #1142
n0tl3ss Apr 20, 2026
3ef1530
Merge pull request #1143 from micronaut-projects/dependency-upgrade-1142
n0tl3ss Apr 20, 2026
3d1de5f
Update common files (#1141)
micronaut-build Apr 22, 2026
2677418
chore(deps): update actions/cache digest to 27d5ce7 (#1140)
renovate[bot] Apr 22, 2026
ba60c42
micronaut = "5.0.0-M23"
sdelamo Apr 22, 2026
99d769f
micronaut-aws = "5.0.0-M3"
sdelamo Apr 22, 2026
7036803
micronaut-cache = "6.0.0-M3"
sdelamo Apr 22, 2026
cad7ed4
micronaut-reactor = "4.0.0-M2"
sdelamo Apr 22, 2026
27fa498
micronaut-serde = "3.0.0-M7"
sdelamo Apr 22, 2026
765f96d
micronaut-sql = "7.0.1-M2"
sdelamo Apr 22, 2026
05d3d8c
micronaut-data = "5.0.0-M6"
sdelamo Apr 22, 2026
ef642de
micronaut-validation = "5.0.0-M2"
sdelamo Apr 22, 2026
12a3e63
micronaut-logging = "2.0.0-M2"
sdelamo Apr 22, 2026
c888147
micronaut-gradle-plugin = "5.0.0-M1"
sdelamo Apr 22, 2026
52027f7
micronaut-platform = "5.0.0-M2"
sdelamo Apr 22, 2026
86ff67b
[skip ci] Release v6.0.0-M2
micronaut-build Apr 22, 2026
d8398ce
chore: Bump version to 6.0.0-SNAPSHOT
micronaut-build Apr 22, 2026
ceb4798
Stream Prometheus scrape responses
n0tl3ss Apr 24, 2026
7eccf60
Address Prometheus scrape review feedback
n0tl3ss Apr 24, 2026
e74aed7
Fix Prometheus scrape stream edge cases
n0tl3ss Apr 24, 2026
0458469
Address Sonar findings in PrometheusEndpoint
n0tl3ss Apr 24, 2026
b789dae
Clarify @Timed and @Counted annotation processor requirement
n0tl3ss Apr 24, 2026
be18486
Avoid repeated Prometheus test metric binding
n0tl3ss Apr 27, 2026
ce24b80
Add Prometheus scrape stream completion coverage
n0tl3ss Apr 27, 2026
5206d3b
Update Micronaut dependency BOMs
n0tl3ss Apr 27, 2026
d7becde
Fix native test bytecode target
n0tl3ss Apr 27, 2026
0f9ed4a
Simplify streaming terminal hooks
n0tl3ss Apr 27, 2026
8e53e98
Adjust CountedMicronautTest assertion tolerance
n0tl3ss Apr 27, 2026
d229d34
Address PR review feedback
n0tl3ss Apr 28, 2026
a2e2072
Handle completion stage server responses
n0tl3ss Apr 28, 2026
1fa3ef8
Add async server response tests
n0tl3ss Apr 28, 2026
ed162ce
Update common files (#1166)
micronaut-build May 1, 2026
cfb9bed
Update Micronaut dependencies (#1164)
renovate[bot] May 1, 2026
85eee7e
Update Gradle to v9.5.0 (#1168)
renovate[bot] May 2, 2026
988b566
Update dependency io.prometheus:prometheus-metrics-exporter-pushgatew…
renovate[bot] May 5, 2026
a7fd725
Merge pull request #1149 from micronaut-projects/nmikic/issue-1000-pr…
n0tl3ss May 5, 2026
85279e9
Update Micronaut dependencies (#1170)
renovate[bot] May 7, 2026
7273e0f
Update common files (#1169)
micronaut-build May 7, 2026
201dea7
micronaut-logging = "2.0.0-RC1"
sdelamo May 7, 2026
447e4a4
micronaut-sql = "7.0.0-RC1"
sdelamo May 7, 2026
9a0b5f2
Update common files (#1172)
micronaut-build May 8, 2026
c7b983a
udpate versions
sdelamo May 8, 2026
3bec734
security: force jackson version
sdelamo May 8, 2026
a1f7004
[skip ci] Release v6.0.0-RC1
micronaut-build May 8, 2026
785fcee
Merge pull request #1153 from micronaut-projects/nmikic/clarify-metri…
n0tl3ss May 8, 2026
119d343
Update common files (#1173)
micronaut-build May 9, 2026
1782bdb
micronaut = "5.0.0"
sdelamo May 13, 2026
1a0eb6a
micronaut-platform = "5.0.0-RC1"
sdelamo May 13, 2026
a0ab05c
Update common files (#1174)
micronaut-build May 14, 2026
53119ed
Update versions
sdelamo May 17, 2026
81ddc6b
[skip ci] Release v6.0.0
micronaut-build May 18, 2026
80447d8
chore: Bump version to 6.0.1-SNAPSHOT
micronaut-build May 18, 2026
ff7794e
update versions
sdelamo May 18, 2026
a4e1350
Update common files (#1176)
micronaut-build May 20, 2026
7c138c5
Update common files (#1177)
micronaut-build May 22, 2026
3af7218
Update common files (#1178)
micronaut-build May 23, 2026
321913f
Update common files (#1180)
micronaut-build May 26, 2026
7e0a13b
Update common files (#1184)
micronaut-build Jun 6, 2026
ed61e3e
projectVersion=6.1.0-SNAPSHOT [ci skip]
sdelamo Jun 9, 2026
f4e688c
Merge branch '6.0.x' into 6.1.x
sdelamo Jun 9, 2026
237593f
Update managed.metrics.core to v4.2.39 (#1182)
renovate[bot] Jun 9, 2026
05ebcca
Update Micronaut dependencies (#1179)
renovate[bot] Jun 9, 2026
5d4e0cc
Enable graalvm tests in Micronaut Micrometer (#1099)
sdelamo Jun 9, 2026
6e966d0
use jache version from mnCache
sdelamo Jun 9, 2026
638df2a
Merge branch '6.0.x' into 6.1.x
sdelamo Jun 9, 2026
e5c3c95
Update to Micrometer 1.17.0 (#1187)
sdelamo Jun 9, 2026
767c54a
Fix server metrics for security short-circuit responses (#1150)
n0tl3ss Jun 9, 2026
40012dd
Remove Wavefront registry module (#1188)
sdelamo Jun 9, 2026
90f6fe2
Fix R2DBC metrics binder without r2dbc-pool (#1154)
n0tl3ss Jun 9, 2026
03026fe
Add regression coverage for ignored preflight HTTP requests (#1157)
n0tl3ss Jun 9, 2026
7e96cc2
Add handled exception metrics regression coverage (#1151)
n0tl3ss Jun 9, 2026
d45f075
Use RouteAttributes for HTTP metrics routes (#1189)
sdelamo Jun 9, 2026
24c161a
Merge branch '6.0.x' into 6.1.x
sdelamo Jun 9, 2026
20d9514
Set timed interceptor order (#1158)
n0tl3ss Jun 9, 2026
70d9141
Allow inferring Stackdriver project ID (#1146)
n0tl3ss Jun 9, 2026
9e0f750
Merge branch '6.1.x' into issue-#1122
sdelamo Jun 9, 2026
f2a7bb0
Revert "Merge branch '6.1.x' into issue-#1122"
sdelamo Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
micronaut-platform = "4.9.4"
micronaut = "4.10.9"
micronaut-platform = "4.10.12"
micronaut = "4.10.21"
micronaut-docs = "3.0.0"
micronaut-gradle-plugin = "4.5.5"
micronaut-test = "4.9.0"
Expand All @@ -21,7 +21,7 @@ hdr-histogram = '2.2.2'
micronaut-aws = "4.11.0"
micronaut-cache = "5.3.0"
micronaut-grpc = "4.12.0"
micronaut-logging = "1.7.1"
micronaut-logging = "1.7.4"
micronaut-r2dbc = "6.1.0"
micronaut-rxjava2 = "2.8.0"
micronaut-reactor = "3.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
import io.micronaut.http.annotation.ServerFilter;
import io.micronaut.web.router.UriRouteMatch;
import jakarta.inject.Provider;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.SignalType;

import java.util.Optional;
import java.util.function.Supplier;
Expand Down Expand Up @@ -81,7 +84,7 @@ void onRequest(HttpRequest<?> request) {

@ResponseFilter
void onResponse(HttpRequest<?> request, HttpResponse<?> response) {
WebMetricsHelper httpResponseWebMetricsPublisher = new WebMetricsHelper(
WebMetricsHelper webMetricsHelper = new WebMetricsHelper(
meterRegistryProvider.get(),
resolvePath(request),
request.getAttribute(START_ATTRIBUTE, Long.class).orElseGet(System::nanoTime),
Expand All @@ -90,6 +93,17 @@ void onResponse(HttpRequest<?> request, HttpResponse<?> response) {
null,
reportClientErrorURIs
);
httpResponseWebMetricsPublisher.onResponse(response);
Object body = response.body();
if (response instanceof io.micronaut.http.MutableHttpResponse<?> mutableHttpResponse && body instanceof Publisher<?> publisher) {
mutableHttpResponse.body(Flux.from(publisher)
.doOnError(throwable -> webMetricsHelper.error(response, throwable))
.doFinally(signalType -> {
if (signalType != SignalType.ON_ERROR) {
webMetricsHelper.onResponse(response);
}
}));
return;
}
webMetricsHelper.onResponse(response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Error
import io.micronaut.http.annotation.Get
import io.micronaut.http.MediaType
import io.micronaut.http.client.HttpClient
import io.micronaut.http.client.annotation.Client
import io.micronaut.http.client.exceptions.HttpClientResponseException
import io.micronaut.http.uri.UriBuilder
Expand All @@ -27,6 +29,8 @@ import io.micronaut.websocket.annotation.*
import org.reactivestreams.Publisher
import reactor.core.publisher.Flux
import spock.lang.PendingFeature

import java.time.Duration
import spock.lang.Specification

import jakarta.validation.constraints.NotBlank
Expand Down Expand Up @@ -152,6 +156,32 @@ class HttpMetricsSpec extends Specification {
MICRONAUT_METRICS_BINDERS + ".web.client.slos" | "0.1,0.2,0.5" | 0 | 0 | null | 3 | null | false | 1000000d | 3.0E10 | 1000000d | 3.0E10
}


void "test server metrics track streaming response duration until completion"() {
when:
EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer, ['spec.name': getClass().getSimpleName()])
def context = embeddedServer.applicationContext
MeterRegistry registry = context.getBean(MeterRegistry)
HttpClient rawClient = context.createBean(HttpClient, embeddedServer.URL)
long start = System.nanoTime()

then:
rawClient.toBlocking().retrieve('/test-http-metrics/streaming') == 'chunk-1\nchunk-2\nchunk-3\n'

when:
long elapsedNanos = System.nanoTime() - start
Timer serverTimer = registry.get(HttpServerMeterConfig.REQUESTS_METRIC).tags('uri', '/test-http-metrics/streaming').timer()

then:
serverTimer.count() == 1
serverTimer.totalTime(java.util.concurrent.TimeUnit.NANOSECONDS) >= Duration.ofMillis(250).toNanos()
serverTimer.totalTime(java.util.concurrent.TimeUnit.NANOSECONDS) <= elapsedNanos

cleanup:
rawClient.close()
embeddedServer.close()
}

void "test client / server metrics ignored uris for client errors"() {
when:
EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer, [
Expand Down Expand Up @@ -294,6 +324,9 @@ class HttpMetricsSpec extends Specification {
@Get("/test-http-metrics/exception-handling")
HttpResponse exceptionHandling()

@Get(value = "/test-http-metrics/streaming", processes = MediaType.TEXT_PLAIN)
Comment thread
n0tl3ss marked this conversation as resolved.
Outdated
String streaming()

@Get("/test-http-metrics-not-found")
HttpResponse notFound()
}
Expand Down Expand Up @@ -325,6 +358,11 @@ class HttpMetricsSpec extends Specification {
throw new MyException("my custom exception")
}

@Get(value = "/test-http-metrics/streaming", produces = MediaType.TEXT_PLAIN)
Publisher<String> streaming() {
return Flux.range(1, 3).delayElements(Duration.ofMillis(100)).map(i -> 'chunk-' + i + '\n')
}

@Error(exception = MyException)
HttpResponse<?> myExceptionHandler() {
return HttpResponse.badRequest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
import io.micronaut.micrometer.observation.http.server.instrumentation.ServerHttpObservationDocumentation;
import io.micronaut.micrometer.observation.http.server.instrumentation.ServerRequestObservationContext;
import io.micronaut.micrometer.observation.http.server.instrumentation.ServerRequestObservationConvention;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.SignalType;

import static io.micronaut.core.util.StringUtils.FALSE;
import static io.micronaut.core.util.StringUtils.TRUE;
Expand Down Expand Up @@ -79,6 +82,20 @@ public void response(HttpRequest<?> request, MutableHttpResponse<?> response) {
request.getAttribute(MICROMETER_OBSERVATION_ATTRIBUTE_KEY, Observation.class).ifPresent(observation -> {
response.getAttribute(EXCEPTION, Throwable.class).ifPresent(observation::error);
((ServerRequestObservationContext) observation.getContext()).setResponse(response);
Object body = response.body();
if (body instanceof Publisher<?> publisher) {
Comment thread
n0tl3ss marked this conversation as resolved.
response.body(Flux.from(publisher)
.doOnError(throwable -> {
observation.error(throwable);
observation.stop();
})
.doFinally(signalType -> {
if (signalType != SignalType.ON_ERROR) {
observation.stop();
}
}));
return;
}
observation.stop();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import spock.lang.AutoCleanup
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

import java.time.Duration
import java.util.concurrent.CompletableFuture
import java.util.concurrent.CompletionStage

Expand Down Expand Up @@ -317,6 +318,31 @@ class ObservationHttpSpec extends Specification {
testObservationRegistry.clear()
}


void 'test server observation stays open until streaming response completes'() {
when:
String response = reactorHttpClient.toBlocking().retrieve('/streaming/body', String)

then:
response == 'stream-1\nstream-2\nstream-3\n'

and:
conditions.eventually {
TestObservationRegistryAssert.assertThat(testObservationRegistry)
.hasObservationWithNameEqualTo('http.server.requests')
.that()
.hasContextualNameEqualTo('http get /streaming/body')
.hasLowCardinalityKeyValue('uri', '/streaming/body')
.hasLowCardinalityKeyValue('streaming', 'done')
.hasBeenStarted()
.hasBeenStopped()
}
testObservationRegistry.getCurrentObservation() == null

cleanup:
testObservationRegistry.clear()
}

void 'test continue nested HTTP observation - reactive'() {

when:
Expand Down Expand Up @@ -497,6 +523,24 @@ class ObservationHttpSpec extends Specification {
Publisher<String> continuedRx(String name)
}


@Controller('/streaming')
static class StreamingController {

@Inject
ObservationRegistry observationRegistry

@Get(value = '/body', produces = 'text/plain')
Publisher<String> body() {
return Flux.range(1, 3)
.delayElements(Duration.ofMillis(50))
.map { i ->
observationRegistry.currentObservation.lowCardinalityKeyValue('streaming', i == 3 ? 'done' : 'progress')
return "stream-${i}\n"
}
Comment thread
n0tl3ss marked this conversation as resolved.
Outdated
}
}

@Controller('/error')
static class ErrorController {

Expand Down
4 changes: 4 additions & 0 deletions test-suite/micronaut-serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ dependencies {

graalvmNative.toolchainDetection = false

tasks.withType(JavaCompile).configureEach {
options.release = 17
}

micronaut {
version.set(libs.versions.micronaut.platform)
runtime("netty")
Expand Down
4 changes: 4 additions & 0 deletions test-suite/test-observation-datasource/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ dependencies {

graalvmNative.toolchainDetection = false

tasks.withType(JavaCompile).configureEach {
options.release = 17
}

micronaut {
version.set(libs.versions.micronaut.platform)
runtime("netty")
Expand Down
Loading