Skip to content

core(runner), matchers(datadog) - Propagate context instead of using a struct field#52

Merged
Minosity-VR merged 1 commit into
mainfrom
simon.marechal/context-propagation
Apr 15, 2026
Merged

core(runner), matchers(datadog) - Propagate context instead of using a struct field#52
Minosity-VR merged 1 commit into
mainfrom
simon.marechal/context-propagation

Conversation

@Minosity-VR

Copy link
Copy Markdown
Contributor

What does this PR do?

Enhancement:

  • use context propagation in functions instead of using a struct field. This allows the caller to control the lifecycle of the functions (and set special variables on the context, for instance context.WithValue(ctx, datadog.ContextServerIndex, 2) which disable the check preventing from trying to contact staging sites
  • add a secret string structure. Before, app and api keys were set in the context and propagated everywhere. Logging the context by inadvertance would leak the credentials. Now, it will be redacted. Values are still visible in memory, but they already were before

Motivation

  • Control execution lifecycle through context
  • Propagate tagging & info in context

@Minosity-VR
Minosity-VR requested review from a team as code owners April 15, 2026 14:11
@Minosity-VR Minosity-VR changed the title Propagate context instead of using a struct field core(runner), matchers(datadog) - Propagate context instead of using a struct field Apr 15, 2026
@Minosity-VR
Minosity-VR merged commit 1498a07 into main Apr 15, 2026
5 checks passed
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