verica-observability 0.1.0 → 0.1.1
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/README.md +3 -4
- data/lib/verica/config.rb +6 -5
- data/lib/verica/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 849499723f11e316ccfd5f3a8f6028c7ad5f05a7ce0f3836e5548754058dc3aa
|
|
4
|
+
data.tar.gz: 1212149d9f415487b332076c49a5a57b21819a3985798bba9d796f85e5d5c566
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ec6c31c9cb14ccb7ba29bac576d90417db64d99b2f19da786a2405b65a604a34369b165b46082264fd8b9b4b264a468f75bf2ee8988f918759b8b56b09d7dfb
|
|
7
|
+
data.tar.gz: ec4e4f40b3967327e8f9c126fa2061aeb126367f77cf8ab955a492118ef7a491979103c41bdbc3d87d979f4d7926a145320bf130094f9fd1740b53148720f57c
|
data/README.md
CHANGED
|
@@ -14,7 +14,7 @@ gem install verica-observability
|
|
|
14
14
|
```ruby
|
|
15
15
|
require 'verica'
|
|
16
16
|
|
|
17
|
-
Verica.init(token: ENV['VERICA_TOKEN']
|
|
17
|
+
Verica.init(token: ENV['VERICA_TOKEN'])
|
|
18
18
|
client = Verica.wrap_openai(OpenAI::Client.new)
|
|
19
19
|
# use `client` exactly like the original; chat completions are traced.
|
|
20
20
|
```
|
|
@@ -28,7 +28,7 @@ returning a plain Hash. It gets its own wrapper.
|
|
|
28
28
|
```ruby
|
|
29
29
|
require 'verica'
|
|
30
30
|
|
|
31
|
-
Verica.init(token: ENV['VERICA_TOKEN']
|
|
31
|
+
Verica.init(token: ENV['VERICA_TOKEN'])
|
|
32
32
|
client = Verica.wrap_ruby_openai(OpenAI::Client.new)
|
|
33
33
|
|
|
34
34
|
client.chat(parameters: {
|
|
@@ -60,12 +60,11 @@ span batch is exported.
|
|
|
60
60
|
| Option / env var | Default | Notes |
|
|
61
61
|
| --------------------------------------------- | ---------- | ------------------------------- |
|
|
62
62
|
| `token:` / `VERICA_TOKEN` | (required) | ingest-scoped API token |
|
|
63
|
-
| `endpoint:` / `VERICA_ENDPOINT` | (required) | your Verica origin |
|
|
64
63
|
| `capture_content:` / `VERICA_CAPTURE_CONTENT` | `true` | send prompt/response content |
|
|
65
64
|
| `conversation_id:` | (none) | stamps `gen_ai.conversation.id` |
|
|
66
65
|
| `service_name:` / `OTEL_SERVICE_NAME` | `app` | resource service.name |
|
|
67
66
|
| `debug:` / `VERICA_DEBUG` | `false` | log export errors |
|
|
68
67
|
|
|
69
|
-
Fail-open by design: if
|
|
68
|
+
Fail-open by design: if Verica is unreachable or the token is invalid, spans are
|
|
70
69
|
dropped and your app is never affected. Export errors are silent unless `debug`
|
|
71
70
|
is on.
|
data/lib/verica/config.rb
CHANGED
|
@@ -4,14 +4,15 @@ module Verica
|
|
|
4
4
|
# Config resolution: options > env vars > defaults. Pure.
|
|
5
5
|
Config = Struct.new(:token, :endpoint, :capture_content, :conversation_id, :service_name, :debug,
|
|
6
6
|
keyword_init: true) do
|
|
7
|
+
# Verica's hosted ingest endpoint. Override via the `endpoint:` option or the
|
|
8
|
+
# VERICA_ENDPOINT env var for self-host or local dev. Only `token` is required.
|
|
9
|
+
DEFAULT_ENDPOINT = 'https://ingest.verica.app'
|
|
10
|
+
|
|
7
11
|
def self.resolve(options, env)
|
|
8
12
|
token = (options[:token] || env['VERICA_TOKEN'] || '').to_s
|
|
9
|
-
|
|
10
|
-
missing = []
|
|
11
|
-
missing << 'token' if token.empty?
|
|
12
|
-
missing << 'endpoint' if raw_endpoint.empty?
|
|
13
|
-
return [nil, missing] unless missing.empty?
|
|
13
|
+
return [nil, ['token']] if token.empty?
|
|
14
14
|
|
|
15
|
+
raw_endpoint = (options[:endpoint] || env['VERICA_ENDPOINT'] || DEFAULT_ENDPOINT).to_s
|
|
15
16
|
capture = options[:capture_content]
|
|
16
17
|
capture = env.key?('VERICA_CAPTURE_CONTENT') ? %w[1 true].include?(env['VERICA_CAPTURE_CONTENT']) : true if capture.nil?
|
|
17
18
|
|
data/lib/verica/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: verica-observability
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Verica
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: opentelemetry-exporter-otlp
|