dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

fix: running the mini agent regardless of azure hosting plan for function

Open gord02 opened this issue 1 year ago • 3 comments

What does this PR do?

Runs the Serverless Mini Agent for Azure Functions on all consumption plans not just if the hosting plan is consumption.

Testing

The changes were tested by running the test suite for the internal folder using the following instructions for the repo: https://ddtrace.readthedocs.io/en/stable/contributing-testing.html#testing-guidelines

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 are followed or label changelog/no-changelog is set
  • [x] Documentation is included (in-code, generated user docs, public corp docs)
  • [x] Backport labels are set (if applicable)
  • [x] If this PR changes the public interface, I've notified @DataDog/apm-tees.

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

gord02 avatar Jun 06 '24 20:06 gord02

Datadog Report

Branch report: gordon.hamilton/azure-mini-agent-start Commit report: ace3d3e Test service: dd-trace-py

:white_check_mark: 0 Failed, 130308 Passed, 46186 Skipped, 5h 9m 28.87s Total duration (5h 31m 12.35s time saved) :hourglass: 1 Performance Regression

:hourglass: Performance Regressions vs Default Branch (1)

  • test_export_server_down - test_http.py 5.82s (+4.75s, +444%) - Details

Benchmarks

Benchmark execution time: 2024-07-09 14:07:46

Comparing candidate commit ace3d3e370f70b445122623d05ab3724d53dfa6a in PR branch gordon.hamilton/azure-mini-agent-start with baseline commit 2022a3bf338c3a90d3dfd179e504c3904e8228c9 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 221 metrics, 9 unstable metrics.

pr-commenter[bot] avatar Jun 07 '24 14:06 pr-commenter[bot]

Codecov Report

Attention: Patch coverage is 26.31579% with 14 lines in your changes missing coverage. Please review.

Project coverage is 10.42%. Comparing base (2022a3b) to head (ace3d3e).

Files Patch % Lines
tests/internal/test_serverless.py 0.00% 7 Missing :warning:
ddtrace/settings/config.py 0.00% 3 Missing :warning:
ddtrace/_trace/tracer.py 66.66% 1 Missing :warning:
ddtrace/internal/serverless/__init__.py 50.00% 1 Missing :warning:
ddtrace/internal/serverless/mini_agent.py 50.00% 1 Missing :warning:
ddtrace/internal/writer/writer.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9494       +/-   ##
===========================================
- Coverage   74.48%   10.42%   -64.07%     
===========================================
  Files        1391     1358       -33     
  Lines      128824   126603     -2221     
===========================================
- Hits        95959    13193    -82766     
- Misses      32865   113410    +80545     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jun 12 '24 17:06 codecov-commenter

The backport to 2.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport-9494-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4f31f7e0e7c0d8f2cb2e4c225c8d187fee84a83a
# Push it to GitHub
git push --set-upstream origin backport-9494-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10

Then, create a pull request where the base branch is 2.10 and the compare/head branch is backport-9494-to-2.10.

github-actions[bot] avatar Jul 09 '24 15:07 github-actions[bot]