uptrace 1.5.0 → 1.8.0
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 +4 -4
- data/README.md +7 -8
- data/lib/uptrace/dsn.rb +1 -1
- data/lib/uptrace/version.rb +1 -1
- data/lib/uptrace.rb +12 -1
- metadata +35 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 971f276de0abbfd5a5b4e505927b12a92f206a47f857c7d2a1f55106e1739dde
|
4
|
+
data.tar.gz: ed4e4cb6f17964dc4819dca13b998a69fba3ac20ccea4ba54b14701d069d584e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4c60178f506bb083dc4fe13fedfac8f440feebac8a23c6dfd4040388448c2c20dee1977cdd65df69237dfd6626ed2604877fd418a699a4de58d91ffa844864b
|
7
|
+
data.tar.gz: edb380d1fabc98cfd62b667dc3cdb8b343398a97e6ef89a1769057d6c6e6f91548ba1e37b65af7e475d31ee66c12c9ae52947c77437c1de5eafe28191b797fed
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# Uptrace Ruby exporter for OpenTelemetry
|
2
2
|
|
3
3
|

|
4
|
-
[](https://uptrace.dev/get/opentelemetry-ruby
|
4
|
+
[](https://uptrace.dev/get/opentelemetry-ruby)
|
5
5
|
[](https://t.me/uptrace)
|
6
6
|
|
7
|
-
<a href="https://uptrace.dev/get/opentelemetry-ruby
|
8
|
-
<img src="https://uptrace.dev/
|
7
|
+
<a href="https://uptrace.dev/get/opentelemetry-ruby">
|
8
|
+
<img src="https://uptrace.dev/devicon/ruby-original.svg" height="200px" />
|
9
9
|
</a>
|
10
10
|
|
11
11
|
## Introduction
|
12
12
|
|
13
13
|
uptrace-ruby is an OpenTelemery distribution configured to export
|
14
|
-
[traces](https://uptrace.dev/opentelemetry/distributed-tracing
|
14
|
+
[traces](https://uptrace.dev/opentelemetry/distributed-tracing) to Uptrace.
|
15
15
|
|
16
16
|
## Quickstart
|
17
17
|
|
@@ -71,7 +71,6 @@ OpenTelemetry.tracer_provider.shutdown
|
|
71
71
|
## Links
|
72
72
|
|
73
73
|
- [Examples](example)
|
74
|
-
- [Documentation](https://uptrace.dev/get/opentelemetry-ruby
|
75
|
-
- [OpenTelemetry
|
76
|
-
- [OpenTelemetry
|
77
|
-
- [OpenTelemetry Sinatra](https://uptrace.dev/opentelemetry/instrumentations/ruby-sinatra.html)
|
74
|
+
- [Documentation](https://uptrace.dev/get/opentelemetry-ruby)
|
75
|
+
- [OpenTelemetry Rails](https://uptrace.dev/guides/opentelemetry-rails)
|
76
|
+
- [OpenTelemetry Sinatra](https://uptrace.dev/guides/opentelemetry-sinatra)
|
data/lib/uptrace/dsn.rb
CHANGED
@@ -40,7 +40,7 @@ module Uptrace
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def otlp_http_endpoint
|
43
|
-
return 'https://
|
43
|
+
return 'https://api.uptrace.dev' if @host == 'uptrace.dev'
|
44
44
|
return "#{@scheme}://#{@host}:#{@http_port}" if @http_port != 443
|
45
45
|
|
46
46
|
"#{@scheme}://#{@host}"
|
data/lib/uptrace/version.rb
CHANGED
data/lib/uptrace.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
require 'logger'
|
4
4
|
|
5
5
|
require 'opentelemetry/exporter/otlp'
|
6
|
+
require 'opentelemetry-metrics-sdk'
|
7
|
+
require 'opentelemetry-exporter-otlp-metrics'
|
6
8
|
|
7
9
|
# Uptrace provides Uptrace exporters for OpenTelemetry.
|
8
10
|
module Uptrace
|
@@ -38,6 +40,8 @@ module Uptrace
|
|
38
40
|
|
39
41
|
yield c if block_given?
|
40
42
|
end
|
43
|
+
|
44
|
+
OpenTelemetry.meter_provider.add_metric_reader(metric_exporter(@client.dsn))
|
41
45
|
end
|
42
46
|
|
43
47
|
private
|
@@ -45,7 +49,6 @@ module Uptrace
|
|
45
49
|
def span_processor(dsn)
|
46
50
|
exporter = OpenTelemetry::Exporter::OTLP::Exporter.new(
|
47
51
|
endpoint: "#{dsn.otlp_http_endpoint}/v1/traces",
|
48
|
-
# Set the Uptrace DSN here or use UPTRACE_DSN env var.
|
49
52
|
headers: { 'uptrace-dsn': dsn.to_s },
|
50
53
|
compression: 'gzip'
|
51
54
|
)
|
@@ -56,6 +59,14 @@ module Uptrace
|
|
56
59
|
schedule_delay: 5_000
|
57
60
|
)
|
58
61
|
end
|
62
|
+
|
63
|
+
def metric_exporter(dsn)
|
64
|
+
OpenTelemetry::Exporter::OTLP::Metrics::MetricsExporter.new(
|
65
|
+
endpoint: "#{dsn.otlp_http_endpoint}/v1/metrics",
|
66
|
+
headers: { 'uptrace-dsn': dsn.to_s },
|
67
|
+
compression: 'gzip'
|
68
|
+
)
|
69
|
+
end
|
59
70
|
end
|
60
71
|
|
61
72
|
require 'uptrace/version'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uptrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uptrace Authors
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: opentelemetry-exporter-otlp
|
@@ -16,28 +15,56 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.30.0
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
25
|
+
version: 0.30.0
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: opentelemetry-sdk
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
32
|
+
version: 1.8.0
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
39
|
+
version: 1.8.0
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: opentelemetry-exporter-otlp-metrics
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.4.0
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.4.0
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: opentelemetry-metrics-sdk
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.6.0
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.6.0
|
41
68
|
- !ruby/object:Gem::Dependency
|
42
69
|
name: bundler
|
43
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,7 +199,6 @@ licenses:
|
|
172
199
|
- BSD-2-Clause
|
173
200
|
metadata:
|
174
201
|
rubygems_mfa_required: 'true'
|
175
|
-
post_install_message:
|
176
202
|
rdoc_options: []
|
177
203
|
require_paths:
|
178
204
|
- lib
|
@@ -187,8 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
213
|
- !ruby/object:Gem::Version
|
188
214
|
version: '0'
|
189
215
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
191
|
-
signing_key:
|
216
|
+
rubygems_version: 3.6.2
|
192
217
|
specification_version: 4
|
193
218
|
summary: Uptrace Ruby exporter for OpenTelemetry
|
194
219
|
test_files: []
|