Http transaction is success although error

avlachopoulos
Mon, 06 Mar 2023 12:38:30 +0000
APM

I have a simple web transaction using fast api to test APM. The code is the following:

app.get("/critical", status_code=500)
def critcal_failure():
    try:
        print("Doing something critical")
        raise Exception("something went wrong")
    except Exception as e:
        apm_client.capture_exception(exc_info=True)
        raise HTTPException(status_code=500, detail=f"{e}")

I would expect this to have the "events.outcome" field set to failure. Instead I see it to be "success". Am I missing something?
ELK stack version is 7.17.9

3 posts - 3 participants