In the short-term, the logger should look for existence of VALOHAI_PORT env var or /valohai/valohai-metadata.json to figure out that it is in deployment and print the metrics accordingly.
In the long-term a VALOHAI_DEPLOYMENT should be injected into the container for this purpose.
With valohai-utils:
The output is:
But in deployment you'd want:
In the short-term, the logger should look for existence of
VALOHAI_PORT
env var or/valohai/valohai-metadata.json
to figure out that it is in deployment and print the metrics accordingly.In the long-term a
VALOHAI_DEPLOYMENT
should be injected into the container for this purpose.