<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tracing on seth-shi</title><link>https://sethix.com/tags/tracing/</link><description>Recent content in Tracing on seth-shi</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 23 Sep 2024 11:14:49 +0800</lastBuildDate><atom:link href="https://sethix.com/tags/tracing/index.xml" rel="self" type="application/rss+xml"/><item><title>Why Can otel.GetTracerProvider() Followed by otel.SetTracerProvider() Still Report Successfully in Go Tracing?</title><link>https://sethix.com/posts/2024092311/</link><pubDate>Mon, 23 Sep 2024 11:14:49 +0800</pubDate><guid>https://sethix.com/posts/2024092311/</guid><description>Recently, when integrating internal tracing in go-zero using some third-party packages, part of the code is as follows: package main import ( &amp;#34;fmt&amp;#34; &amp;#34;github.com/zeromicro/go-zero/zrpc&amp;#34; ) func main() { // 1. Get service configuration svcCtx := svc.NewServiceContext() // 2. Initialize server (this actually calls otel.SetTracerProvider()) // server.NewServer() =&amp;gt; // service.SetUp =&amp;gt; // trace.StartAgent =&amp;gt; // trace.startAgent() =&amp;gt; // otel.SetTracerProvider() s := zrpc.MustNewServer() defer s.Stop() fmt.Printf(&amp;#34;Starting rpc server at %s...\n&amp;#34;, svcCtx.Config.ListenOn) s.Start() } package svc import ( &amp;#34;time&amp;#34; &amp;#34;github.</description></item></channel></rss>