aspecto-opentelemetry 0.1.9 → 0.2.0.rc0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/README.md +0 -37
- data/RELEASE.md +4 -0
- data/lib/aspecto/opentelemetry/sampler/message_process_sampler.rb +2 -2
- data/lib/aspecto/opentelemetry/sampler/operator.rb +1 -1
- data/lib/aspecto/opentelemetry/version.rb +1 -1
- metadata +36 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75a92a0ba309e400a951042a672d76a9aa9fd5c0e163b87e2c1e192580b2eadc
|
4
|
+
data.tar.gz: 60c6a4a2983d91cc9e7475e33750a4d21f2f01cb851f601d42b16ec1c02f15a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dca1606e9173ef0947cf0af94564d6faac79aeec94e89d053a4d8ef564c24be180fb14173efc34f06e4533576e923b644252d1d59932417f8ee2ef50f3b78c55
|
7
|
+
data.tar.gz: b50f5a848b9998a9319ea6645ba0682ac9a5172ae5bb2c2e4ad24462d63bbd9d9e3f1a75ef13bdd04980d4282a93e2f023952102703f91f539e75c3cddfc6efd
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -19,8 +19,6 @@ Or, if you use [bundler](https://bundler.io), include aspecto-opentelemetry in y
|
|
19
19
|
|
20
20
|
### Rails Applications
|
21
21
|
|
22
|
-
#### Configuration in Code
|
23
|
-
|
24
22
|
Add this code to a new file `aspecto.rb` under `config/initializers/`:
|
25
23
|
|
26
24
|
```rb
|
@@ -34,26 +32,8 @@ Aspecto::OpenTelemetry::configure do |c|
|
|
34
32
|
end
|
35
33
|
```
|
36
34
|
|
37
|
-
#### Configuration via Environment Variables
|
38
|
-
|
39
|
-
In your Gemfile:
|
40
|
-
|
41
|
-
```
|
42
|
-
gem 'aspecto-opentelemetry', require: 'aspecto/auto_instrument'
|
43
|
-
```
|
44
|
-
|
45
|
-
And set environment variables:
|
46
|
-
|
47
|
-
```
|
48
|
-
OTEL_SERVICE_NAME=<YOUR_SERVICE_NAME>
|
49
|
-
ASPECTO_AUTH=<YOUR_ASPECTO_TOKEN>
|
50
|
-
# ASPECTO_SAMPLING_RATIO=1.0 # [optional]: defaults to 1.0, use aspecto app to configure remotely
|
51
|
-
```
|
52
|
-
|
53
35
|
### Ruby Applications
|
54
36
|
|
55
|
-
#### Configuration in Code
|
56
|
-
|
57
37
|
Add this code after your require other gems:
|
58
38
|
|
59
39
|
```rb
|
@@ -67,23 +47,6 @@ Aspecto::OpenTelemetry::configure do |c|
|
|
67
47
|
end
|
68
48
|
```
|
69
49
|
|
70
|
-
#### Configuration via Environment Variables
|
71
|
-
|
72
|
-
Add this require statement after your require other gems:
|
73
|
-
|
74
|
-
```rb
|
75
|
-
require 'aspecto/auto_instrument'
|
76
|
-
```
|
77
|
-
|
78
|
-
And set environment variables:
|
79
|
-
|
80
|
-
```
|
81
|
-
OTEL_SERVICE_NAME=<YOUR_SERVICE_NAME>
|
82
|
-
ASPECTO_AUTH=<YOUR_ASPECTO_TOKEN>
|
83
|
-
# ASPECTO_ENV=<CURRENT_ENVIRONMENT> # [optional]: automatically detected for rails and sinatra
|
84
|
-
# ASPECTO_SAMPLING_RATIO=1.0 # [optional]: defaults to 1.0, use aspecto app to configure remotely
|
85
|
-
```
|
86
|
-
|
87
50
|
### Shutdown
|
88
51
|
|
89
52
|
Call this function when your application shuts down
|
data/RELEASE.md
ADDED
@@ -29,7 +29,7 @@ module Aspecto
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def should_sample_processing(parent_context, links, name, attributes)
|
32
|
-
return if !links || links.
|
32
|
+
return if !links || links.empty?
|
33
33
|
|
34
34
|
decision = link_decision(links[0])
|
35
35
|
|
@@ -38,7 +38,7 @@ module Aspecto
|
|
38
38
|
if is_root # rubocop:disable Style/GuardClause
|
39
39
|
matched_rule = @rules_sampler.matching_rule(name: name, attributes: attributes)
|
40
40
|
rule_context = matched_rule&.context
|
41
|
-
|
41
|
+
::OpenTelemetry::SDK::Trace::Samplers::Result.new(decision: decision, tracestate: ::OpenTelemetry::Trace.current_span(parent_context).context.tracestate) if rule_context && rule_context["messaging.sampling.inherit_from_publisher"]
|
42
42
|
end
|
43
43
|
|
44
44
|
# if not root, then we need to check if the entry span set "messaging.sampling.inherit_from_publisher" on the context.
|
@@ -7,7 +7,7 @@ module Aspecto
|
|
7
7
|
module Sampler
|
8
8
|
# A single operator used to evaluate sampling rules
|
9
9
|
class Operator
|
10
|
-
def initialize(operator, expected)
|
10
|
+
def initialize(operator, expected) # rubocop:disable Metrics/AbcSize
|
11
11
|
@expected = expected&.downcase
|
12
12
|
@expected = Regexp.new(@expected) if operator == "matches"
|
13
13
|
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspecto-opentelemetry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.rc0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspecto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: opentelemetry-exporter-otlp
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1
|
19
|
+
version: 0.26.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1
|
26
|
+
version: 0.26.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: opentelemetry-
|
28
|
+
name: opentelemetry-instrumentation-all
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.50.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.50.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: opentelemetry-instrumentation-
|
42
|
+
name: opentelemetry-instrumentation-aws_sdk
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.5.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: opentelemetry-propagator-b3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.21.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.21.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: opentelemetry-resource-detector-deployment
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.0
|
89
|
+
version: 1.3.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.0
|
96
|
+
version: 1.3.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rufus-scheduler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.20.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.20.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: opentelemetry-test-helpers
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.4.0
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - '='
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
152
|
+
version: 0.4.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rake
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,6 +204,7 @@ files:
|
|
190
204
|
- Gemfile
|
191
205
|
- LICENSE
|
192
206
|
- README.md
|
207
|
+
- RELEASE.md
|
193
208
|
- Rakefile
|
194
209
|
- lib/aspecto/auto_instrument.rb
|
195
210
|
- lib/aspecto/opentelemetry.rb
|
@@ -218,14 +233,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
233
|
requirements:
|
219
234
|
- - ">="
|
220
235
|
- !ruby/object:Gem::Version
|
221
|
-
version:
|
236
|
+
version: 3.0.0
|
222
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
238
|
requirements:
|
224
|
-
- - "
|
239
|
+
- - ">"
|
225
240
|
- !ruby/object:Gem::Version
|
226
|
-
version:
|
241
|
+
version: 1.3.1
|
227
242
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
243
|
+
rubygems_version: 3.4.10
|
229
244
|
signing_key:
|
230
245
|
specification_version: 4
|
231
246
|
summary: Aspecto SDK and OpenTelemetry distribution for ruby programming language
|