gritz-otel 0.3.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f499535eda304bc76b063a9302f0135e3078a0fef4da5bda341a9c36765e7ea
4
- data.tar.gz: 4a31f590cd8c876bd8551be4f96411b5c858c2a5b404460e2aacb180575dea31
3
+ metadata.gz: 71f61970a3657ab8b082481d5727dd67b8714cc25b80776dec464486d0da9323
4
+ data.tar.gz: 3579d81b6510ca51bf8d3b684b9c67f2a52f55a9c22bdf7fc5abc76be06010e8
5
5
  SHA512:
6
- metadata.gz: 0e99ec3841f400b5eef5a1123d1d5b9d6827794f35e0449c0511431661976ad05c5f9bd4c9dfd81a33302a5f8e5ce5ca19c9c78d5f65a9849d9ab10e341bbe58
7
- data.tar.gz: 25093302d86217a1d5100ec96aedb48274fcf8d05906b4c2a9af967bbb933ec5a63f7889069ff368be655efb0ff7a8eea14a72a5835ac8ff3e9eea1107135b71
6
+ metadata.gz: 26b1cb414aa8931f129791b9b7822fe4fedebca20f8a1bcafbc6bbaa92a1fbffc101850ceb7c50fbe679dcc293c2d98c68bd457f91ef293ea43e146cfbf96856
7
+ data.tar.gz: 27ec43db2166f8f19f3eb6b42463e1835b0aef21a85b4440752094c6da1d5b8adc0eb5e68f4f843fd935c9d6bc813b00a5d5f13f896df98040c8a2652c86836e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ## 0.3.1
4
8
 
5
9
  - Use gritz-core 0.6.1 to avoid formatting suppressed RPC completion logs.
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.6.0. The OpenTelemetry metrics SDK is currently alpha; this gem pins its supported minor versions.
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.6.0"
11
- gem "gritz-otel", "~> 0.3.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).
@@ -3,6 +3,7 @@
3
3
  module Gritz
4
4
  module Otel
5
5
  # Preserve pipe deltas while recording worker-local SDK instruments.
6
+ # @api private
6
7
  class Recorder < Gritz::Metrics::Recorder
7
8
  def initialize(worker:, exporter: nil, timeout: 1.0)
8
9
  super()
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gritz
4
4
  module Otel
5
- VERSION = "0.3.1"
5
+ VERSION = "0.9.0"
6
6
  end
7
7
  end
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.3.1
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.6.1
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.6.1
25
+ version: 0.9.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: opentelemetry-exporter-otlp
28
28
  requirement: !ruby/object:Gem::Requirement