Skip to content

Commit

Permalink
Clarify nature of Codes values w.r.t. OTLP (#3386)
Browse files Browse the repository at this point in the history
* Clarify nature of Codes values w.r.t. OTLP

* Update codes/codes.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* go eff em tee dash ehs

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 28, 2022
1 parent 797e337 commit 3b9862a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions codes/codes.go
Expand Up @@ -23,10 +23,20 @@ import (
const (
// Unset is the default status code.
Unset Code = 0

// Error indicates the operation contains an error.
//
// NOTE: The error code in OTLP is 2.
// The value of this enum is only relevant to the internals
// of the Go SDK.
Error Code = 1

// Ok indicates operation has been validated by an Application developers
// or Operator to have completed successfully, or contain no error.
//
// NOTE: The Ok code in OTLP is 1.
// The value of this enum is only relevant to the internals
// of the Go SDK.
Ok Code = 2

maxCode = 3
Expand Down

0 comments on commit 3b9862a

Please sign in to comment.