opentelemetry-api 0.3.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -2
  3. data/CHANGELOG.md +19 -0
  4. data/LICENSE +1 -1
  5. data/{OVERVIEW.md → README.md} +0 -0
  6. data/lib/opentelemetry.rb +11 -11
  7. data/lib/opentelemetry/baggage.rb +16 -0
  8. data/lib/opentelemetry/{correlation_context → baggage}/builder.rb +2 -2
  9. data/lib/opentelemetry/{correlation_context → baggage}/manager.rb +8 -3
  10. data/lib/opentelemetry/baggage/propagation.rb +57 -0
  11. data/lib/opentelemetry/baggage/propagation/context_keys.rb +27 -0
  12. data/lib/opentelemetry/{correlation_context/propagation/text_extractor.rb → baggage/propagation/text_map_extractor.rb} +14 -14
  13. data/lib/opentelemetry/baggage/propagation/text_map_injector.rb +55 -0
  14. data/lib/opentelemetry/context/propagation/composite_propagator.rb +8 -12
  15. data/lib/opentelemetry/instrumentation.rb +2 -2
  16. data/lib/opentelemetry/instrumentation/{adapter.rb → base.rb} +54 -53
  17. data/lib/opentelemetry/instrumentation/registry.rb +32 -32
  18. data/lib/opentelemetry/trace.rb +13 -16
  19. data/lib/opentelemetry/trace/propagation/trace_context.rb +11 -11
  20. data/lib/opentelemetry/trace/propagation/trace_context/{text_extractor.rb → text_map_extractor.rb} +5 -4
  21. data/lib/opentelemetry/trace/propagation/trace_context/{text_injector.rb → text_map_injector.rb} +4 -5
  22. data/lib/opentelemetry/trace/propagation/trace_context/trace_parent.rb +9 -5
  23. data/lib/opentelemetry/trace/span.rb +10 -18
  24. data/lib/opentelemetry/trace/span_context.rb +25 -1
  25. data/lib/opentelemetry/trace/status.rb +7 -65
  26. data/lib/opentelemetry/trace/tracer.rb +20 -28
  27. data/lib/opentelemetry/trace/util/http_to_status.rb +4 -23
  28. data/lib/opentelemetry/version.rb +1 -1
  29. metadata +15 -17
  30. data/lib/opentelemetry/correlation_context.rb +0 -16
  31. data/lib/opentelemetry/correlation_context/propagation.rb +0 -57
  32. data/lib/opentelemetry/correlation_context/propagation/context_keys.rb +0 -27
  33. data/lib/opentelemetry/correlation_context/propagation/text_injector.rb +0 -55
  34. data/lib/opentelemetry/internal.rb +0 -22
  35. data/lib/opentelemetry/trace/event.rb +0 -46
@@ -7,79 +7,79 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  # The instrumentation Registry contains information about instrumentation
10
- # adapters available and facilitates discovery, installation and
10
+ # available and facilitates discovery, installation and
11
11
  # configuration. This functionality is primarily useful for SDK
12
12
  # implementors.
13
13
  class Registry
14
14
  def initialize
15
15
  @lock = Mutex.new
16
- @adapters = []
16
+ @instrumentation = []
17
17
  end
18
18
 
19
19
  # @api private
20
- def register(adapter)
20
+ def register(instrumentation)
21
21
  @lock.synchronize do
22
- @adapters << adapter
22
+ @instrumentation << instrumentation
23
23
  end
24
24
  end
25
25
 
26
- # Lookup an adapter definition by name. Returns nil if +adapter_name+
26
+ # Lookup an instrumentation definition by name. Returns nil if +instrumentation_name+
27
27
  # is not found.
28
28
  #
29
- # @param [String] adapter_name A stringified class name for an adapter
30
- # @return [Adapter]
31
- def lookup(adapter_name)
29
+ # @param [String] instrumentation_name A stringified class name for an instrumentation
30
+ # @return [Instrumentation]
31
+ def lookup(instrumentation_name)
32
32
  @lock.synchronize do
33
- find_adapter(adapter_name)
33
+ find_instrumentation(instrumentation_name)
34
34
  end
35
35
  end
36
36
 
37
- # Install the specified adapters with optionally specified configuration.
37
+ # Install the specified instrumentation with optionally specified configuration.
38
38
  #
39
- # @param [Array<String>] adapter_names An array of adapter names to
39
+ # @param [Array<String>] instrumentation_names An array of instrumentation names to
40
40
  # install
41
- # @param [optional Hash<String, Hash>] adapter_config_map A map of
42
- # adapter_name to config. This argument is optional and config can be
43
- # passed for as many or as few adapters as desired.
44
- def install(adapter_names, adapter_config_map = {})
41
+ # @param [optional Hash<String, Hash>] instrumentation_config_map A map of
42
+ # instrumentation_name to config. This argument is optional and config can be
43
+ # passed for as many or as few instrumentations as desired.
44
+ def install(instrumentation_names, instrumentation_config_map = {})
45
45
  @lock.synchronize do
46
- adapter_names.each do |adapter_name|
47
- adapter = find_adapter(adapter_name)
48
- OpenTelemetry.logger.warn "Could not install #{adapter_name} because it was not found" unless adapter
46
+ instrumentation_names.each do |instrumentation_name|
47
+ instrumentation = find_instrumentation(instrumentation_name)
48
+ OpenTelemetry.logger.warn "Could not install #{instrumentation_name} because it was not found" unless instrumentation
49
49
 
50
- install_adapter(adapter, adapter_config_map[adapter.name])
50
+ install_instrumentation(instrumentation, instrumentation_config_map[instrumentation.name])
51
51
  end
52
52
  end
53
53
  end
54
54
 
55
55
  # Install all instrumentation available and installable in this process.
56
56
  #
57
- # @param [optional Hash<String, Hash>] adapter_config_map A map of
58
- # adapter_name to config. This argument is optional and config can be
59
- # passed for as many or as few adapters as desired.
60
- def install_all(adapter_config_map = {})
57
+ # @param [optional Hash<String, Hash>] instrumentation_config_map A map of
58
+ # instrumentation_name to config. This argument is optional and config can be
59
+ # passed for as many or as few instrumentations as desired.
60
+ def install_all(instrumentation_config_map = {})
61
61
  @lock.synchronize do
62
- @adapters.map(&:instance).each do |adapter|
63
- install_adapter(adapter, adapter_config_map[adapter.name])
62
+ @instrumentation.map(&:instance).each do |instrumentation|
63
+ install_instrumentation(instrumentation, instrumentation_config_map[instrumentation.name])
64
64
  end
65
65
  end
66
66
  end
67
67
 
68
68
  private
69
69
 
70
- def find_adapter(adapter_name)
71
- @adapters.detect { |a| a.instance.name == adapter_name }
70
+ def find_instrumentation(instrumentation_name)
71
+ @instrumentation.detect { |a| a.instance.name == instrumentation_name }
72
72
  &.instance
73
73
  end
74
74
 
75
- def install_adapter(adapter, config)
76
- if adapter.install(config)
77
- OpenTelemetry.logger.info "Adapter: #{adapter.name} was successfully installed"
75
+ def install_instrumentation(instrumentation, config)
76
+ if instrumentation.install(config)
77
+ OpenTelemetry.logger.info "Instrumentation: #{instrumentation.name} was successfully installed"
78
78
  else
79
- OpenTelemetry.logger.warn "Adapter: #{adapter.name} failed to install"
79
+ OpenTelemetry.logger.warn "Instrumentation: #{instrumentation.name} failed to install"
80
80
  end
81
81
  rescue => e # rubocop:disable Style/RescueStandardError
82
- OpenTelemetry.logger.warn "Adapter: #{adapter.name} unhandled exception" \
82
+ OpenTelemetry.logger.warn "Instrumentation: #{instrumentation.name} unhandled exception" \
83
83
  "during install #{e}: #{e.backtrace}"
84
84
  end
85
85
  end
@@ -9,45 +9,42 @@ module OpenTelemetry
9
9
  # single logical operation, consolidated across various components of an
10
10
  # application.
11
11
  module Trace
12
- # An invalid trace identifier, a 16-byte array with all zero bytes, encoded
13
- # as a hexadecimal string.
14
- INVALID_TRACE_ID = ('0' * 32).freeze
12
+ # An invalid trace identifier, a 16-byte string with all zero bytes.
13
+ INVALID_TRACE_ID = ("\0" * 16).b
15
14
 
16
- # An invalid span identifier, an 8-byte array with all zero bytes, encoded
17
- # as a hexadecimal string.
18
- INVALID_SPAN_ID = ('0' * 16).freeze
15
+ # An invalid span identifier, an 8-byte string with all zero bytes.
16
+ INVALID_SPAN_ID = ("\0" * 8).b
19
17
 
20
- # Generates a valid trace identifier, a 16-byte array with at least one
21
- # non-zero byte, encoded as a hexadecimal string.
18
+ # Generates a valid trace identifier, a 16-byte string with at least one
19
+ # non-zero byte.
22
20
  #
23
- # @return [String] a hexadecimal string encoding of a valid trace ID.
21
+ # @return [String] a valid trace ID.
24
22
  def self.generate_trace_id
25
23
  loop do
26
- id = Random::DEFAULT.bytes(16).unpack1('H*')
24
+ id = Random::DEFAULT.bytes(16)
27
25
  return id unless id == INVALID_TRACE_ID
28
26
  end
29
27
  end
30
28
 
31
- # Generates a valid span identifier, an 8-byte array with at least one
32
- # non-zero byte, encoded as a hexadecimal string.
29
+ # Generates a valid span identifier, an 8-byte string with at least one
30
+ # non-zero byte.
33
31
  #
34
- # @return [String] a hexadecimal string encoding of a valid span ID.
32
+ # @return [String] a valid span ID.
35
33
  def self.generate_span_id
36
34
  loop do
37
- id = Random::DEFAULT.bytes(8).unpack1('H*')
35
+ id = Random::DEFAULT.bytes(8)
38
36
  return id unless id == INVALID_SPAN_ID
39
37
  end
40
38
  end
41
39
  end
42
40
  end
43
41
 
44
- require 'opentelemetry/trace/event'
45
42
  require 'opentelemetry/trace/link'
46
- require 'opentelemetry/trace/propagation'
47
43
  require 'opentelemetry/trace/trace_flags'
48
44
  require 'opentelemetry/trace/span_context'
49
45
  require 'opentelemetry/trace/span_kind'
50
46
  require 'opentelemetry/trace/span'
51
47
  require 'opentelemetry/trace/status'
48
+ require 'opentelemetry/trace/propagation'
52
49
  require 'opentelemetry/trace/tracer'
53
50
  require 'opentelemetry/trace/tracer_provider'
@@ -5,8 +5,8 @@
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
7
  require 'opentelemetry/trace/propagation/trace_context/trace_parent'
8
- require 'opentelemetry/trace/propagation/trace_context/text_extractor'
9
- require 'opentelemetry/trace/propagation/trace_context/text_injector'
8
+ require 'opentelemetry/trace/propagation/trace_context/text_map_extractor'
9
+ require 'opentelemetry/trace/propagation/trace_context/text_map_injector'
10
10
 
11
11
  module OpenTelemetry
12
12
  module Trace
@@ -16,30 +16,30 @@ module OpenTelemetry
16
16
  module TraceContext
17
17
  extend self
18
18
 
19
- TEXT_EXTRACTOR = TextExtractor.new
20
- TEXT_INJECTOR = TextInjector.new
21
- RACK_EXTRACTOR = TextExtractor.new(
19
+ TEXT_MAP_EXTRACTOR = TextMapExtractor.new
20
+ TEXT_MAP_INJECTOR = TextMapInjector.new
21
+ RACK_EXTRACTOR = TextMapExtractor.new(
22
22
  traceparent_key: 'HTTP_TRACEPARENT',
23
23
  tracestate_key: 'HTTP_TRACESTATE'
24
24
  )
25
- RACK_INJECTOR = TextInjector.new(
25
+ RACK_INJECTOR = TextMapInjector.new(
26
26
  traceparent_key: 'HTTP_TRACEPARENT',
27
27
  tracestate_key: 'HTTP_TRACESTATE'
28
28
  )
29
29
 
30
- private_constant :TEXT_INJECTOR, :TEXT_EXTRACTOR,
30
+ private_constant :TEXT_MAP_INJECTOR, :TEXT_MAP_EXTRACTOR,
31
31
  :RACK_INJECTOR, :RACK_EXTRACTOR
32
32
 
33
33
  # Returns an extractor that extracts context using the W3C Trace Context
34
34
  # format
35
- def text_extractor
36
- TEXT_EXTRACTOR
35
+ def text_map_extractor
36
+ TEXT_MAP_EXTRACTOR
37
37
  end
38
38
 
39
39
  # Returns an injector that injects context using the W3C Trace Context
40
40
  # format
41
- def text_injector
42
- TEXT_INJECTOR
41
+ def text_map_injector
42
+ TEXT_MAP_INJECTOR
43
43
  end
44
44
 
45
45
  # Returns an extractor that extracts context using the W3C Trace Context
@@ -8,15 +8,15 @@ module OpenTelemetry
8
8
  module Propagation
9
9
  module TraceContext
10
10
  # Extracts context from carriers in the W3C Trace Context format
11
- class TextExtractor
11
+ class TextMapExtractor
12
12
  include Context::Propagation::DefaultGetter
13
13
 
14
- # Returns a new TextExtractor that extracts context using the
14
+ # Returns a new TextMapExtractor that extracts context using the
15
15
  # specified header keys
16
16
  #
17
17
  # @param [String] traceparent_key The traceparent header key used in the carrier
18
18
  # @param [String] tracestate_key The tracestate header key used in the carrier
19
- # @return [TextExtractor]
19
+ # @return [TextMapExtractor]
20
20
  def initialize(traceparent_key: 'traceparent',
21
21
  tracestate_key: 'tracestate')
22
22
  @traceparent_key = traceparent_key
@@ -47,7 +47,8 @@ module OpenTelemetry
47
47
  trace_flags: tp.flags,
48
48
  tracestate: tracestate,
49
49
  remote: true)
50
- context.set_value(ContextKeys.extracted_span_context_key, span_context)
50
+ span = Trace::Span.new(span_context: span_context)
51
+ context.set_value(ContextKeys.current_span_key, span)
51
52
  rescue OpenTelemetry::Error
52
53
  context
53
54
  end
@@ -8,15 +8,15 @@ module OpenTelemetry
8
8
  module Propagation
9
9
  module TraceContext
10
10
  # Injects context into carriers using the W3C Trace Context format
11
- class TextInjector
11
+ class TextMapInjector
12
12
  include Context::Propagation::DefaultSetter
13
13
 
14
- # Returns a new TextInjector that injects context using the
14
+ # Returns a new TextMapInjector that injects context using the
15
15
  # specified header keys
16
16
  #
17
17
  # @param [String] traceparent_key The traceparent header key used in the carrier
18
18
  # @param [String] tracestate_key The tracestate header key used in the carrier
19
- # @return [TextInjector]
19
+ # @return [TextMapInjector]
20
20
  def initialize(traceparent_key: 'traceparent',
21
21
  tracestate_key: 'tracestate')
22
22
  @traceparent_key = traceparent_key
@@ -45,8 +45,7 @@ module OpenTelemetry
45
45
  private
46
46
 
47
47
  def span_context_from(context)
48
- context[ContextKeys.current_span_key]&.context ||
49
- context[ContextKeys.extracted_span_context_key]
48
+ context[ContextKeys.current_span_key]&.context
50
49
  end
51
50
  end
52
51
  end
@@ -25,6 +25,10 @@ module OpenTelemetry
25
25
  REGEXP = /^(?<version>[A-Fa-f0-9]{2})-(?<trace_id>[A-Fa-f0-9]{32})-(?<span_id>[A-Fa-f0-9]{16})-(?<flags>[A-Fa-f0-9]{2})(?<ignored>-.*)?$/.freeze
26
26
  private_constant :REGEXP
27
27
 
28
+ INVALID_TRACE_ID = OpenTelemetry::Trace::SpanContext::INVALID.hex_trace_id
29
+ INVALID_SPAN_ID = OpenTelemetry::Trace::SpanContext::INVALID.hex_span_id
30
+ private_constant :INVALID_TRACE_ID, :INVALID_SPAN_ID
31
+
28
32
  class << self
29
33
  # Creates a new {TraceParent} from a supplied {Trace::SpanContext}
30
34
  # @param [SpanContext] ctx The context
@@ -71,17 +75,17 @@ module OpenTelemetry
71
75
  end
72
76
 
73
77
  def parse_trace_id(string)
74
- raise InvalidTraceIDError, string if string == OpenTelemetry::Trace::INVALID_TRACE_ID
78
+ raise InvalidTraceIDError, string if string == INVALID_TRACE_ID
75
79
 
76
80
  string.downcase!
77
- string
81
+ Array(string).pack('H*')
78
82
  end
79
83
 
80
84
  def parse_span_id(string)
81
- raise InvalidSpanIDError, string if string == OpenTelemetry::Trace::INVALID_SPAN_ID
85
+ raise InvalidSpanIDError, string if string == INVALID_SPAN_ID
82
86
 
83
87
  string.downcase!
84
- string
88
+ Array(string).pack('H*')
85
89
  end
86
90
 
87
91
  def parse_flags(string)
@@ -102,7 +106,7 @@ module OpenTelemetry
102
106
  # converts this object into a string according to the w3c spec
103
107
  # @return [String] the serialized trace_parent
104
108
  def to_s
105
- "00-#{trace_id}-#{span_id}-#{flag_string}"
109
+ "00-#{trace_id.unpack1('H*')}-#{span_id.unpack1('H*')}-#{flag_string}"
106
110
  end
107
111
 
108
112
  private
@@ -50,7 +50,7 @@ module OpenTelemetry
50
50
  # meanings.
51
51
  #
52
52
  # @param [String] key
53
- # @param [String, Boolean, Numeric] value
53
+ # @param [String, Boolean, Numeric, Array<String, Numeric, Boolean>] value
54
54
  #
55
55
  # @return [self] returns itself
56
56
  def set_attribute(key, value)
@@ -58,44 +58,36 @@ module OpenTelemetry
58
58
  end
59
59
  alias []= set_attribute
60
60
 
61
- # Add an Event to a {Span}. This can be accomplished eagerly or lazily.
62
- # Lazy evaluation is useful when the event attributes are expensive to
63
- # build and where the cost can be avoided for an unsampled {Span}.
61
+ # Add an event to a {Span}.
64
62
  #
65
- # Eager example:
63
+ # Example:
66
64
  #
67
- # span.add_event(name: 'event', attributes: {'eager' => true})
68
- #
69
- # Lazy example:
70
- #
71
- # span.add_event { tracer.create_event(name: 'event', attributes: {'eager' => false}) }
65
+ # span.add_event('event', attributes: {'eager' => true})
72
66
  #
73
67
  # Note that the OpenTelemetry project
74
68
  # {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md
75
69
  # documents} certain "standard event names and keys" which have
76
70
  # prescribed semantic meanings.
77
71
  #
78
- # @param [optional String] name Optional name of the event. This is
79
- # required if a block is not given.
72
+ # @param [String] name Name of the event.
80
73
  # @param [optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}]
81
74
  # attributes One or more key:value pairs, where the keys must be
82
75
  # strings and the values may be (array of) string, boolean or numeric
83
- # type. This argument should only be used when passing in a name.
76
+ # type.
84
77
  # @param [optional Time] timestamp Optional timestamp for the event.
85
- # This argument should only be used when passing in a name.
86
78
  #
87
79
  # @return [self] returns itself
88
- def add_event(name: nil, attributes: nil, timestamp: nil)
80
+ def add_event(name, attributes: nil, timestamp: nil)
89
81
  self
90
82
  end
91
83
 
92
- # Record an error during the execution of this span. Multiple errors
84
+ # Record an exception during the execution of this span. Multiple exceptions
93
85
  # can be recorded on a span.
94
86
  #
95
- # @param [Exception] error The error to recorded
87
+ # @param [Exception] exception The exception to recorded
96
88
  #
97
89
  # @return [void]
98
- def record_error(error); end
90
+ def record_exception(exception); end
99
91
 
100
92
  # Sets the Status to the Span
101
93
  #
@@ -11,7 +11,7 @@ module OpenTelemetry
11
11
  # {TraceFlags}, a system-specific tracestate, and a boolean indicating that the SpanContext was
12
12
  # extracted from the wire.
13
13
  class SpanContext
14
- attr_reader :trace_id, :span_id, :trace_flags, :tracestate
14
+ attr_reader :trace_flags, :tracestate
15
15
 
16
16
  # Returns a new {SpanContext}.
17
17
  #
@@ -35,6 +35,30 @@ module OpenTelemetry
35
35
  @remote = remote
36
36
  end
37
37
 
38
+ # Returns the lowercase [hex encoded](https://tools.ietf.org/html/rfc4648#section-8) trace ID.
39
+ #
40
+ # @return [String] A 32-hex-character lowercase string.
41
+ def hex_trace_id
42
+ @trace_id.unpack1('H*')
43
+ end
44
+
45
+ # Returns the lowercase [hex encoded](https://tools.ietf.org/html/rfc4648#section-8) span ID.
46
+ #
47
+ # @return [String] A 16-hex-character lowercase string.
48
+ def hex_span_id
49
+ @span_id.unpack1('H*')
50
+ end
51
+
52
+ # Returns the binary representation of the trace ID.
53
+ #
54
+ # @return [String] A 16-byte binary string.
55
+ attr_reader :trace_id
56
+
57
+ # Returns the binary representation of the span ID.
58
+ #
59
+ # @return [String] An 8-byte binary string.
60
+ attr_reader :span_id
61
+
38
62
  # Returns true if the {SpanContext} has a non-zero trace ID and non-zero span ID.
39
63
  #
40
64
  # @return [Boolean]
@@ -26,7 +26,7 @@ module OpenTelemetry
26
26
 
27
27
  # Initialize a Status.
28
28
  #
29
- # @param [Integer] canonical_code One of the standard gRPC codes: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
29
+ # @param [Integer] canonical_code One of the canonical status codes below
30
30
  # @param [String] description
31
31
  def initialize(canonical_code, description: '')
32
32
  @canonical_code = canonical_code
@@ -37,78 +37,20 @@ module OpenTelemetry
37
37
  #
38
38
  # @return [Boolean]
39
39
  def ok?
40
- @canonical_code == OK
40
+ @canonical_code != ERROR
41
41
  end
42
42
 
43
43
  # The following represents the canonical set of status codes of a
44
- # finished {Span}, following the standard gRPC codes:
45
- # https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
44
+ # finished {Span}
46
45
 
47
46
  # The operation completed successfully.
48
47
  OK = 0
49
48
 
50
- # The operation was cancelled (typically by the caller).
51
- CANCELLED = 1
49
+ # The default status.
50
+ UNSET = 1
52
51
 
53
- # An unknown error.
54
- UNKNOWN_ERROR = 2
55
-
56
- # Client specified an invalid argument. Note that this differs from
57
- # {FAILED_PRECONDITION}. {INVALID_ARGUMENT} indicates arguments that are
58
- # problematic regardless of the state of the system.
59
- INVALID_ARGUMENT = 3
60
-
61
- # Deadline expired before operation could complete. For operations that
62
- # change the state of the system, this error may be returned even if the
63
- # operation has completed successfully.
64
- DEADLINE_EXCEEDED = 4
65
-
66
- # Some requested entity (e.g., file or directory) was not found.
67
- NOT_FOUND = 5
68
-
69
- # Some entity that we attempted to create (e.g., file or directory)
70
- # already exists.
71
- ALREADY_EXISTS = 6
72
-
73
- # The caller does not have permission to execute the specified operation.
74
- # {PERMISSION_DENIED} must not be used if the caller cannot be identified
75
- # (use {UNAUTHENTICATED} instead for those errors).
76
- PERMISSION_DENIED = 7
77
-
78
- # Some resource has been exhausted, perhaps a per-user quota, or perhaps
79
- # the entire file system is out of space.
80
- RESOURCE_EXHAUSTED = 8
81
-
82
- # Operation was rejected because the system is not in a state required
83
- # for the operation's execution.
84
- FAILED_PRECONDITION = 9
85
-
86
- # The operation was aborted, typically due to a concurrency issue like
87
- # sequencer check failures, transaction aborts, etc.
88
- ABORTED = 10
89
-
90
- # Operation was attempted past the valid range. E.g., seeking or reading
91
- # past end of file. Unlike {INVALID_ARGUMENT}, this error indicates a
92
- # problem that may be fixed if the system state changes.
93
- OUT_OF_RANGE = 11
94
-
95
- # Operation is not implemented or not supported/enabled in this service.
96
- UNIMPLEMENTED = 12
97
-
98
- # Internal errors. Means some invariants expected by underlying system
99
- # has been broken.
100
- INTERNAL_ERROR = 13
101
-
102
- # The service is currently unavailable. This is a most likely a transient
103
- # condition and may be corrected by retrying with a backoff.
104
- UNAVAILABLE = 14
105
-
106
- # Unrecoverable data loss or corruption.
107
- DATA_LOSS = 15
108
-
109
- # The request does not have valid authentication credentials for the
110
- # operation.
111
- UNAUTHENTICATED = 16
52
+ # An error.
53
+ ERROR = 2
112
54
  end
113
55
  end
114
56
  end