mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fix var replacement
This commit is contained in:
parent
e5da5459c9
commit
75d15301ad
1 changed files with 6 additions and 3 deletions
|
|
@ -159,17 +159,20 @@ def validate_and_render_schema():
|
|||
|
||||
arch_tracing = config_yaml.get("tracing", {})
|
||||
|
||||
# Resolution order: config yaml > OTEL_TRACING_GRPC_ENDPOINT env var > hardcoded default
|
||||
opentracing_grpc_endpoint = arch_tracing.get(
|
||||
"opentracing_grpc_endpoint", DEFAULT_OTEL_TRACING_GRPC_ENDPOINT
|
||||
"opentracing_grpc_endpoint",
|
||||
os.environ.get(
|
||||
"OTEL_TRACING_GRPC_ENDPOINT", DEFAULT_OTEL_TRACING_GRPC_ENDPOINT
|
||||
),
|
||||
)
|
||||
arch_tracing["opentracing_grpc_endpoint"] = opentracing_grpc_endpoint
|
||||
# resolve env vars in opentracing_grpc_endpoint if present
|
||||
if opentracing_grpc_endpoint and "$" in opentracing_grpc_endpoint:
|
||||
opentracing_grpc_endpoint = os.path.expandvars(opentracing_grpc_endpoint)
|
||||
print(
|
||||
f"Resolved opentracing_grpc_endpoint to {opentracing_grpc_endpoint} after expanding environment variables"
|
||||
)
|
||||
arch_tracing["opentracing_grpc_endpoint"] = opentracing_grpc_endpoint
|
||||
arch_tracing["opentracing_grpc_endpoint"] = opentracing_grpc_endpoint
|
||||
# ensure that opentracing_grpc_endpoint is a valid URL if present and start with http and must not have any path
|
||||
if opentracing_grpc_endpoint:
|
||||
urlparse_result = urlparse(opentracing_grpc_endpoint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue