Skip to content

Add integration test for DatadogTracing Off in a child <Location> scope #65

@pawelchcki

Description

@pawelchcki

Context

PR #62 ("Respect child-scope override for tracing directives") fixed two bugs with identical shape: DatadogTracing Off and DatadogTrustInboundSpan Off were silently ignored when set inside a <Location> (the parent's implicit default true OR'd with the child's explicit false stayed true).

The existing integration test test_trust_inbound_span_directive (test/integration-test/scenarios/test_configuration.py:200) exercises DatadogTrustInboundSpan Off in a child <Location> (test/integration-test/scenarios/conf/directives.conf:39-43) and would catch a regression of that specific bug.

However, there is no analogous test for DatadogTracing Off in a child scope — which was the original motivating case per the PR description.

Proposal

Add a small integration test scenario that:

  1. Defines a <Location> (e.g. /tracing-off) with DatadogTracing Off while the enclosing server scope leaves tracing at its default (on).
  2. Issues a request to that location.
  3. Asserts the agent receives no trace for it (while a control request to a sibling location still produces a trace, to guard against the test accidentally passing because tracing is globally off).

This mirrors the shape of test_trust_inbound_span_directive and closes the remaining coverage gap from #62.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions