add kindJaegerUdp
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package trace
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TraceName represents the tracing name.
|
||||
const TraceName = "go-zero"
|
||||
|
||||
@@ -8,5 +12,22 @@ type Config struct {
|
||||
Name string `json:",optional"`
|
||||
Endpoint string `json:",optional"`
|
||||
Sampler float64 `json:",default=1.0"`
|
||||
Batcher string `json:",default=jaeger,options=jaeger|zipkin|otlpgrpc|otlphttp"`
|
||||
Batcher string `json:",default=jaeger,options=jaeger|jaegerudp|zipkin|otlpgrpc|otlphttp"`
|
||||
}
|
||||
|
||||
func (c *Config) getEndpointHost() string {
|
||||
EndpointSlice := strings.Split(c.Endpoint, ":")
|
||||
if len(EndpointSlice) > 0 {
|
||||
return strings.TrimSpace(EndpointSlice[0])
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (c *Config) getEndpointPort() string {
|
||||
EndpointSlice := strings.Split(c.Endpoint, ":")
|
||||
if len(EndpointSlice) > 1 {
|
||||
return strings.TrimSpace(EndpointSlice[1])
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user