Skip to content
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

fix(profiling): serialisable stack key [backport 2.6] #8622

Closed
wants to merge 3 commits into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 6, 2024

Backport c91c077 from #8618 to 2.6.

Backport of #8435 to 2.7

Ensure that the stack key used to group events is actually hashable.

Testing strategy

This is an attempt to mitigate #8218, for which we don't have a reproducer. Should the issue occur again, we should be able to act on any future reports with the extra context that this proposed change provides.

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.
  • If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • 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

Backport of #8435 to 2.7

Ensure that the stack key used to group events is actually hashable.

## Testing strategy

This is an attempt to mitigate #8218, for which we don't have a
reproducer. Should the issue occur again, we should be able to act on
any future reports with the extra context that this proposed change
provides.

## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.
- [x] If change touches code that signs or publishes builds or packages,
or handles credentials of any kind, I've requested a review from
`@DataDog/security-design-and-guidance`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] 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)

(cherry picked from commit c91c077)
@github-actions github-actions bot requested a review from a team as a code owner March 6, 2024 13:51
@github-actions github-actions bot added the Profiling Continous Profling label Mar 6, 2024
@github-actions github-actions bot requested review from a team as code owners March 6, 2024 13:51
@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: backport-8618-to-2.6
Commit report: 012ec5f
Test service: dd-trace-py

✅ 0 Failed, 1036 Passed, 20 Skipped, 1h 26m 32.39s Total duration (4m 2.01s time saved)

@emmettbutler emmettbutler changed the title fix(profiling): serialisable stack key [backport #8435 to 2.7] [backport 2.6] fix(profiling): serialisable stack key [backport 2.6] Mar 6, 2024
@pr-commenter
Copy link

pr-commenter bot commented Mar 6, 2024

Benchmarks

Benchmark execution time: 2024-03-06 14:55:41

Comparing candidate commit 012ec5f in PR branch backport-8618-to-2.6 with baseline commit adff8da in branch 2.6.

Found 8 performance improvements and 4 performance regressions! Performance is the same for 181 metrics, 9 unstable metrics.

scenario:coreapiscenario-context_with_data_listeners

  • 🟩 max_rss_usage [-745.842KB; -668.097KB] or [-3.412%; -3.057%]

scenario:coreapiscenario-context_with_data_no_listeners

  • 🟩 max_rss_usage [-757.404KB; -685.207KB] or [-3.464%; -3.134%]

scenario:coreapiscenario-core_dispatch_listeners_and_all_listeners

  • 🟩 max_rss_usage [-727.683KB; -658.404KB] or [-3.330%; -3.013%]

scenario:coreapiscenario-core_dispatch_only_all_listeners

  • 🟩 max_rss_usage [-722.394KB; -650.994KB] or [-3.304%; -2.977%]

scenario:httppropagationextract-datadog_tracecontext_tracestate_not_propagated_on_trace_id_no_match

  • 🟥 max_rss_usage [+670.703KB; +752.657KB] or [+3.177%; +3.565%]

scenario:otelspan-start

  • 🟩 max_rss_usage [-3.325MB; -3.247MB] or [-7.749%; -7.567%]

scenario:sethttpmeta-no-useragentvariant

  • 🟩 max_rss_usage [-654.610KB; -579.924KB] or [-2.959%; -2.622%]

scenario:sethttpmeta-obfuscation-regular-case-implicit-query

  • 🟩 max_rss_usage [-782.453KB; -715.454KB] or [-3.505%; -3.205%]

scenario:sethttpmeta-obfuscation-worst-case-explicit-query

  • 🟩 max_rss_usage [-738.378KB; -657.129KB] or [-3.309%; -2.945%]

scenario:sethttpmeta-useragentvariant_exists_2

  • 🟥 max_rss_usage [+729.215KB; +801.460KB] or [+3.412%; +3.750%]

scenario:sethttpmeta-useragentvariant_exists_3

  • 🟥 max_rss_usage [+704.743KB; +781.286KB] or [+3.295%; +3.653%]

scenario:sethttpmeta-useragentvariant_not_exists_2

  • 🟥 max_rss_usage [+675.569KB; +753.116KB] or [+3.155%; +3.517%]

@mabdinur mabdinur added the changelog/no-changelog A changelog entry is not required for this PR. label Mar 12, 2024
@mabdinur mabdinur enabled auto-merge (squash) March 12, 2024 19:27
@mabdinur mabdinur closed this Mar 12, 2024
auto-merge was automatically disabled March 12, 2024 19:28

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants