mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-10-30 18:26:25 +00:00
Finish the signoz -> o11y debrand that the debrand branch left partial:
- repoint SigNoz/signoz-otel-collector/{utils,constants,keycheck,metadataexporter,
processor/*} imports to the local hanzoai/otel-collector/* copies (already folded)
- rename package signozllmpricingprocessor -> o11yllmpricingprocessor (dir+pkg+typeStr)
- rename component type IDs: signozclickhouse{metrics,meter} -> o11yclickhouse*,
signozlogspipeline -> o11ylogspipeline, signozllmpricing -> o11yllmpricing
- rename files: schema-signoz.go -> schema.go, signoz_attributes.go -> o11y_attributes.go
- vendor SigNoz/grok's mutex-patched fork in-tree as pkg/grok (Apache-2.0, self-contained)
and drop the segmentio/ksuid->signoz/ksuid + vjeantet/grok->signoz/grok replaces
- restore constants.DistributedFieldKeysTable dropped in the earlier fold
- go.mod/go.sum: SigNoz/signoz-otel-collector require gone; 0 signoz in code
Full ./... build passes. LICENSE keeps upstream Apache attribution (legal).
Residual: ClickHouse dd-sketch driver forks (ch-go, clickhouse-go/v2) — next.
117 lines
2.6 KiB
YAML
117 lines
2.6 KiB
YAML
# Full valid config — mirrors the spec.
|
|
o11yllmpricing:
|
|
attrs:
|
|
model: "gen_ai.request.model"
|
|
in: "gen_ai.usage.input_tokens"
|
|
out: "gen_ai.usage.output_tokens"
|
|
cache_read: "gen_ai.usage.input_token_details.cached"
|
|
cache_write: "gen_ai.usage.input_token_details.cache_creation"
|
|
default_pricing:
|
|
rules:
|
|
- name: gpt-4o
|
|
pattern: ["gpt-4o*"]
|
|
cache:
|
|
mode: subtract
|
|
read: 2.5
|
|
write: 0.0
|
|
in: 5.0
|
|
out: 15.0
|
|
- name: claude
|
|
pattern: ["claude-*"]
|
|
cache:
|
|
mode: additive
|
|
read: 0.30
|
|
write: 3.75
|
|
in: 3.0
|
|
out: 15.0
|
|
output_attrs:
|
|
in: "_o11y.gen_ai.cost_input"
|
|
out: "_o11y.gen_ai.cost_output"
|
|
cache_read: "_o11y.gen_ai.cost_cache_read"
|
|
cache_write: "_o11y.gen_ai.cost_cache_write"
|
|
total: "_o11y.gen_ai.total_cost"
|
|
|
|
# Minimal valid — only total output attr required.
|
|
o11yllmpricing/minimal:
|
|
attrs:
|
|
model: "gen_ai.request.model"
|
|
in: "gen_ai.usage.input_tokens"
|
|
out: "gen_ai.usage.output_tokens"
|
|
default_pricing:
|
|
rules:
|
|
- pattern: ["*"]
|
|
cache:
|
|
mode: subtract
|
|
read: 0.0
|
|
write: 0.0
|
|
in: 1.0
|
|
out: 2.0
|
|
output_attrs:
|
|
total: "_o11y.gen_ai.total_cost"
|
|
|
|
# Invalid: missing attrs.model.
|
|
o11yllmpricing/no_model_attr:
|
|
attrs:
|
|
model: ""
|
|
in: "gen_ai.usage.input_tokens"
|
|
out: "gen_ai.usage.output_tokens"
|
|
default_pricing:
|
|
rules:
|
|
- pattern: ["*"]
|
|
cache:
|
|
mode: subtract
|
|
read: 0.0
|
|
write: 0.0
|
|
in: 1.0
|
|
out: 2.0
|
|
output_attrs:
|
|
total: "_o11y.gen_ai.total_cost"
|
|
|
|
# Invalid: missing pattern (empty list).
|
|
o11yllmpricing/no_pattern:
|
|
attrs:
|
|
model: "gen_ai.request.model"
|
|
default_pricing:
|
|
rules:
|
|
- pattern: []
|
|
cache:
|
|
mode: subtract
|
|
read: 0.0
|
|
write: 0.0
|
|
in: 1.0
|
|
out: 2.0
|
|
output_attrs:
|
|
total: "_o11y.gen_ai.total_cost"
|
|
|
|
# Invalid: unknown cache.mode.
|
|
o11yllmpricing/bad_cache_mode:
|
|
attrs:
|
|
model: "gen_ai.request.model"
|
|
default_pricing:
|
|
rules:
|
|
- pattern: ["*"]
|
|
cache:
|
|
mode: unknown
|
|
read: 0.0
|
|
write: 0.0
|
|
in: 1.0
|
|
out: 2.0
|
|
output_attrs:
|
|
total: "_o11y.gen_ai.total_cost"
|
|
|
|
# Invalid: missing output_attrs.total.
|
|
o11yllmpricing/no_total_output:
|
|
attrs:
|
|
model: "gen_ai.request.model"
|
|
default_pricing:
|
|
rules:
|
|
- pattern: ["*"]
|
|
cache:
|
|
mode: subtract
|
|
read: 0.0
|
|
write: 0.0
|
|
in: 1.0
|
|
out: 2.0
|
|
output_attrs:
|
|
total: ""
|