MCPcopy Create free account
hub / github.com/astercloud/aster / processLLM

Function processLLM

examples/telemetry/main.go:285–297  ·  view source on GitHub ↗
(ctx context.Context, _ telemetry.Span)

Source from the content-addressed store, hash-verified

283}
284
285func processLLM(ctx context.Context, _ telemetry.Span) {
286 tracer := telemetry.GetGlobalTracer()
287
288 _, span := tracer.StartSpan(
289 ctx,
290 "llm.generate",
291 telemetry.WithSpanKind(telemetry.SpanKindClient),
292 )
293 defer span.End()
294
295 time.Sleep(100 * time.Millisecond)
296 span.SetStatus(telemetry.StatusCodeOK, "LLM generation completed")
297}
298
299// 与其他 Exporters 集成的示例
300

Callers 1

agentTracingExampleFunction · 0.85

Calls 5

GetGlobalTracerFunction · 0.92
WithSpanKindFunction · 0.92
StartSpanMethod · 0.65
EndMethod · 0.65
SetStatusMethod · 0.65

Tested by

no test coverage detected