From 1554bea064f402546da2a2838651428a2d25d39a Mon Sep 17 00:00:00 2001 From: Carlos Quintana <74399022+cquintana92@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:51:52 +0200 Subject: [PATCH] feat: record newrelic event for http status code (#2259) --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 0283bd54..35a3dce8 100644 --- a/server.py +++ b/server.py @@ -7,6 +7,7 @@ import arrow import click import flask_limiter import flask_profiler +import newrelic.agent import sentry_sdk from coinbase_commerce.error import WebhookInvalidPayload, SignatureVerificationError from coinbase_commerce.webhook import Webhook @@ -301,7 +302,9 @@ def set_index_page(app): res.status_code, time.time() - start_time, ) - + newrelic.agent.record_custom_event( + "HttpResponseStatus", {"code": res.status_code} + ) return res