-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Status object from API, keep StatusCanonicalCode (#1741)
* Remove Status object from API, keep StatusCanonicalCode Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Respond to comments, change more old usages Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Fix build, run gojf Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
- Loading branch information
1 parent
42cdff4
commit eb4a18f
Showing
44 changed files
with
326 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
api/src/main/java/io/opentelemetry/trace/StatusCanonicalCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.trace; | ||
|
||
/** | ||
* The set of canonical status codes. If new codes are added over time they must choose a numerical | ||
* value that does not collide with any previously used value. | ||
* | ||
* @since 0.1.0 | ||
*/ | ||
public enum StatusCanonicalCode { | ||
|
||
/** | ||
* The operation has been validated by an Application developers or Operator to have completed | ||
* successfully. | ||
*/ | ||
OK(0), | ||
|
||
/** The default status. */ | ||
UNSET(1), | ||
|
||
/** The operation contains an error. */ | ||
ERROR(2); | ||
|
||
private final int value; | ||
|
||
StatusCanonicalCode(int value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Returns the numerical value of the code. | ||
* | ||
* @return the numerical value of the code. | ||
* @since 0.1.0 | ||
*/ | ||
public int value() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.