Skip to content

stdoutmetric: Preserve input when removing timestamps - #8843

Open
Sakshamm-Goyal wants to merge 2 commits into
open-telemetry:mainfrom
Sakshamm-Goyal:fix/stdoutmetric-preserve-input
Open

stdoutmetric: Preserve input when removing timestamps#8843
Sakshamm-Goyal wants to merge 2 commits into
open-telemetry:mainfrom
Sakshamm-Goyal:fix/stdoutmetric-preserve-input

Conversation

@Sakshamm-Goyal

Copy link
Copy Markdown

Fixes #8785.

WithoutTimestamps now redacts a structural copy for encoding instead of replacing aggregation data in the caller-provided ResourceMetrics. The copy preserves nil slice semantics while reusing the existing timestamp-redaction logic.

Adds a regression test that exports a gauge and verifies its original start and end timestamps remain unchanged.

Validation:

  • go test . -run '^TestWithoutTimestampsDoesNotMutateInput$' -count=1\n- go test ./... in exporters/stdout/stdoutmetric\n- make precommit

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 23, 2026

Copy link
Copy Markdown

CLA Not Signed

@MrAlias

MrAlias commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

@Sakshamm-Goyal please sign the CLA so these changes can be considered.

@MrAlias MrAlias added the blocked:CLA Waiting on CLA to be signed before progress can be made label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked:CLA Waiting on CLA to be signed before progress can be made

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stdoutmetric: WithoutTimestamps mutates ResourceMetrics passed to Export

2 participants