Skip to content

feat: disable-server-timing config with YAML/env/agent priority - #539

Open
arjun-rajappa wants to merge 1 commit into
masterfrom
disable-server-timing
Open

arjun-rajappa wants to merge 1 commit into
masterfrom
disable-server-timing

Conversation

@arjun-rajappa

Copy link
Copy Markdown
Contributor

What

  • Added read_disable_server_timing_config in Instana::Config to
    read the flag at initialisation time from YAML
    (tracing.global.disable-server-timing) or the env var
    INSTANA_TRACING_DISABLE_SERVER_TIMING
  • Added parse_disable_server_timing_from_yaml private helper to parse
    the YAML source (supports both tracing and com.instana.tracing top-level keys)
  • Added read_disable_server_timing_from_agent to pull the flag from
    the agent discovery payload when neither YAML nor env var is set
  • Updated Instana::Rack middleware to skip Server-Timing header
    injection when ::Instana.config[:disable_server_timing] is true
  • Added DisableServerTimingConfigTest covering default, env, YAML,
    agent, and precedence scenarios
  • Added rack middleware tests asserting the header is absent when
    disabled and that pre-existing Server-Timing headers set by the app
    are preserved

Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
@arjun-rajappa arjun-rajappa self-assigned this Oct 26, 2026
@arjun-rajappa
arjun-rajappa requested a review from a team October 26, 2026 04:20
@sonarqubecloud

Copy link
Copy Markdown

@pvital pvital left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants