opentelemetry-api 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +9 -0
- data/CHANGELOG.md +1 -0
- data/LICENSE +201 -0
- data/OVERVIEW.md +66 -0
- data/lib/opentelemetry-api.rb +7 -0
- data/lib/opentelemetry.rb +61 -0
- data/lib/opentelemetry/context.rb +154 -0
- data/lib/opentelemetry/context/key.rb +29 -0
- data/lib/opentelemetry/context/propagation.rb +22 -0
- data/lib/opentelemetry/context/propagation/composite_propagator.rb +73 -0
- data/lib/opentelemetry/context/propagation/default_getter.rb +26 -0
- data/lib/opentelemetry/context/propagation/default_setter.rb +26 -0
- data/lib/opentelemetry/context/propagation/noop_extractor.rb +26 -0
- data/lib/opentelemetry/context/propagation/noop_injector.rb +26 -0
- data/lib/opentelemetry/context/propagation/propagation.rb +27 -0
- data/lib/opentelemetry/context/propagation/propagator.rb +64 -0
- data/lib/opentelemetry/correlation_context.rb +16 -0
- data/lib/opentelemetry/correlation_context/builder.rb +18 -0
- data/lib/opentelemetry/correlation_context/manager.rb +36 -0
- data/lib/opentelemetry/correlation_context/propagation.rb +57 -0
- data/lib/opentelemetry/correlation_context/propagation/context_keys.rb +27 -0
- data/lib/opentelemetry/correlation_context/propagation/text_extractor.rb +60 -0
- data/lib/opentelemetry/correlation_context/propagation/text_injector.rb +55 -0
- data/lib/opentelemetry/error.rb +9 -0
- data/lib/opentelemetry/instrumentation.rb +15 -0
- data/lib/opentelemetry/instrumentation/base.rb +245 -0
- data/lib/opentelemetry/instrumentation/registry.rb +87 -0
- data/lib/opentelemetry/internal.rb +22 -0
- data/lib/opentelemetry/metrics.rb +16 -0
- data/lib/opentelemetry/metrics/handles.rb +44 -0
- data/lib/opentelemetry/metrics/instruments.rb +105 -0
- data/lib/opentelemetry/metrics/meter.rb +72 -0
- data/lib/opentelemetry/metrics/meter_provider.rb +22 -0
- data/lib/opentelemetry/trace.rb +51 -0
- data/lib/opentelemetry/trace/event.rb +46 -0
- data/lib/opentelemetry/trace/link.rb +46 -0
- data/lib/opentelemetry/trace/propagation.rb +17 -0
- data/lib/opentelemetry/trace/propagation/context_keys.rb +35 -0
- data/lib/opentelemetry/trace/propagation/trace_context.rb +59 -0
- data/lib/opentelemetry/trace/propagation/trace_context/text_extractor.rb +58 -0
- data/lib/opentelemetry/trace/propagation/trace_context/text_injector.rb +55 -0
- data/lib/opentelemetry/trace/propagation/trace_context/trace_parent.rb +130 -0
- data/lib/opentelemetry/trace/span.rb +145 -0
- data/lib/opentelemetry/trace/span_context.rb +56 -0
- data/lib/opentelemetry/trace/span_kind.rb +35 -0
- data/lib/opentelemetry/trace/status.rb +114 -0
- data/lib/opentelemetry/trace/trace_flags.rb +50 -0
- data/lib/opentelemetry/trace/tracer.rb +103 -0
- data/lib/opentelemetry/trace/tracer_provider.rb +22 -0
- data/lib/opentelemetry/trace/util/http_to_status.rb +47 -0
- data/lib/opentelemetry/version.rb +10 -0
- metadata +220 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
# A SpanContext contains the state that must propagate to child {Span}s and across process boundaries.
|
10
|
+
# It contains the identifiers (a trace ID and span ID) associated with the {Span}, a set of
|
11
|
+
# {TraceFlags}, a system-specific tracestate, and a boolean indicating that the SpanContext was
|
12
|
+
# extracted from the wire.
|
13
|
+
class SpanContext
|
14
|
+
attr_reader :trace_id, :span_id, :trace_flags, :tracestate
|
15
|
+
|
16
|
+
# Returns a new {SpanContext}.
|
17
|
+
#
|
18
|
+
# @param [optional String] trace_id The trace ID associated with a {Span}.
|
19
|
+
# @param [optional String] span_id The span ID associated with a {Span}.
|
20
|
+
# @param [optional TraceFlags] trace_flags The trace flags associated with a {Span}.
|
21
|
+
# @param [optional String] tracestate The tracestate associated with a {Span}. May be nil.
|
22
|
+
# @param [optional Boolean] remote Whether the {SpanContext} was extracted from the wire.
|
23
|
+
# @return [SpanContext]
|
24
|
+
def initialize(
|
25
|
+
trace_id: Trace.generate_trace_id,
|
26
|
+
span_id: Trace.generate_span_id,
|
27
|
+
trace_flags: TraceFlags::DEFAULT,
|
28
|
+
tracestate: nil,
|
29
|
+
remote: false
|
30
|
+
)
|
31
|
+
@trace_id = trace_id
|
32
|
+
@span_id = span_id
|
33
|
+
@trace_flags = trace_flags
|
34
|
+
@tracestate = tracestate
|
35
|
+
@remote = remote
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns true if the {SpanContext} has a non-zero trace ID and non-zero span ID.
|
39
|
+
#
|
40
|
+
# @return [Boolean]
|
41
|
+
def valid?
|
42
|
+
@trace_id != INVALID_TRACE_ID && @span_id != INVALID_SPAN_ID
|
43
|
+
end
|
44
|
+
|
45
|
+
# Returns true if the {SpanContext} was propagated from a remote parent.
|
46
|
+
#
|
47
|
+
# @return [Boolean]
|
48
|
+
def remote?
|
49
|
+
@remote
|
50
|
+
end
|
51
|
+
|
52
|
+
# Represents an invalid {SpanContext}, with an invalid trace ID and an invalid span ID.
|
53
|
+
INVALID = new(trace_id: INVALID_TRACE_ID, span_id: INVALID_SPAN_ID)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
# Type of span. Can be used to specify additional relationships between spans in addition to a
|
10
|
+
# parent/child relationship. For API ergonomics, use of the symbols rather than the constants
|
11
|
+
# may be preferred. For example:
|
12
|
+
#
|
13
|
+
# span = tracer.start_span('op', kind: :client)
|
14
|
+
module SpanKind
|
15
|
+
# Default value. Indicates that the span is used internally.
|
16
|
+
INTERNAL = :internal
|
17
|
+
|
18
|
+
# Indicates that the span covers server-side handling of an RPC or other remote request.
|
19
|
+
SERVER = :server
|
20
|
+
|
21
|
+
# Indicates that the span covers the client-side wrapper around an RPC or other remote request.
|
22
|
+
CLIENT = :client
|
23
|
+
|
24
|
+
# Indicates that the span describes producer sending a message to a broker. Unlike client and
|
25
|
+
# server, there is no direct critical path latency relationship between producer and consumer
|
26
|
+
# spans.
|
27
|
+
PRODUCER = :producer
|
28
|
+
|
29
|
+
# Indicates that the span describes consumer recieving a message from a broker. Unlike client
|
30
|
+
# and server, there is no direct critical path latency relationship between producer and
|
31
|
+
# consumer spans.
|
32
|
+
CONSUMER = :consumer
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
require 'opentelemetry/trace/util/http_to_status'
|
8
|
+
|
9
|
+
module OpenTelemetry
|
10
|
+
module Trace
|
11
|
+
# Status represents the status of a finished {Span}. It is composed of a
|
12
|
+
# canonical code in conjunction with an optional descriptive message.
|
13
|
+
class Status
|
14
|
+
# Convenience utility, not in API spec:
|
15
|
+
extend Util::HttpToStatus
|
16
|
+
|
17
|
+
# Retrieve the canonical code of this Status.
|
18
|
+
#
|
19
|
+
# @return [Integer]
|
20
|
+
attr_reader :canonical_code
|
21
|
+
|
22
|
+
# Retrieve the description of this Status.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :description
|
26
|
+
|
27
|
+
# Initialize a Status.
|
28
|
+
#
|
29
|
+
# @param [Integer] canonical_code One of the standard gRPC codes: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
|
30
|
+
# @param [String] description
|
31
|
+
def initialize(canonical_code, description: '')
|
32
|
+
@canonical_code = canonical_code
|
33
|
+
@description = description
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns false if this {Status} represents an error, else returns true.
|
37
|
+
#
|
38
|
+
# @return [Boolean]
|
39
|
+
def ok?
|
40
|
+
@canonical_code == OK
|
41
|
+
end
|
42
|
+
|
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
|
46
|
+
|
47
|
+
# The operation completed successfully.
|
48
|
+
OK = 0
|
49
|
+
|
50
|
+
# The operation was cancelled (typically by the caller).
|
51
|
+
CANCELLED = 1
|
52
|
+
|
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
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
# TraceFlags contain details about the trace. Unlike Tracestate values,
|
10
|
+
# TraceFlags are present in all traces. Currently, the only TraceFlag is a
|
11
|
+
# boolean {sampled?} {https://www.w3.org/TR/trace-context/#trace-flags flag}.
|
12
|
+
class TraceFlags
|
13
|
+
class << self
|
14
|
+
private :new # rubocop:disable Style/AccessModifierDeclarations
|
15
|
+
|
16
|
+
# Returns a newly created {TraceFlags} with the specified flags.
|
17
|
+
#
|
18
|
+
# @param [Integer] flags 8-bit byte of bit flags
|
19
|
+
# @return [TraceFlags]
|
20
|
+
def from_byte(flags)
|
21
|
+
flags = 0 unless flags & ~0xFF == 0 # rubocop:disable Style/NumericPredicate
|
22
|
+
|
23
|
+
new(flags)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# @api private
|
28
|
+
# The constructor is private and only for use internally by the class.
|
29
|
+
# Users should use the {from_byte} factory method to obtain a {TraceFlags}
|
30
|
+
# instance.
|
31
|
+
#
|
32
|
+
# @param [Integer] flags 8-bit byte of bit flags
|
33
|
+
# @return [TraceFlags]
|
34
|
+
def initialize(flags)
|
35
|
+
@flags = flags
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns whether the caller may have recorded trace data. When false,
|
39
|
+
# the caller did not record trace data out-of-band.
|
40
|
+
#
|
41
|
+
# @return [Boolean]
|
42
|
+
def sampled?
|
43
|
+
(@flags & 1) != 0
|
44
|
+
end
|
45
|
+
|
46
|
+
DEFAULT = from_byte(0)
|
47
|
+
SAMPLED = from_byte(1)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
# No-op implementation of Tracer.
|
10
|
+
class Tracer
|
11
|
+
EXTRACTED_SPAN_CONTEXT_KEY = Propagation::ContextKeys.extracted_span_context_key
|
12
|
+
CURRENT_SPAN_KEY = Propagation::ContextKeys.current_span_key
|
13
|
+
|
14
|
+
private_constant :EXTRACTED_SPAN_CONTEXT_KEY, :CURRENT_SPAN_KEY
|
15
|
+
|
16
|
+
# Returns the current span from the current or provided context
|
17
|
+
#
|
18
|
+
# @param [optional Context] context The context to lookup the current
|
19
|
+
# {Span} from. Defaults to Context.current
|
20
|
+
def current_span(context = Context.current)
|
21
|
+
context.value(CURRENT_SPAN_KEY) || Span::INVALID
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns the the active span context from the given {Context}, or current
|
25
|
+
# if one is not explicitly passed in. The active span context may refer to
|
26
|
+
# a {SpanContext} that has been extracted. If both a current {Span} and an
|
27
|
+
# extracted, {SpanContext} exist, the context of the current {Span} will be
|
28
|
+
# returned.
|
29
|
+
#
|
30
|
+
# @param [optional Context] context The context to lookup the active
|
31
|
+
# {SpanContext} from.
|
32
|
+
#
|
33
|
+
def active_span_context(context = nil)
|
34
|
+
context ||= Context.current
|
35
|
+
context.value(CURRENT_SPAN_KEY)&.context ||
|
36
|
+
context.value(EXTRACTED_SPAN_CONTEXT_KEY) ||
|
37
|
+
SpanContext::INVALID
|
38
|
+
end
|
39
|
+
|
40
|
+
# This is a helper for the default use-case of extending the current trace with a span.
|
41
|
+
#
|
42
|
+
# With this helper:
|
43
|
+
#
|
44
|
+
# OpenTelemetry.tracer.in_span('do-the-thing') do ... end
|
45
|
+
#
|
46
|
+
# Equivalent without helper:
|
47
|
+
#
|
48
|
+
# OpenTelemetry.tracer.with_span(OpenTelemetry.tracer.start_span('do-the-thing')) do ... end
|
49
|
+
#
|
50
|
+
# On exit, the Span that was active before calling this method will be reactivated. If an
|
51
|
+
# exception occurs during the execution of the provided block, it will be recorded on the
|
52
|
+
# span and reraised.
|
53
|
+
# @yield [span, context] yields the newly created span and a context containing the
|
54
|
+
# span to the block.
|
55
|
+
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, with_parent: nil, with_parent_context: nil)
|
56
|
+
span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind, with_parent: with_parent, with_parent_context: with_parent_context)
|
57
|
+
with_span(span) { |s, c| yield s, c }
|
58
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
59
|
+
span.record_error(e)
|
60
|
+
span.status = Status.new(Status::UNKNOWN_ERROR,
|
61
|
+
description: "Unhandled exception of type: #{e.class}")
|
62
|
+
raise e
|
63
|
+
ensure
|
64
|
+
span.finish
|
65
|
+
end
|
66
|
+
|
67
|
+
# Activates/deactivates the Span within the current Context, which makes the "current span"
|
68
|
+
# available implicitly.
|
69
|
+
#
|
70
|
+
# On exit, the Span that was active before calling this method will be reactivated.
|
71
|
+
#
|
72
|
+
# @param [Span] span the span to activate
|
73
|
+
# @yield [span, context] yields span and a context containing the span to the block.
|
74
|
+
def with_span(span)
|
75
|
+
Context.with_value(CURRENT_SPAN_KEY, span) { |c, s| yield s, c }
|
76
|
+
end
|
77
|
+
|
78
|
+
def start_root_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
|
79
|
+
Span.new
|
80
|
+
end
|
81
|
+
|
82
|
+
# Used when a caller wants to manage the activation/deactivation and lifecycle of
|
83
|
+
# the Span and its parent manually.
|
84
|
+
#
|
85
|
+
# Parent context can be either passed explicitly, or inferred from currently activated span.
|
86
|
+
#
|
87
|
+
# @param [optional Span] with_parent Explicitly managed parent Span, overrides
|
88
|
+
# +with_parent_context+.
|
89
|
+
# @param [optional Context] with_parent_context Explicitly managed. Overridden by
|
90
|
+
# +with_parent+.
|
91
|
+
#
|
92
|
+
# @return [Span]
|
93
|
+
def start_span(name, with_parent: nil, with_parent_context: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
|
94
|
+
span_context = with_parent&.context || active_span_context(with_parent_context)
|
95
|
+
if span_context.valid?
|
96
|
+
Span.new(span_context: span_context)
|
97
|
+
else
|
98
|
+
Span.new
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
# No-op implementation of a tracer provider.
|
10
|
+
class TracerProvider
|
11
|
+
# Returns a {Tracer} instance.
|
12
|
+
#
|
13
|
+
# @param [optional String] name Instrumentation package name
|
14
|
+
# @param [optional String] version Instrumentation package version
|
15
|
+
#
|
16
|
+
# @return [Tracer]
|
17
|
+
def tracer(name = nil, version = nil)
|
18
|
+
@tracer ||= Tracer.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module OpenTelemetry
|
8
|
+
module Trace
|
9
|
+
module Util
|
10
|
+
# Convenience methods, not necessarily required by the API specification.
|
11
|
+
module HttpToStatus
|
12
|
+
# Implemented according to
|
13
|
+
# https://github.com/open-telemetry/opentelemetry-specification/issues/306
|
14
|
+
# https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md#status
|
15
|
+
#
|
16
|
+
# @param code Numeric HTTP status
|
17
|
+
# @return Status
|
18
|
+
def http_to_status(code) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
19
|
+
case code.to_i
|
20
|
+
when 100..399
|
21
|
+
new(const_get(:OK))
|
22
|
+
when 401
|
23
|
+
new(const_get(:UNAUTHENTICATED))
|
24
|
+
when 403
|
25
|
+
new(const_get(:PERMISSION_DENIED))
|
26
|
+
when 404
|
27
|
+
new(const_get(:NOT_FOUND))
|
28
|
+
when 429
|
29
|
+
new(const_get(:RESOURCE_EXHAUSTED))
|
30
|
+
when 400..499
|
31
|
+
new(const_get(:INVALID_ARGUMENT))
|
32
|
+
when 501
|
33
|
+
new(const_get(:UNIMPLEMENTED))
|
34
|
+
when 503
|
35
|
+
new(const_get(:UNAVAILABLE))
|
36
|
+
when 504
|
37
|
+
new(const_get(:DEADLINE_EXCEEDED))
|
38
|
+
when 500..599
|
39
|
+
new(const_get(:INTERNAL_ERROR))
|
40
|
+
else
|
41
|
+
new(const_get(:UNKNOWN_ERROR))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: opentelemetry-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- OpenTelemetry Authors
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: benchmark-ipsa
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.17'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.17'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.13'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.13'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '12.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '12.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.73.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.73.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.17'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.17'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: yard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.9'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.9'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: yard-doctest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.1.6
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.1.6
|
139
|
+
description: A stats collection and distributed tracing framework
|
140
|
+
email:
|
141
|
+
- cncf-opentelemetry-contributors@lists.cncf.io
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".yardopts"
|
147
|
+
- CHANGELOG.md
|
148
|
+
- LICENSE
|
149
|
+
- OVERVIEW.md
|
150
|
+
- lib/opentelemetry-api.rb
|
151
|
+
- lib/opentelemetry.rb
|
152
|
+
- lib/opentelemetry/context.rb
|
153
|
+
- lib/opentelemetry/context/key.rb
|
154
|
+
- lib/opentelemetry/context/propagation.rb
|
155
|
+
- lib/opentelemetry/context/propagation/composite_propagator.rb
|
156
|
+
- lib/opentelemetry/context/propagation/default_getter.rb
|
157
|
+
- lib/opentelemetry/context/propagation/default_setter.rb
|
158
|
+
- lib/opentelemetry/context/propagation/noop_extractor.rb
|
159
|
+
- lib/opentelemetry/context/propagation/noop_injector.rb
|
160
|
+
- lib/opentelemetry/context/propagation/propagation.rb
|
161
|
+
- lib/opentelemetry/context/propagation/propagator.rb
|
162
|
+
- lib/opentelemetry/correlation_context.rb
|
163
|
+
- lib/opentelemetry/correlation_context/builder.rb
|
164
|
+
- lib/opentelemetry/correlation_context/manager.rb
|
165
|
+
- lib/opentelemetry/correlation_context/propagation.rb
|
166
|
+
- lib/opentelemetry/correlation_context/propagation/context_keys.rb
|
167
|
+
- lib/opentelemetry/correlation_context/propagation/text_extractor.rb
|
168
|
+
- lib/opentelemetry/correlation_context/propagation/text_injector.rb
|
169
|
+
- lib/opentelemetry/error.rb
|
170
|
+
- lib/opentelemetry/instrumentation.rb
|
171
|
+
- lib/opentelemetry/instrumentation/base.rb
|
172
|
+
- lib/opentelemetry/instrumentation/registry.rb
|
173
|
+
- lib/opentelemetry/internal.rb
|
174
|
+
- lib/opentelemetry/metrics.rb
|
175
|
+
- lib/opentelemetry/metrics/handles.rb
|
176
|
+
- lib/opentelemetry/metrics/instruments.rb
|
177
|
+
- lib/opentelemetry/metrics/meter.rb
|
178
|
+
- lib/opentelemetry/metrics/meter_provider.rb
|
179
|
+
- lib/opentelemetry/trace.rb
|
180
|
+
- lib/opentelemetry/trace/event.rb
|
181
|
+
- lib/opentelemetry/trace/link.rb
|
182
|
+
- lib/opentelemetry/trace/propagation.rb
|
183
|
+
- lib/opentelemetry/trace/propagation/context_keys.rb
|
184
|
+
- lib/opentelemetry/trace/propagation/trace_context.rb
|
185
|
+
- lib/opentelemetry/trace/propagation/trace_context/text_extractor.rb
|
186
|
+
- lib/opentelemetry/trace/propagation/trace_context/text_injector.rb
|
187
|
+
- lib/opentelemetry/trace/propagation/trace_context/trace_parent.rb
|
188
|
+
- lib/opentelemetry/trace/span.rb
|
189
|
+
- lib/opentelemetry/trace/span_context.rb
|
190
|
+
- lib/opentelemetry/trace/span_kind.rb
|
191
|
+
- lib/opentelemetry/trace/status.rb
|
192
|
+
- lib/opentelemetry/trace/trace_flags.rb
|
193
|
+
- lib/opentelemetry/trace/tracer.rb
|
194
|
+
- lib/opentelemetry/trace/tracer_provider.rb
|
195
|
+
- lib/opentelemetry/trace/util/http_to_status.rb
|
196
|
+
- lib/opentelemetry/version.rb
|
197
|
+
homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
198
|
+
licenses:
|
199
|
+
- Apache-2.0
|
200
|
+
metadata: {}
|
201
|
+
post_install_message:
|
202
|
+
rdoc_options: []
|
203
|
+
require_paths:
|
204
|
+
- lib
|
205
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: 2.5.0
|
210
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
215
|
+
requirements: []
|
216
|
+
rubygems_version: 3.0.3
|
217
|
+
signing_key:
|
218
|
+
specification_version: 4
|
219
|
+
summary: A stats collection and distributed tracing framework
|
220
|
+
test_files: []
|