feat(telegram): 添加Telegram启用检查逻辑
Build docker and publish / build (20.15.1) (push) Successful in 5m15s

fix(trace): 移除服务中的trace初始化代码并优化agent日志

feat(docker): 添加docker-compose.yaml配置文件

refactor(trace): 为agent添加超时设置和启动日志

chore: 添加nginx配置文件示例
This commit is contained in:
2026-01-06 22:29:07 -08:00
parent ef64a876cd
commit d0a3b36791
5 changed files with 141 additions and 11 deletions
+4
View File
@@ -7,6 +7,7 @@ import (
"net/url"
"os"
"sync"
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/jaeger"
@@ -54,8 +55,10 @@ func StartAgent(c Config) {
// if error happens, let later calls run.
if err := startAgent(c); err != nil {
logger.Errorf("Trace agent start failed: %v", err)
return
}
logger.Infof("Trace agent started successfully. Batcher: %s, Endpoint: %s", c.Batcher, c.Endpoint)
agents[c.Endpoint] = lang.Placeholder
}
@@ -92,6 +95,7 @@ func createExporter(c Config) (sdktrace.SpanExporter, error) {
opts := []otlptracegrpc.Option{
otlptracegrpc.WithInsecure(),
otlptracegrpc.WithEndpoint(c.Endpoint),
otlptracegrpc.WithTimeout(5 * time.Second), // 5秒超时
}
if len(c.OtlpHeaders) > 0 {
opts = append(opts, otlptracegrpc.WithHeaders(c.OtlpHeaders))