You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP Sink - Posting to AMP : FailedHttpResponseInterceptor is wrongly interpreting 200 as error and throwing exception which is causing pipeline to break
To Reproduce
Steps to reproduce the behavior:
Run Dataprepper
Generate metrics by running ArmeriaExportMetrics.java
Data is successfully posted to AMP endpoint but still see the stack trace
See error
java.io.IOException: url: https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-a13b8ab8-b903-4b6a-8fe9-6722053c2469/api/v1/remote_write, status code: 200
at org.opensearch.dataprepper.plugins.sink.prometheus.FailedHttpResponseInterceptor.process(FailedHttpResponseInterceptor.java:29) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.apache.hc.core5.http.protocol.DefaultHttpProcessor.process(DefaultHttpProcessor.java:117) ~[httpcore5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.MainClientExec.execute(MainClientExec.java:119) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:188) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:96) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:106) ~[httpclient5-5.2.jar:5.2]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.pushToEndPoint(PrometheusSinkService.java:310) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.lambda$output$0(PrometheusSinkService.java:180) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.output(PrometheusSinkService.java:145) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.PrometheusSink.doOutput(PrometheusSink.java:113) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.model.sink.AbstractSink.lambda$output$0(AbstractSink.java:64) ~[data-prepper-api-2.5.0-SNAPSHOT.jar:?]
at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141) ~[micrometer-core-1.10.5.jar:1.10.5]
at org.opensearch.dataprepper.model.sink.AbstractSink.output(AbstractSink.java:64) ~[data-prepper-api-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.pipeline.Pipeline.lambda$publishToSinks$5(Pipeline.java:336) ~[data-prepper-core-2.5.0-SNAPSHOT.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Expected behavior
HTTP Client should handle the Status code properly and not throw exception.
The text was updated successfully, but these errors were encountered:
ashoktelukuntla
changed the title
[BUG] HTTP Sink - Posting to AMP : FailedHttpResponseInterceptor is wrongly interpreting 200
[BUG] Prometheus Sink - Posting to AMP : FailedHttpResponseInterceptor is wrongly interpreting 200
Aug 30, 2023
Describe the bug
HTTP Sink - Posting to AMP : FailedHttpResponseInterceptor is wrongly interpreting 200 as error and throwing exception which is causing pipeline to break
To Reproduce
Steps to reproduce the behavior:
java.io.IOException: url: https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-a13b8ab8-b903-4b6a-8fe9-6722053c2469/api/v1/remote_write , status code: 200
at org.opensearch.dataprepper.plugins.sink.prometheus.FailedHttpResponseInterceptor.process(FailedHttpResponseInterceptor.java:29) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.apache.hc.core5.http.protocol.DefaultHttpProcessor.process(DefaultHttpProcessor.java:117) ~[httpcore5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.MainClientExec.execute(MainClientExec.java:119) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:188) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:96) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170) ~[httpclient5-5.2.jar:5.2]
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:106) ~[httpclient5-5.2.jar:5.2]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.pushToEndPoint(PrometheusSinkService.java:310) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.lambda$output$0(PrometheusSinkService.java:180) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.service.PrometheusSinkService.output(PrometheusSinkService.java:145) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.plugins.sink.prometheus.PrometheusSink.doOutput(PrometheusSink.java:113) ~[prometheus-sink-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.model.sink.AbstractSink.lambda$output$0(AbstractSink.java:64) ~[data-prepper-api-2.5.0-SNAPSHOT.jar:?]
at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141) ~[micrometer-core-1.10.5.jar:1.10.5]
at org.opensearch.dataprepper.model.sink.AbstractSink.output(AbstractSink.java:64) ~[data-prepper-api-2.5.0-SNAPSHOT.jar:?]
at org.opensearch.dataprepper.pipeline.Pipeline.lambda$publishToSinks$5(Pipeline.java:336) ~[data-prepper-core-2.5.0-SNAPSHOT.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Expected behavior
HTTP Client should handle the Status code properly and not throw exception.
The text was updated successfully, but these errors were encountered: