Skip to content

feat(dsm): add manual checkpoint parameter to consume API #13646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 13, 2025

Conversation

michael-zhao459
Copy link
Contributor

@michael-zhao459 michael-zhao459 commented Jun 11, 2025

Adds a manual_checkpoint parameter in the public dsm set_consume_checkpoint(), this allows one to turn off the manual_checkpoint:true tag if use of function is not for explicit purpose of manually instrumenting (default remains as manual instrumentation).

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Jun 11, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/add-dsm-manual-checkpoint-flag-8ec40cc433070ee6.yaml  @DataDog/apm-python
ddtrace/data_streams.py                                                 @DataDog/apm-core-python
tests/datastreams/test_public_api.py                                    @DataDog/data-streams-monitoring

Copy link
Contributor

github-actions bot commented Jun 11, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 274 ± 3 ms.

The average import time from base is: 275 ± 4 ms.

The import time difference between this PR and base is: -1.4 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.952 ms (0.71%)
ddtrace.bootstrap.sitecustomize 1.270 ms (0.46%)
ddtrace.bootstrap.preload 1.270 ms (0.46%)
ddtrace.internal.remoteconfig.client 0.632 ms (0.23%)
ddtrace 0.682 ms (0.25%)
ddtrace.internal._unpatched 0.032 ms (0.01%)
json 0.032 ms (0.01%)
json.decoder 0.032 ms (0.01%)
re 0.032 ms (0.01%)
enum 0.032 ms (0.01%)
types 0.032 ms (0.01%)

@pr-commenter
Copy link

pr-commenter bot commented Jun 11, 2025

Benchmarks

Benchmark execution time: 2025-06-12 13:49:12

Comparing candidate commit 2b00286 in PR branch michael.zhao/add-manual-check-dsm-checkpoint with baseline commit c58f633 in branch main.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 418 metrics, 3 unstable metrics.

scenario:telemetryaddmetric-flush-1-metric

  • 🟥 execution_time [+294.472ns; +446.826ns] or [+7.159%; +10.863%]

Co-authored-by: Piotr WOLSKI <piotr.wolski42@gmail.com>
@michael-zhao459 michael-zhao459 marked this pull request as ready for review June 12, 2025 13:14
@michael-zhao459 michael-zhao459 requested review from a team as code owners June 12, 2025 13:14
@michael-zhao459 michael-zhao459 merged commit 5710008 into main Jun 13, 2025
326 of 329 checks passed
@michael-zhao459 michael-zhao459 deleted the michael.zhao/add-manual-check-dsm-checkpoint branch June 13, 2025 14:23
happynancee pushed a commit that referenced this pull request Jul 7, 2025
Adds a manual_checkpoint parameter in the public dsm
set_consume_checkpoint(), this allows one to turn off the
manual_checkpoint:true tag if use of function is not for explicit
purpose of manually instrumenting (default remains as manual
instrumentation).



## Checklist
- [X] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [X] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Piotr WOLSKI <piotr.wolski42@gmail.com>
alyshawang pushed a commit that referenced this pull request Jul 25, 2025
Adds a manual_checkpoint parameter in the public dsm
set_consume_checkpoint(), this allows one to turn off the
manual_checkpoint:true tag if use of function is not for explicit
purpose of manually instrumenting (default remains as manual
instrumentation).



## Checklist
- [X] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [X] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Piotr WOLSKI <piotr.wolski42@gmail.com>
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.

3 participants