For HTTP exit and entry spans alike, if a full request/response cycle has happened (which implies that an HTTP status code is present): If the HTTP status code is >= 500, the associated span MUST be marked as an error via span.ec.
This means that there is no upper limit, and this should apply to custom status codes as well, which might be above 511, or even 599.
Quote from the spec:
This means that there is no upper limit, and this should apply to custom status codes as well, which might be above
511
, or even599
.