gritz-otel 0.3.0 → 0.9.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/CHANGELOG.md +8 -0
- data/README.md +9 -3
- data/lib/gritz/otel/recorder.rb +1 -0
- data/lib/gritz/otel/tracing.rb +2 -0
- data/lib/gritz/otel/version.rb +1 -1
- data/lib/gritz/otel.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71f61970a3657ab8b082481d5727dd67b8714cc25b80776dec464486d0da9323
|
|
4
|
+
data.tar.gz: 3579d81b6510ca51bf8d3b684b9c67f2a52f55a9c22bdf7fc5abc76be06010e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26b1cb414aa8931f129791b9b7822fe4fedebca20f8a1bcafbc6bbaa92a1fbffc101850ceb7c50fbe679dcc293c2d98c68bd457f91ef293ea43e146cfbf96856
|
|
7
|
+
data.tar.gz: 27ec43db2166f8f19f3eb6b42463e1835b0aef21a85b4440752094c6da1d5b8adc0eb5e68f4f843fd935c9d6bc813b00a5d5f13f896df98040c8a2652c86836e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
- Require Gritz Core 0.9.0 for startup TLS-file validation and the stabilization support policy.
|
|
6
|
+
|
|
7
|
+
## 0.3.1
|
|
8
|
+
|
|
9
|
+
- Use gritz-core 0.6.1 to avoid formatting suppressed RPC completion logs.
|
|
10
|
+
|
|
3
11
|
## 0.3.0
|
|
4
12
|
|
|
5
13
|
- Support gritz-core 0.6.0 for Native and Async server tracing, with isolated context for overlapping RPC fibers.
|
data/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Server and client spans and worker OTLP metrics for [Gritz](https://github.com/gritzrpc/gritz). SDK providers and exporters start in worker boot hooks, after fork. This optional integration depends on `gritz-core`; applications choose their transport separately.
|
|
4
4
|
|
|
5
|
-
Requires CRuby 3.3 or later and Gritz 0.
|
|
5
|
+
Requires CRuby 3.3 or later and Gritz 0.9.0. The OpenTelemetry metrics SDK is currently alpha; this gem pins its supported minor versions.
|
|
6
6
|
|
|
7
7
|
## Installation and configuration
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
|
-
gem "gritz", "~> 0.
|
|
11
|
-
gem "gritz-otel", "~> 0.
|
|
10
|
+
gem "gritz", "~> 0.9.0"
|
|
11
|
+
gem "gritz-otel", "~> 0.9.0"
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
In the Gritz configuration file:
|
|
@@ -65,6 +65,12 @@ See the [three-service integration report](docs/reports/T4-08-client-chain.md) f
|
|
|
65
65
|
|
|
66
66
|
The 0.1.0 release supports Gritz 0.4.0; the 0.2.0 release supports Gritz 0.5.0; the 0.3.0 release supports Gritz 0.6.0, including Async server fibers.
|
|
67
67
|
|
|
68
|
+
The 0.9 series supports Gritz 0.9 during stabilization.
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
Read the [published guides and API reference](https://gritzrpc.github.io/gritz/), [public API policy](https://github.com/gritzrpc/gritz/blob/main/docs/public-api.md), [support policy](https://github.com/gritzrpc/gritz/blob/main/docs/support-policy.md) and [stabilization gate](https://github.com/gritzrpc/gritz/blob/main/docs/stabilization.md).
|
|
73
|
+
|
|
68
74
|
## License
|
|
69
75
|
|
|
70
76
|
[MIT](LICENSE.txt).
|
data/lib/gritz/otel/recorder.rb
CHANGED
data/lib/gritz/otel/tracing.rb
CHANGED
|
@@ -41,6 +41,7 @@ module Gritz
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# Wraps the complete server dispatch, including streaming and error mapping.
|
|
44
|
+
# @api private
|
|
44
45
|
class ServerTracing
|
|
45
46
|
def initialize(app) = @app = app
|
|
46
47
|
|
|
@@ -59,6 +60,7 @@ module Gritz
|
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
# Capture the caller when the invocation is created, before lazy stream consumption.
|
|
63
|
+
# @api private
|
|
62
64
|
class ClientTracing
|
|
63
65
|
def initialize(app)
|
|
64
66
|
@app = app
|
data/lib/gritz/otel/version.rb
CHANGED
data/lib/gritz/otel.rb
CHANGED
|
@@ -7,14 +7,18 @@ require_relative "otel/tracing"
|
|
|
7
7
|
require_relative "otel/recorder"
|
|
8
8
|
|
|
9
9
|
module Gritz
|
|
10
|
+
# Optional worker-local OpenTelemetry integration.
|
|
11
|
+
# @api public
|
|
10
12
|
module Otel
|
|
11
13
|
# Configuration-file syntax for this optional integration.
|
|
14
|
+
# @api public
|
|
12
15
|
module ConfigurationDSL
|
|
13
16
|
def opentelemetry(&) = Otel.install(@config, &)
|
|
14
17
|
end
|
|
15
18
|
|
|
16
19
|
class << self
|
|
17
20
|
# Registration is safe before fork; SDK providers/exporters are built in the worker hook.
|
|
21
|
+
# @api public
|
|
18
22
|
def install(config, &configure)
|
|
19
23
|
return config if config.middleware.entries.any? { |entry| entry.middleware == ServerTracing }
|
|
20
24
|
raise Gritz::ConfigurationError, "a metrics recorder is already installed" if config.metrics_recorder_factory
|
|
@@ -84,6 +88,7 @@ module Gritz
|
|
|
84
88
|
# Keep a slow collector within the worker's heartbeat and shutdown budgets.
|
|
85
89
|
# @api private
|
|
86
90
|
def export_timeout(config) = [1.0, config.status_interval / 2.0, config.shutdown_timeout / 4.0].min
|
|
91
|
+
# @api private
|
|
87
92
|
def monotonic = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
88
93
|
|
|
89
94
|
private
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gritz-otel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yudai Takada
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.9.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.9.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: opentelemetry-exporter-otlp
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|