Skip to content

Commit a6a81ca

Browse files
LucaWintergerstColton Myers
andauthored
properly set transaction outcome (#1637)
* properly set transaction outcome closes #1636 * CHANGELOG Co-authored-by: Colton Myers <colton@myers.fm>
1 parent d529e29 commit a6a81ca

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ endif::[]
4141
4242
* Fix Django's `manage.py check` when agent is disabled {pull}1632[#1632]
4343
* Fix an issue with long body truncation for Starlette {pull}1635[#1635]
44+
* Fix an issue with transaction outcomes in Flask for uncaught exceptions {pull}1637[#1637]
4445
4546
4647
[[release-notes-6.x]]

elasticapm/contrib/flask/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def handle_exception(self, *args, **kwargs):
111111
#
112112
# Unfortunately, that also means that we can't capture any response data,
113113
# as the response isn't ready at this point in time.
114+
elasticapm.set_transaction_outcome(outcome=constants.OUTCOME.FAILURE, override=False)
114115
self.client.end_transaction(result="HTTP 5xx")
115116

116117
def init_app(self, app, **defaults):

0 commit comments

Comments
 (0)