Skip to content

Commit

Permalink
fix: (*configx.Provider).TracingConfig should parse all configs (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Sep 19, 2022
1 parent e7e4226 commit 6fdbf0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
13 changes: 13 additions & 0 deletions configx/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,19 @@ func (p *Provider) TracingConfig(serviceName string) *otelx.Config {
},
LocalAgentAddress: p.String("tracing.providers.jaeger.local_agent_address"),
},
Zipkin: otelx.ZipkinConfig{
ServerURL: p.String("tracing.providers.zipkin.server_url"),
Sampling: otelx.ZipkinSampling{
SamplingRatio: p.Float64("tracing.providers.zipkin.sampling.sampling_ratio"),
},
},
OTLP: otelx.OTLPConfig{
ServerURL: p.String("tracing.providers.otlp.server_url"),
Insecure: p.Bool("tracing.providers.otlp.insecure"),
Sampling: otelx.OTLPSampling{
SamplingRatio: p.Float64("tracing.providers.otlp.sampling.sampling_ratio"),
},
},
},
}
}
Expand Down
12 changes: 2 additions & 10 deletions otelx/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@
"type": "string",
"description": "The address of the Zipkin server where spans should be sent to.",
"format": "uri",
"examples": [
{
"server_url": "http://localhost:9411/api/v2/spans"
}
]
"examples": ["http://localhost:9411/api/v2/spans"]
},
"sampling": {
"type": "object",
Expand Down Expand Up @@ -114,11 +110,7 @@
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]):([0-9]*)$"
}
],
"examples": [
{
"server_url": "localhost:4318"
}
]
"examples": ["localhost:4318"]
},
"insecure": {
"type": "boolean",
Expand Down

0 comments on commit 6fdbf0d

Please sign in to comment.