惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
博客园 - 司徒正美
V
Visual Studio Blog
博客园 - 【当耐特】
T
Tailwind CSS Blog
美团技术团队
博客园 - 叶小钗
Jina AI
Jina AI
宝玉的分享
宝玉的分享
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(diagnostics-otel): honor genai usage semconv opt-in ·...
vincentkoc · 2026-04-26 · via Recent Commits to openclaw:main

@@ -769,7 +769,7 @@ describe("diagnostics-otel service", () => {

769769

expect(modelUsageCall?.[1]).toMatchObject({

770770

attributes: {

771771

"gen_ai.operation.name": "chat",

772-

"gen_ai.provider.name": "anthropic",

772+

"gen_ai.system": "anthropic",

773773

"gen_ai.request.model": "claude-sonnet-4.6",

774774

"gen_ai.usage.input_tokens": 150,

775775

"gen_ai.usage.output_tokens": 40,

@@ -781,6 +781,7 @@ describe("diagnostics-otel service", () => {

781781

attributes: expect.not.objectContaining({

782782

"openclaw.sessionKey": expect.anything(),

783783

"openclaw.sessionId": expect.anything(),

784+

"gen_ai.provider.name": expect.anything(),

784785

"gen_ai.input.messages": expect.anything(),

785786

"gen_ai.output.messages": expect.anything(),

786787

}),

@@ -1082,6 +1083,13 @@ describe("diagnostics-otel service", () => {

10821083

api: "openai-completions",

10831084

durationMs: 80,

10841085

});

1086+

emitDiagnosticEvent({

1087+

type: "model.usage",

1088+

provider: "openai",

1089+

model: "gpt-5.4",

1090+

usage: { input: 3, output: 2 },

1091+

durationMs: 10,

1092+

});

10851093

await flushDiagnosticEvents();

1086109410871095

const modelCall = telemetryState.tracer.startSpan.mock.calls.find(

@@ -1100,6 +1108,22 @@ describe("diagnostics-otel service", () => {

11001108

}),

11011109

startTime: expect.any(Number),

11021110

});

1111+

const modelUsage = telemetryState.tracer.startSpan.mock.calls.find(

1112+

(call) => call[0] === "openclaw.model.usage",

1113+

);

1114+

expect(modelUsage?.[1]).toMatchObject({

1115+

attributes: {

1116+

"gen_ai.provider.name": "openai",

1117+

"gen_ai.request.model": "gpt-5.4",

1118+

"gen_ai.operation.name": "chat",

1119+

},

1120+

});

1121+

expect(modelUsage?.[1]).toEqual({

1122+

attributes: expect.not.objectContaining({

1123+

"gen_ai.system": expect.anything(),

1124+

}),

1125+

startTime: expect.any(Number),

1126+

});

11031127

await service.stop?.(ctx);

11041128

});

11051129