Deploy the app

az containerapp up -n $APP_NAME -g $RESOURCE_GROUP --environment $ENVIRONMENT --source .

Get the environment ID

ENVIRONMENT_ID=`az containerapp show -n $APP_NAME -g $RESOURCE_GROUP --query 'properties.managedEnvironmentId' -o tsv`

Get environment resource

az rest -m GET -u "$ENVIRONMENT_ID?api-version=2023-11-02-preview" -o jsonc

Modify the config.

Enable otel

az rest -m PATCH -u "$ENVIRONMENT_ID?api-version=2023-11-02-preview" --body @env-enable.json