Skip to content

[receiver/httpcheck] Use confighttp defaulting constructor#49357

Open
swiatekm wants to merge 2 commits into
open-telemetry:mainfrom
swiatekm:chore/httpcheck/config-unmarshal
Open

[receiver/httpcheck] Use confighttp defaulting constructor#49357
swiatekm wants to merge 2 commits into
open-telemetry:mainfrom
swiatekm:chore/httpcheck/config-unmarshal

Conversation

@swiatekm

@swiatekm swiatekm commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

The receiver creates a confighttp client for each target. The targets are an array, so during unmarshalling, they get zero values of confighttp.ClientConfig, which isn't correct. Use a custom unmarshaller to inject values from the ClientConfig defaulting constructor. The injected values are then reset, so this change is effectively a no-op.

Link to tracking issue

Part of #49308. Missed it in #49307.

Testing

Existing tests suffice.

Authorship

  • I, a human, wrote this pull request description myself.

Each target's embedded confighttp.ClientConfig is created while decoding
a list element, so it defaults to a zero value. Seed
NewDefaultClientConfig in the target's Unmarshal (resetting the other
constructor-set fields to preserve existing behavior).
@swiatekm swiatekm requested a review from a team as a code owner June 29, 2026 15:04
@swiatekm swiatekm requested a review from iblancasa June 29, 2026 15:04
@github-actions github-actions Bot added the receiver/httpcheck HTTP Check receiver label Jun 29, 2026
@github-actions github-actions Bot requested a review from VenuEmmadi June 29, 2026 15:04
@swiatekm swiatekm changed the title [receiver/httpcheckreceiver] Use confighttp defaulting constructor [receiver/httpcheckr] Use confighttp defaulting constructor Jun 29, 2026
@swiatekm swiatekm changed the title [receiver/httpcheckr] Use confighttp defaulting constructor [receiver/httpcheck] Use confighttp defaulting constructor Jun 29, 2026
@atoulme atoulme added Skip Changelog PRs that do not require a CHANGELOG.md entry waiting-for-code-owners labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

receiver/httpcheck HTTP Check receiver Skip Changelog PRs that do not require a CHANGELOG.md entry waiting-for-code-owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants