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.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +11 -0
- data/README.md +0 -1
- data/docs/01_OVERVIEW.md +0 -1
- data/docs/03_AGENTS.md +3 -7
- data/docs/10_CONFIGURATION.md +0 -17
- data/lib/riffer/agent/run.rb +11 -35
- data/lib/riffer/agent.rb +1 -1
- data/lib/riffer/config.rb +0 -45
- data/lib/riffer/guardrails/runner.rb +7 -32
- data/lib/riffer/providers/anthropic.rb +1 -1
- data/lib/riffer/providers/base.rb +11 -75
- data/lib/riffer/tools/runtime.rb +8 -29
- data/lib/riffer/version.rb +1 -1
- data/sig/_private/opentelemetry.rbs +3 -6
- data/sig/generated/riffer/agent/run.rbs +4 -8
- data/sig/generated/riffer/agent.rbs +1 -1
- data/sig/generated/riffer/config.rbs +0 -33
- data/sig/generated/riffer/guardrails/runner.rbs +0 -8
- data/sig/generated/riffer/providers/base.rbs +2 -20
- data/sig/generated/riffer/tools/runtime.rbs +2 -6
- metadata +5 -16
- data/docs/17_METRICS.md +0 -155
- data/lib/riffer/metrics/instruments.rb +0 -31
- data/lib/riffer/metrics/no_op.rb +0 -14
- data/lib/riffer/metrics/otel.rb +0 -80
- data/lib/riffer/metrics.rb +0 -94
- data/sig/generated/riffer/metrics/instruments.rbs +0 -15
- data/sig/generated/riffer/metrics/no_op.rbs +0 -10
- data/sig/generated/riffer/metrics/otel.rbs +0 -48
- data/sig/generated/riffer/metrics.rbs +0 -72
- data/sig/manual/riffer/metrics/no_op.rbs +0 -5
- data/sig/manual/riffer/metrics.rbs +0 -5
|
@@ -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
|