I have an environment where I need to turn off observability depending on the environment, but I can manage it via an environmental variable. The problem is given how the variable is read, it is always a string, and I cannot do
exporters:
otlp:
enabled: false
tracing:
otlp:
enabled: false
And doing something like this does not work
tracing:
otlp:
enabled: "${env.APOLLO_OBSERVABILITY_ENABLED}"
Also tried to use !!bool
, but the Apollo Router YAML interpreter did not like it.
Any suggestions?
My aim is to avoid having multiple configurations for router