feat 基础模块拆分为雪花和日志模块

This commit is contained in:
2026-02-07 13:13:02 +08:00
parent 5a0f4b71d4
commit 0ca8a0ccbb
6 changed files with 91 additions and 28 deletions

View File

@@ -15,7 +15,7 @@ import (
// Tracer 链路追踪模块
type Tracer struct {
DefaultModule
MetricCfg *config.MetricConfig
Cfg *config.MetricConfig
ServiceName string
tp *sdktrace.TracerProvider
}
@@ -24,7 +24,7 @@ func (m *Tracer) Init() error {
exporter, err := otlptracegrpc.New(
context.Background(),
otlptracegrpc.WithInsecure(),
otlptracegrpc.WithEndpoint(m.MetricCfg.Jaeger.Endpoint),
otlptracegrpc.WithEndpoint(m.Cfg.Jaeger.Endpoint),
)
if err != nil {
return err