opentelemetry-test-helpers 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91b45f1555b6a5732e7f07d39382a251a1e470cfe67e812b70a880318331c100
4
- data.tar.gz: c1a7d1c8889a45d123ecc878816efa2d83438a7750e0d182852b15d1a82e191e
3
+ metadata.gz: 004b4b32010f297002452903941d889f42122d31a38d7b6a010f79b1753682ec
4
+ data.tar.gz: 245145b11f04bd297da424bcff6d7b863ebdb30d9ef0485200d20a9b777dc945
5
5
  SHA512:
6
- metadata.gz: d430d21b97327686ffc53946a19a55f2095e33d64824ceb456930d99b49773246331fda763407176b70aa6750bc60794dc0bffb93c195882c96363e404b930f5
7
- data.tar.gz: 1aad1a9dde435ed88dd042d80df22586b4deaded1a9a90f33ca6948863f22aa456c5de00817c9f5022dfa3059c4e6716bd4397b9f8d77afa70036817c8375cd1
6
+ metadata.gz: 89f57cfe1552dfab50710456112f2fe168c4e44a3140ddb326b9b5ae1a8a21d21fa2b3255a1df4b33f938f22c6a87ec3b23761dab474c0e8fe9ff37e77a4b5fb
7
+ data.tar.gz: a79ca35ef8dbd2272a7a0071388f5d29a2bf798fefc4d373e3ae54fdf2598155d19d94f4f00ee805e4ba38295546d091f50854a9265b12053202b7f43dbd905b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-test-helpers
2
2
 
3
+ ### v0.3.0 / 2022-09-14
4
+
5
+ * ADDED: Support InstrumentationScope, and update OTLP proto to 0.18.0
6
+
7
+ ### v0.2.0 / 2022-06-09
8
+
9
+ * ADDED: Otlp grpc
10
+
3
11
  ### v0.1.0 / 2022-04-22
4
12
 
5
13
  * Initial release.
@@ -7,6 +7,6 @@
7
7
  module OpenTelemetry
8
8
  ## Current OpenTelemetry Test Helpers version
9
9
  module TestHelpers
10
- VERSION = '0.1.0'
10
+ VERSION = '0.3.0'
11
11
  end
12
12
  end
@@ -54,5 +54,25 @@ module OpenTelemetry
54
54
  env_to_reset.each_pair { |k, v| ENV[k] = v }
55
55
  keys_to_delete.each { |k| ENV.delete(k) }
56
56
  end
57
+
58
+ def with_ids(trace_id, span_id)
59
+ OpenTelemetry::Trace.stub(:generate_trace_id, trace_id) do
60
+ OpenTelemetry::Trace.stub(:generate_span_id, span_id) do
61
+ yield
62
+ end
63
+ end
64
+ end
65
+
66
+ def create_span_data(name: '', kind: nil, status: nil, parent_span_id: OpenTelemetry::Trace::INVALID_SPAN_ID,
67
+ total_recorded_attributes: 0, total_recorded_events: 0, total_recorded_links: 0, start_timestamp: OpenTelemetry::TestHelpers.exportable_timestamp,
68
+ end_timestamp: OpenTelemetry::TestHelpers.exportable_timestamp, attributes: nil, links: nil, events: nil, resource: nil,
69
+ instrumentation_scope: OpenTelemetry::SDK::InstrumentationScope.new('', 'v0.0.1'),
70
+ span_id: OpenTelemetry::Trace.generate_span_id, trace_id: OpenTelemetry::Trace.generate_trace_id,
71
+ trace_flags: OpenTelemetry::Trace::TraceFlags::DEFAULT, tracestate: nil)
72
+ resource ||= OpenTelemetry::SDK::Resources::Resource.telemetry_sdk
73
+ OpenTelemetry::SDK::Trace::SpanData.new(name, kind, status, parent_span_id, total_recorded_attributes,
74
+ total_recorded_events, total_recorded_links, start_timestamp, end_timestamp,
75
+ attributes, links, events, resource, instrumentation_scope, span_id, trace_id, trace_flags, tracestate)
76
+ end
57
77
  end
58
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-test-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: opentelemetry-sdk
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pry
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -154,10 +168,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
154
168
  licenses:
155
169
  - Apache-2.0
156
170
  metadata:
157
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-test-helpers/v0.1.0/file.CHANGELOG.html
171
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-test-helpers/v0.3.0/file.CHANGELOG.html
158
172
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/test_helpers
159
173
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
160
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-test-helpers/v0.1.0
174
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-test-helpers/v0.3.0
161
175
  post_install_message:
162
176
  rdoc_options: []
163
177
  require_paths:
@@ -166,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
180
  requirements:
167
181
  - - ">="
168
182
  - !ruby/object:Gem::Version
169
- version: 2.5.0
183
+ version: 2.6.0
170
184
  required_rubygems_version: !ruby/object:Gem::Requirement
171
185
  requirements:
172
186
  - - ">="