Skip to content

chore(crashtracking): reconfigure after identity refresh - #19823

Draft
litianningdatadog wants to merge 1 commit into
tianning.li/2-flask-web-request-starting-eventfrom
tianning.li/3-6-crashtracking-identity-refresh
Draft

chore(crashtracking): reconfigure after identity refresh#19823
litianningdatadog wants to merge 1 commit into
tianning.li/2-flask-web-request-starting-eventfrom
tianning.li/3-6-crashtracking-identity-refresh

Conversation

@litianningdatadog

Copy link
Copy Markdown
Contributor

Description

Split from #19780.

Crashtracking configuration includes runtime identity. Reconfigure crashtracking after runtime identity refresh so crash reports from a restored MicroVM instance use the refreshed runtime id.

Testing

  • scripts/lint format_check ddtrace/internal/core/crashtracking.py ddtrace/internal/native/_native.pyi tests/crashtracker/test_crashtracker.py
  • git diff --check

Stack

Draft split branch. Stacked on #19816.

@litianningdatadog litianningdatadog added changelog/no-changelog A changelog entry is not required for this PR. aws-microvm Work related to AWS MicroVM onboarding labels Aug 23, 2026
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 250 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 250 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.profiling.collector.pytorch -×-> ddtrace.trace  (product:profiling -> product:tracing, score=133)
ddtrace.llmobs._integrations.vertexai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.internal.openfeature._span_enrichment -×-> ddtrace.trace  (product:openfeature -> product:tracing, score=133)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against tianning.li/2-flask-web-request-starting-event using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

ddtrace/internal/core/crashtracking.py                                  @DataDog/profiling-python @DataDog/apm-core-python
ddtrace/internal/native/_native.pyi                                     @DataDog/apm-core-python
src/native/crashtracker.rs                                              @DataDog/profiling-python @DataDog/apm-core-python
src/native/lib.rs                                                       @DataDog/apm-core-python
tests/crashtracker/test_crashtracker.py                                 @DataDog/profiling-python

@litianningdatadog litianningdatadog changed the title fix(crashtracking): reconfigure after identity refresh chore(crashtracking): reconfigure after identity refresh Aug 23, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 7 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | check-slo-breaches — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

DataDog/apm-reliability/dd-trace-py | os tests ubuntu: [3.10] — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

Changelog | Validate changelog

View in Datadog · View in GitHub Actions

Missing required changelog entry for the PR. Remove the 'changelog/no-changelog' label and add a new note using 'reno new <slug>'.

View all 7 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1176485 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Aug 23, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-23 22:26:56

Comparing candidate commit 1176485 in PR branch tianning.li/3-6-crashtracking-identity-refresh with baseline commit d59e112 in branch tianning.li/2-flask-web-request-starting-event.

📊 Benchmarking dashboard

Found 0 performance improvements and 11 performance regressions! Performance is the same for 611 metrics, 10 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:forktime-configured

  • 🟥 execution_time [+1.436ms; +2.180ms] or [+10.688%; +16.222%]

scenario:httppropagationextract-empty_headers

  • 🟥 execution_time [+77.301ns; +98.337ns] or [+7.899%; +10.049%]

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.006µs; +2.190µs] or [+10.442%; +11.398%]

scenario:iastaspects-add_aspect

  • 🟥 execution_time [+7.376µs; +9.386µs] or [+7.303%; +9.294%]

scenario:iastaspects-casefold_noaspect

  • 🟥 execution_time [+59.016µs; +66.754µs] or [+23.592%; +26.685%]

scenario:iastaspects-repr_aspect

  • 🟥 execution_time [+79.605µs; +85.975µs] or [+21.788%; +23.532%]

scenario:iastaspects-strip_aspect

  • 🟥 execution_time [+93.476µs; +102.632µs] or [+32.709%; +35.912%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+138.133µs; +146.659µs] or [+34.093%; +36.198%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+40.034µs; +45.537µs] or [+27.843%; +31.670%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+288.953ns; +339.115ns] or [+10.695%; +12.552%]

scenario:tracer-small

  • 🟥 execution_time [+25.663µs; +27.806µs] or [+7.621%; +8.258%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-780.260ns; +713.191ns] or [-7.013%; +6.410%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-32.977ns; +33.478ns] or [-5.381%; +5.462%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1488.267ns; +1915.242ns] or [-8.688%; +11.181%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1174.313ns; +1295.564ns] or [-9.107%; +10.048%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-335.050ns; +315.484ns] or [-9.093%; +8.562%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-245.826ns; +265.854ns] or [-8.398%; +9.082%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-50.264ns; +97.054ns] or [-4.392%; +8.480%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3527.904ns; +4380.190ns] or [-8.786%; +10.909%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-705.041ns; +825.231ns] or [-8.812%; +10.314%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-55.276µs; +65.815µs] or [-8.642%; +10.290%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws-microvm Work related to AWS MicroVM onboarding changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant