Skip to content

Commit

Permalink
fix: (*configx.Provider).TracingConfig should parse all configs
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Sep 19, 2022
1 parent 56ef9fb commit b57a9bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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
8 changes: 2 additions & 6 deletions otelx/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@
"description": "The address of the Zipkin server where spans should be sent to.",
"format": "uri",
"examples": [
{
"server_url": "http://localhost:9411/api/v2/spans"
}
"http://localhost:9411/api/v2/spans"
]
},
"sampling": {
Expand Down Expand Up @@ -136,9 +134,7 @@
}
],
"examples": [
{
"server_url": "localhost:4318"
}
"localhost:4318"
]
},
"insecure": {
Expand Down

0 comments on commit b57a9bf

Please sign in to comment.