config.go 784 B

12345678910111213141516171819202122
  1. package trace
  2. // TraceName represents the tracing name.
  3. const TraceName = "go-zero"
  4. // A Config is an opentelemetry config.
  5. type Config struct {
  6. Name string `json:",optional"`
  7. Endpoint string `json:",optional"`
  8. Sampler float64 `json:",default=1.0"`
  9. Batcher string `json:",default=jaeger,options=jaeger|zipkin|otlpgrpc|otlphttp|file"`
  10. // OtlpHeaders represents the headers for OTLP gRPC or HTTP transport.
  11. // For example:
  12. // uptrace-dsn: 'http://project2_secret_token@localhost:14317/2'
  13. OtlpHeaders map[string]string `json:",optional"`
  14. // OtlpHttpPath represents the path for OTLP HTTP transport.
  15. // For example
  16. // /v1/traces
  17. OtlpHttpPath string `json:",optional"`
  18. // Disabled indicates whether StartAgent starts the agent.
  19. Disabled bool `json:",optional"`
  20. }