From 3b9862a771d2413a0cc787fd0ce219adef8531d1 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 28 Oct 2022 15:38:32 -0700 Subject: [PATCH] Clarify nature of Codes values w.r.t. OTLP (#3386) * 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 --- codes/codes.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codes/codes.go b/codes/codes.go index 064a9279fd1..587ebae4e30 100644 --- a/codes/codes.go +++ b/codes/codes.go @@ -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