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.
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package o11yllmpricingprocessor // import "github.com/hanzoai/otel-collector/processor/o11yllmpricingprocessor"
|
|
|
|
import (
|
|
"context"
|
|
|
|
"go.opentelemetry.io/collector/component"
|
|
"go.opentelemetry.io/collector/consumer"
|
|
"go.opentelemetry.io/collector/processor"
|
|
"go.opentelemetry.io/collector/processor/processorhelper"
|
|
)
|
|
|
|
var processorCapabilities = consumer.Capabilities{MutatesData: true}
|
|
|
|
const typeStr = "o11yllmpricing"
|
|
|
|
// NewFactory returns the component factory for o11yllmpricingprocessor.
|
|
func NewFactory() processor.Factory {
|
|
return processor.NewFactory(
|
|
component.MustNewType(typeStr),
|
|
createDefaultConfig,
|
|
processor.WithTraces(createTracesProcessor, component.StabilityLevelDevelopment),
|
|
)
|
|
}
|
|
|
|
func createDefaultConfig() component.Config {
|
|
return &Config{}
|
|
}
|
|
|
|
func createTracesProcessor(
|
|
ctx context.Context,
|
|
set processor.Settings,
|
|
cfg component.Config,
|
|
nextConsumer consumer.Traces,
|
|
) (processor.Traces, error) {
|
|
proc := newProcessor(cfg.(*Config))
|
|
return processorhelper.NewTraces(
|
|
ctx, set, cfg, nextConsumer,
|
|
proc.ProcessTraces,
|
|
processorhelper.WithCapabilities(processorCapabilities),
|
|
)
|
|
}
|