langfuse-rb 0.10.0 → 0.11.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 +44 -1
- data/lib/langfuse/api_client.rb +175 -509
- data/lib/langfuse/app_root_tracking.rb +164 -0
- data/lib/langfuse/cache_warmer.rb +21 -13
- data/lib/langfuse/chat_prompt_client.rb +21 -4
- data/lib/langfuse/client.rb +174 -229
- data/lib/langfuse/config.rb +308 -65
- data/lib/langfuse/evaluation.rb +8 -4
- data/lib/langfuse/exit_hook.rb +77 -0
- data/lib/langfuse/fork_safety.rb +71 -0
- data/lib/langfuse/masking_exporter.rb +98 -0
- data/lib/langfuse/observations.rb +2 -1
- data/lib/langfuse/otel_attributes.rb +1 -0
- data/lib/langfuse/otel_setup.rb +32 -44
- data/lib/langfuse/otel_span_batch.rb +113 -0
- data/lib/langfuse/otel_span_masking.rb +89 -0
- data/lib/langfuse/otel_span_patch_applier.rb +97 -0
- data/lib/langfuse/pending_score_queue.rb +62 -0
- data/lib/langfuse/prompt_cache.rb +11 -0
- data/lib/langfuse/prompt_cache_coordinator.rb +288 -0
- data/lib/langfuse/prompt_cache_events.rb +31 -10
- data/lib/langfuse/prompt_variables.rb +54 -0
- data/lib/langfuse/propagation.rb +101 -34
- data/lib/langfuse/rails_cache_adapter.rb +27 -2
- data/lib/langfuse/read_api.rb +242 -0
- data/lib/langfuse/resilient_metrics_reporter.rb +60 -0
- data/lib/langfuse/score_client.rb +209 -89
- data/lib/langfuse/score_value.rb +58 -0
- data/lib/langfuse/span_processor.rb +53 -4
- data/lib/langfuse/stale_while_revalidate.rb +3 -4
- data/lib/langfuse/text_prompt_client.rb +15 -6
- data/lib/langfuse/trace_export_guard.rb +47 -0
- data/lib/langfuse/traced_execution.rb +18 -12
- data/lib/langfuse/types.rb +15 -1
- data/lib/langfuse/version.rb +1 -1
- data/lib/langfuse.rb +157 -44
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cdad4b4c1edea98dac2e1929430a30fd8cf7b8831a6603b41192055f20f76516
|
|
4
|
+
data.tar.gz: 526062c59b48af70225ee68a44ef70ef127cb2cf83ba33f5f5e314597e680d9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bf11c145c2c13a2ed6af21a8c0936781034c66516084896d22dc4510537da26234a4bd8f3ff070472e42f13aba88d94efabbfa753bb9dd837e0cf978a1d8fb5
|
|
7
|
+
data.tar.gz: 2ef511ee676296bdfb78523a04b345e3ea6705e3c82bed4102bfd49722775929a651c5059572b76f9b49ee3308962d8b562abbab2b99b4dfc839cd6af414e075
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.11.0] - 2026-08-19
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> **Contributor acknowledgment:** Thank you to [Alan Marx](https://github.com/Alan-Marx) for contributions in #98, #99, #100, and #102.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- Read current observations, metrics, and typed scores through the client API (#95).
|
|
17
|
+
- Create and read text and correction scores (#97, #102).
|
|
18
|
+
- Create scores synchronously and receive the created score ID (#102).
|
|
19
|
+
- Check global client readiness locally with `Langfuse.configured?` (#98).
|
|
20
|
+
- Send OpenTelemetry batch processor metrics to an application reporter (#99).
|
|
21
|
+
- Inject an OpenTelemetry span exporter into the Langfuse tracing pipeline (#100).
|
|
22
|
+
- Inspect referenced Mustache variables in source order (#111).
|
|
23
|
+
- Disable Langfuse tracing and scoring with one configuration switch (#110).
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Export traces through direct Langfuse v4 OTLP ingestion (#103).
|
|
27
|
+
- Read timeout, batch, flush interval, and debug defaults from environment variables (#106).
|
|
28
|
+
- Bound the asynchronous score queue and split large batch payloads (#109).
|
|
29
|
+
- Reject invalid batch settings during client construction (#109).
|
|
30
|
+
- Require non-empty API keys and an absolute HTTP or HTTPS base URL (#98).
|
|
31
|
+
- Use a null logger when `Config#logger` is `nil` (#98).
|
|
32
|
+
- Use a no-op tracer for implicit observations when tracing configuration is invalid (#98).
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- Mask third-party OpenTelemetry spans without changing spans for other exporters (#96).
|
|
36
|
+
- Reset SDK queues and workers after Ruby `fork` (#107).
|
|
37
|
+
- Flush pending spans and scores during normal process exit (#108).
|
|
38
|
+
- Apply the configured environment to scores without an explicit override (#105).
|
|
39
|
+
- Report invalid numeric, cache, and tracing settings as `ConfigurationError` (#98).
|
|
40
|
+
- Validate tracing batch and sampling settings before processor creation (#98).
|
|
41
|
+
- Reject explicit Rails cache configuration when `Rails.cache` is unavailable (#98).
|
|
42
|
+
|
|
43
|
+
### Documentation
|
|
44
|
+
- Organize the SDK guides by task and add data-access verification guidance (#113).
|
|
45
|
+
|
|
46
|
+
## [0.10.1] - 2026-05-05
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- Refactor prompt cache internals (#91)
|
|
50
|
+
|
|
10
51
|
## [0.10.0] - 2026-05-05
|
|
11
52
|
|
|
12
53
|
### Added
|
|
@@ -124,7 +165,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
124
165
|
- Migrated from legacy ingestion API to OTLP endpoint
|
|
125
166
|
- Removed `tracing_enabled` configuration flag (#2)
|
|
126
167
|
|
|
127
|
-
[Unreleased]: https://github.com/simplepractice/langfuse-rb/compare/v0.
|
|
168
|
+
[Unreleased]: https://github.com/simplepractice/langfuse-rb/compare/v0.11.0...HEAD
|
|
169
|
+
[0.11.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.10.1...v0.11.0
|
|
170
|
+
[0.10.1]: https://github.com/simplepractice/langfuse-rb/compare/v0.10.0...v0.10.1
|
|
128
171
|
[0.10.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.9.0...v0.10.0
|
|
129
172
|
[0.9.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.8.0...v0.9.0
|
|
130
173
|
[0.8.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.7.0...v0.8.0
|