riffer 0.35.0 → 0.36.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.
@@ -1,72 +0,0 @@
1
- # Generated from lib/riffer/metrics.rb with RBS::Inline
2
-
3
- # Internal metrics port — records OTEL metric instruments when the host bundles
4
- # the OpenTelemetry metrics API and no-ops otherwise, so riffer never declares
5
- # an OTEL dependency.
6
- module Riffer::Metrics
7
- @backend: untyped
8
-
9
- MUTEX: Mutex
10
-
11
- # The Ruby API cannot attach a schema URL to a meter, so the semconv pin
12
- # lives here as the documented contract version.
13
- SCHEMA_URL: String
14
-
15
- # A handle to a named histogram, safe to hold as a constant: it defers backend
16
- # resolution to record time, so it survives a meter-provider swap or a runtime
17
- # +enabled+ flip.
18
- class Histogram
19
- @name: String
20
-
21
- @unit: String?
22
-
23
- @description: String?
24
-
25
- # --
26
- # : (String, ?unit: String?, ?description: String?) -> void
27
- def initialize: (String, ?unit: String?, ?description: String?) -> void
28
-
29
- # --
30
- # : (Numeric, ?attributes: Hash[String, untyped]?) -> void
31
- def record: (Numeric, ?attributes: Hash[String, untyped]?) -> void
32
- end
33
-
34
- # Returns a handle to the named histogram.
35
- # --
36
- # : (String, ?unit: String?, ?description: String?) -> Riffer::Metrics::Histogram
37
- def create_histogram: (String, ?unit: String?, ?description: String?) -> Riffer::Metrics::Histogram
38
-
39
- # Records a value onto the named histogram.
40
- # --
41
- # : (String, Numeric, ?unit: String?, ?description: String?, ?attributes: Hash[String, untyped]?) -> void
42
- def record_histogram: (String, Numeric, ?unit: String?, ?description: String?, ?attributes: Hash[String, untyped]?) -> void
43
-
44
- # Mirrors a span's +recording?+ so a caller can skip work that exists only to
45
- # feed a metric. True for any live backend — the OTEL backend or a
46
- # consumer-supplied one — so a custom metrics sink still gets fed.
47
- # --
48
- # : () -> bool
49
- def recording?: () -> bool
50
-
51
- # Reads the monotonic clock in seconds — the time source for duration metrics,
52
- # immune to wall-clock adjustments.
53
- # --
54
- # : () -> Float
55
- def monotonic_now: () -> Float
56
-
57
- # Discards the resolved backend so the next record re-resolves it; cached
58
- # instruments live on that backend, so this clears them too.
59
- # --
60
- # : () -> void
61
- def reset!: () -> void
62
-
63
- private
64
-
65
- # --
66
- # : () -> untyped
67
- def backend: () -> untyped
68
-
69
- # --
70
- # : () -> untyped
71
- def resolve_backend: () -> untyped
72
- end
@@ -1,5 +0,0 @@
1
- # `Riffer::Metrics::NoOp` uses `extend self`; rbs-inline doesn't emit that, so
2
- # re-extend here to expose its instance methods as singleton methods.
3
- module Riffer::Metrics::NoOp
4
- extend ::Riffer::Metrics::NoOp
5
- end
@@ -1,5 +0,0 @@
1
- # `Riffer::Metrics` uses `extend self`; rbs-inline doesn't emit that, so
2
- # re-extend here to expose its instance methods as singleton methods.
3
- module Riffer::Metrics
4
- extend ::Riffer::Metrics
5
- end