Skip to content

fromHttpStatusCode in SpanStatus L79 does not handle 3xx #3841

@mikand13

Description

@mikand13

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

This is our relevant code:

transaction?.finish(fromHttpStatusCode(status ?: 500))

Expected Result

Would expect this to return an ok spanstatus or something of that order for a 3xx response, 304 f.ex is a very normal cache response, and 301 or 302 is not unusual either, f.ex. in auth apis.

Actual Result

It seems a null SpanStatus is returned which again marks this as a failed transaction. We have a lot of 304 so basically all our requests are tagged as failed giving us a >99 failure rate.

Product Area

APIs

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions