Currently the kill switch for job-level instrumentation is controlled solely by the internal __kill_switch input in actions/instrument/job/action.yml, which defaults to '':
__kill_switch:
description: 'INTERNAL ONLY - DO NOT SET MANUALLY' # 'Set OTEL_GITHUB_KILL_SWITCH variable for the repository or organization to any non-empty value to disable all monitoring in case of an emergency. DO NOT SET MANUALLY.'
default: '' # '${{ vars.OTEL_GITHUB_KILL_SWITCH }}'
The commented-out default shows an earlier attempt to source this from a repository/org variable, but it's currently inert — the live default is just ''. Downstream, config_validation.sh only ever sees INPUT___KILL_SWITCH (the env var GitHub Actions derives from the input):
if [ -n "${INPUT___KILL_SWITCH:-}" ]; then
echo "::warning ::OpenTelemetry for GitHub actions disabled by kill switch!" && exit 0
fi
Request: more generally, allow configuration to be sourced from repository variables when the corresponding input isn't explicitly set — starting with this kill switch as the concrete case:
- If the
__kill_switch input is set (non-empty) → unchanged, kill switch is active.
- If the input is not set (empty/default) → check the repository variable
OTEL_KILL_SWITCH. If it exists and is non-empty → treat it the same as if the input had been set to a non-empty value (kill switch active).
- If the variable doesn't exist or is empty → unchanged, kill switch inactive.
Naming to confirm: the ask above uses OTEL_KILL_SWITCH, but note the existing commented-out line references OTEL_GITHUB_KILL_SWITCH instead. Worth deciding which name is canonical before implementing, since it's a repo/org-facing setting.
Related: actions/instrument/workflow/action.yml has the identical commented-out pattern for its own __kill_switch input, while actions/instrument/checksuite/action.yml doesn't reference a variable at all yet. Flagging in case the fix should be applied consistently across all three, even though this issue is scoped to the job-level action.
Currently the kill switch for job-level instrumentation is controlled solely by the internal
__kill_switchinput inactions/instrument/job/action.yml, which defaults to'':The commented-out
defaultshows an earlier attempt to source this from a repository/org variable, but it's currently inert — the live default is just''. Downstream,config_validation.shonly ever seesINPUT___KILL_SWITCH(the env var GitHub Actions derives from the input):Request: more generally, allow configuration to be sourced from repository variables when the corresponding input isn't explicitly set — starting with this kill switch as the concrete case:
__kill_switchinput is set (non-empty) → unchanged, kill switch is active.OTEL_KILL_SWITCH. If it exists and is non-empty → treat it the same as if the input had been set to a non-empty value (kill switch active).Naming to confirm: the ask above uses
OTEL_KILL_SWITCH, but note the existing commented-out line referencesOTEL_GITHUB_KILL_SWITCHinstead. Worth deciding which name is canonical before implementing, since it's a repo/org-facing setting.Related:
actions/instrument/workflow/action.ymlhas the identical commented-out pattern for its own__kill_switchinput, whileactions/instrument/checksuite/action.ymldoesn't reference a variable at all yet. Flagging in case the fix should be applied consistently across all three, even though this issue is scoped to the job-level action.