Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Missing mapping between HTTP and OpenCensus trace status codes #1189

@lonnblad

Description

@lonnblad

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

v0.22.2

What version of Go are you using?

go1.13.*

What did you do?

My HTTP server returned a 409 on a request to its API.

What did you expect to see?

status {
  code: 6
  message: "ALREADY_EXISTS"
}

What did you see instead?

status {
  code: 2
  message: "UNKNOWN"
}

Additional context

It looks like we are missing some mapping in this function:

func TraceStatus(httpStatusCode int, statusLine string) trace.Status {

I know that there is or has been a discussion about changing the handling of HTTP codes and maybe that is on hold due to Open Telemetry, but I believe, we should at least have support for the ones that are defined in:
https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions