feat: record newrelic event for http status code (#2259)

This commit is contained in:
Carlos Quintana 2024-10-11 09:51:52 +02:00 committed by GitHub
parent 7c0db6067b
commit 1554bea064
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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