External http calls statuses in a non web transaction

Hi,
We have a Kafka Streams application, where inside of a message processor we have a @Trace annotation that creates a custom non-web transaction. That transaction fires REST calls to external services. Is it possible to get the statuses of the external services calls within a NRQL query? We’d like to set up an alert on x number of failed external calls within y minutes.
Notes:
*The http client that we use is Scala sttp, with HttpUrlConnection backend. Would it make a difference if we used another backend or another http client?
*There seems to be a way to get transaction traces with NR Synthetics that would allow us to get external service http statuses, is that correct, and if so, what is the pricing model for it?

Hi, @l.lepkowski: By default, no, it is not possible to use NRQL to get the status of individual external service calls. You may, however, send external service data (duration, HTTP response code, etc) to New Relic as custom events.

Notes:

The http client that we use is Scala sttp, with HttpUrlConnection backend. Would it make a difference if we used another backend or another http client?

No, this would not make a difference. New Relic does not capture data about individual external service calls, regardless of the HTTP client used.

There seems to be a way to get transaction traces with NR Synthetics that would allow us to get external service http statuses, is that correct, and if so, what is the pricing model for it?

I am not sure what you are referring to here. Synthetics does not generate transaction traces. You may use Synthetics to send HTTP requests to an API and monitor the responses, but these requests would be separate from your application.

1 Like