feat: 实现日志追踪链路 #185

Merged
huanghaosheng merged 30 commits from feature/log-track into develop 2026-06-21 23:23:23 +08:00
Showing only changes of commit d6e9555a97 - Show all commits

View File

@@ -11,6 +11,7 @@ import (
"strings"
"time"
"github.com/hhs/camtalk/internal/trace"
"github.com/hhs/camtalk/internal/util"
"go.uber.org/zap"
)
@@ -109,7 +110,8 @@ func (m *MiMoService) SynthesizeStream(ctx context.Context, textStream <-chan st
audio, err := m.synthesize(ctx, text, voice)
if err != nil {
m.logger.Warnw("mimo tts: synthesize failed",
log := trace.FromContext(ctx)
log.Warnw("mimo tts: synthesize failed",
"error", err,
"text_len", len(text),
"text_preview", util.Truncate(text, 100))