Skip to content

Return NotFound when converting profiles collected with sampling disabled. - #1795

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1011438924
Nov 2, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_1011438924

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Return NotFound when converting profiles collected with sampling disabled.

When profile_sampling_interval() is 0, return nullptr from SnapshotCurrent, StartAllocationProfiling, StartLifetimeProfiling, and StartEventTracing so no sampling hooks are registered and the resulting Profile has type kDoNotUse. In MakeProfileProto, return NotFoundError when converting an empty kDoNotUse profile while GetProfileSamplingInterval() is 0.

Co-authored-by: Chris Kennelly ckennelly@google.com

@google-cla

google-cla Bot commented Nov 1, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_1011438924 branch 2 times, most recently from 640ef0a to 598bb64 Compare November 1, 2026 16:28
@copybara-service copybara-service Bot changed the title Record the active sampling interval on allocation and lifetime profiles and return a kNotFound status when profile sampling is disabled. Return a dedicated disabled token when allocation or lifetime profiling starts with sampling turned off, and fail proto conversion with NotFound. Nov 1, 2026
@copybara-service
copybara-service Bot force-pushed the test_1011438924 branch 4 times, most recently from 0608689 to 56af6f4 Compare November 2, 2026 04:00
@copybara-service copybara-service Bot changed the title Return a dedicated disabled token when allocation or lifetime profiling starts with sampling turned off, and fail proto conversion with NotFound. Return NotFound when serializing allocation or lifetime profiles collected with sampling disabled. Nov 2, 2026
@copybara-service
copybara-service Bot force-pushed the test_1011438924 branch 3 times, most recently from 86788b5 to a4a29d6 Compare November 2, 2026 17:40
@copybara-service copybara-service Bot changed the title Return NotFound when serializing allocation or lifetime profiles collected with sampling disabled. Return NotFound when converting profiles collected with sampling disabled. Nov 2, 2026
@copybara-service
copybara-service Bot force-pushed the test_1011438924 branch 3 times, most recently from 428a897 to 9bf0795 Compare November 2, 2026 19:18
…bled.

When profile_sampling_interval() is 0, return nullptr from SnapshotCurrent, StartAllocationProfiling, StartLifetimeProfiling, and StartEventTracing so no sampling hooks are registered and the resulting Profile has type kDoNotUse. In MakeProfileProto, return NotFoundError when converting an empty kDoNotUse profile while GetProfileSamplingInterval() is 0.

Co-authored-by: Chris Kennelly <ckennelly@google.com>
PiperOrigin-RevId: 1012323050
@copybara-service
copybara-service Bot merged commit 3ffcc74 into master Nov 2, 2026
14 of 15 checks passed
@copybara-service
copybara-service Bot deleted the test_1011438924 branch November 2, 2026 19:34

This branch was successfully deployed

No deployments
github-pages — 3ffcc74c Deployed Nov 2, 2026 by github-pages[bot] via deploy #3197
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.

0 participants