Skip to content

用于http调用链增加opentracing协议,可用于rpcx框架使用

License

Notifications You must be signed in to change notification settings

ONG-YA/http-opentracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opentracing net/http

OpenTracing instrumentation for [net/http]

Usage

implements http RoundTrip by NewTraceTracesport(rt http.RoundTripper, activeSpanKey string,peerService string, extraTags ...opentracing.Tag) .

Example :

tracertan := httpinvoke.NewTraceTracesport(http.DefaultTransport,"","",opentracing.Tag{Key:"ab",Value:"b"})

	client := &http.Client{
		Transport:tracertan,
	}

Example for rpcx :

	tracertan := httpinvoke.NewTraceTracesport(http.DefaultTransport,share.OpentracingSpanServerKey,"",opentracing.Tag{Key:"ab",Value:"b"})

	client := &http.Client{
		Transport:tracertan,
	}

About

用于http调用链增加opentracing协议,可用于rpcx框架使用

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages