We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let' take the following ExchangeFilterFunction in Reactor.
ExchangeFilterFunction
public ExchangeFilterFunction customStatusHandler() { return ExchangeFilterFunction.ofResponseProcessor(clientResponse -> { if (clientResponse.statusCode().isError()) { return clientResponse.createException().flatMap(clientError -> Mono.error(new CustomException(clientError.getResponseBodyAsString()))); } else { return Mono.just(clientResponse); } }); }
In case of an HTTP endpoint returning the 500 HTTP status, the following client telemetry is then emitted:
[reactor-http-nio-4] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'POST' : fe51b25aef90ef613b35553d9e8ddc66 985f9d622832cadd CLIENT [tracer: io.opentelemetry.spring-webflux-5.0:2.12.0-alpha] AttributesMap{data={http.request.method=POST, thread.id=67, server.address=localhost, server.port=8081, error.type=app1.CustomException, thread.name=http-nio-8080-exec-3, url.full=http://localhost:8081/test-app2}, capacity=128, totalAddedValues=7}
The instrumentation reflects the behavior of the Mono.error API and the client telemetry does not contain the status code.
Mono.error API
It seems fine to me. Do you rather think that there is a bug or limitation and the client telemetry should contain the status code in this case?
Without the ExchangeFilterFunction or if the client response status is not an error:
[reactor-http-nio-2] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'POST' : e9b01c442c1f8ae805a25cbb3a438927 cd9588c7700b062a CLIENT [tracer: io.opentelemetry.spring-webflux-5.0:2.12.0-alpha] AttributesMap{data={server.port=8081, http.request.method=POST, http.response.status_code=500, error.type=500, server.address=localhost, thread.id=64, thread.name=http-nio-8080-exec-1, url.full=http://localhost:8081/test-app2}, capacity=128, totalAddedValues=8}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Let' take the following
ExchangeFilterFunction
in Reactor.In case of an HTTP endpoint returning the 500 HTTP status, the following client telemetry is then emitted:
[reactor-http-nio-4] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'POST' : fe51b25aef90ef613b35553d9e8ddc66 985f9d622832cadd CLIENT [tracer: io.opentelemetry.spring-webflux-5.0:2.12.0-alpha] AttributesMap{data={http.request.method=POST, thread.id=67, server.address=localhost, server.port=8081, error.type=app1.CustomException, thread.name=http-nio-8080-exec-3, url.full=http://localhost:8081/test-app2}, capacity=128, totalAddedValues=7}
The instrumentation reflects the behavior of the
Mono.error API
and the client telemetry does not contain the status code.It seems fine to me. Do you rather think that there is a bug or limitation and the client telemetry should contain the status code in this case?
Without the
ExchangeFilterFunction
or if the client response status is not an error:[reactor-http-nio-2] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'POST' : e9b01c442c1f8ae805a25cbb3a438927 cd9588c7700b062a CLIENT [tracer: io.opentelemetry.spring-webflux-5.0:2.12.0-alpha] AttributesMap{data={server.port=8081, http.request.method=POST, http.response.status_code=500, error.type=500, server.address=localhost, thread.id=64, thread.name=http-nio-8080-exec-1, url.full=http://localhost:8081/test-app2}, capacity=128, totalAddedValues=8}
The text was updated successfully, but these errors were encountered: