Implement the changes introduced to the specification in open-telemetry/opentelemetry-specification#1998
Currently SpanStatusFromHTTPStatusCode(code int) (codes.Code, string) is used to set a spans status. This function does not have the context of the span kind.
We could ...
- Add a new function to the
semconv package that will have the span kind context to set the appropriate status. Maybe even deprecate SpanStatusFromHTTPStatusCode in favor of the new function.
- Update the implementation in the contrib repo to check response code and span kind.
Option 1 seems like it would consolidate the logic in a single function instead of spreading it across package boundaries.