-
Notifications
You must be signed in to change notification settings - Fork 439
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
base: main
Are you sure you want to change the base?
feat(dsm): add manual checkpoint parameter to consume API #13646
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe 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 breakdownThe following import paths have shrunk:
|
BenchmarksBenchmark execution time: 2025-06-12 13:49:12 Comparing candidate commit 2b00286 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 418 metrics, 3 unstable metrics. scenario:telemetryaddmetric-flush-1-metric
|
@@ -2,7 +2,7 @@ | |||
from ddtrace.internal.datastreams.processor import PROPAGATION_KEY_BASE_64 | |||
|
|||
|
|||
def set_consume_checkpoint(typ, source, carrier_get): | |||
def set_consume_checkpoint(typ, source, carrier_get, manual_checkpoint=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add a definition of the parameter just bellow, since it's a public api, we want to make sure users know what values to use.
with mock.patch.object(mocked_tracer.data_streams_processor, "set_checkpoint") as mock_set_checkpoint: | ||
set_consume_checkpoint("kinesis", "stream-123", headers.get) | ||
called_tags = mock_set_checkpoint.call_args[0][0] | ||
assert "manual_checkpoint:true" in called_tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also test got.hash (similar to above) and make sure manual_checkpoint:true
is / is not in the tags needed to compute the hash?
Co-authored-by: Piotr WOLSKI <[email protected]>
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
Reviewer Checklist