Skip to content
New issue

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

[BUG] Prometheus Sink - Posting to AMP : FailedHttpResponseInterceptor is wrongly interpreting 200 #3291

Open
ashoktelukuntla opened this issue Aug 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ashoktelukuntla
Copy link
Contributor

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:

  1. Run Dataprepper
  2. Generate metrics by running ArmeriaExportMetrics.java
  3. Data is successfully posted to AMP endpoint but still see the stack trace
  4. 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.

@ashoktelukuntla ashoktelukuntla added bug Something isn't working untriaged labels Aug 30, 2023
@ashoktelukuntla 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants