This release of the Python agent updates Celery instrumentation, adds new Langchain vectorstores, adds configuration to capture memory usage runtime metrics per process, fixes a content reporting issue in Anthropic Claude, and upgrades internal version of urllib3 to v1.26.18.
Upgrade the internal version of urllib3 used in the Python Agent to v1.26.18 to resolve security warnings.
New features
Update Celery instrumentation
Add support for distributed tracing in Celery over AMQP headers.
Remove duplicate function traces for some methods of running tasks.
All tasks should now only be instrumented once, and will report either an OtherTransaction, or a FunctionTrace if run under an existing transaction.
Fix instrumentation for grouped celery tasks APIs, such as task.map(), celery.group(), and celery.chunks().
Tasks run using task.map() or task.starmap() will now name tasks in the format Celery/celery.map/my_task to allow you to differentiate between map tasks.
Individual task runs created by the map() and starmap() tasks will be traced with a FunctionTrace to capture individual timings.
Support for the following Langchain vectorstores: DuckDB, EcloudESVectorStore, InMemoryVectorStore, PathwayVectorClient, VDMS
Add configuration setting to enable capturing of memory usage runtime metrics per process
Add memory_runtime_pid_metrics.enabled configuration setting to toggle capturing of memory usage metrics (per process ID only) to reduce Metric Grouping Issues (MGI).
Bug fixes
Report only raw content dictionary for Anthropic Claude
Previously, AWS Bedrock's Anthropic Claude model would report a list of dictionaries of message content. Now it reports a single dictionary of message content.
Support statement
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Python agent EOL policy for information about agent releases and support dates.
Commits
d9dcfaa Add PID into MEMORY_RUNTIME_METRICS_ENABLED (#1129)
# Clear all cookies.
context.clear_cookies()
# New: clear cookies with a particular name.
context.clear_cookies(name="session-id")
# New: clear cookies for a particular domain.
context.clear_cookies(domain="my-origin.com")
New method locator.content_frame converts a {@link Locator} object to a FrameLocator. This can be useful when you have a Locator object obtained somewhere, and later on would like to interact with the content inside the frame.
New method frameLocator.owner converts a FrameLocator object to a Locator. This can be useful when you have a FrameLocator object obtained somewhere, and later on would like to interact with the iframe element.
#12069: A deprecation warning is now raised when implementations of one of the following hooks request a deprecated py.path.local parameter instead of the pathlib.Path parameter which replaced it:
pytest_ignore_collect{.interpreted-text role="hook"} - the path parameter - use collection_path instead.
pytest_collect_file{.interpreted-text role="hook"} - the path parameter - use file_path instead.
pytest_pycollect_makemodule{.interpreted-text role="hook"} - the path parameter - use module_path instead.
pytest_report_header{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
pytest_report_collectionfinish{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
The replacement parameters are available since pytest 7.0.0.
The old parameters will be removed in pytest 9.0.0.
See legacy-path-hooks-deprecated{.interpreted-text role="ref"} for more details.
Features
#11871: Added support for reading command line arguments from a file using the prefix character @, like e.g.: pytest @tests.txt. The file must have one argument per line.
See Read arguments from file <args-from-file>{.interpreted-text role="ref"} for details.
Improvements
#11523: pytest.importorskip{.interpreted-text role="func"} will now issue a warning if the module could be found, but raised ImportError{.interpreted-text role="class"} instead of ModuleNotFoundError{.interpreted-text role="class"}.
The warning can be suppressed by passing exc_type=ImportError to pytest.importorskip{.interpreted-text role="func"}.
See import-or-skip-import-error{.interpreted-text role="ref"} for details.
#11728: For unittest-based tests, exceptions during class cleanup (as raised by functions registered with TestCase.addClassCleanup <unittest.TestCase.addClassCleanup>{.interpreted-text role="meth"}) are now reported instead of silently failing.
#11777: Text is no longer truncated in the short test summary info section when -vv is given.
#12112: Improved namespace packages detection when consider_namespace_packages{.interpreted-text role="confval"} is enabled, covering more situations (like editable installs).
#9502: Added PYTEST_VERSION{.interpreted-text role="envvar"} environment variable which is defined at the start of the pytest session and undefined afterwards. It contains the value of pytest.__version__, and among other things can be used to easily check if code is running from within a pytest run.
Bug Fixes
#12065: Fixed a regression in pytest 8.0.0 where test classes containing setup_method and tests using @staticmethod or @classmethod would crash with AttributeError: 'NoneType' object has no attribute 'setup_method'.
Now the request.instance <pytest.FixtureRequest.instance>{.interpreted-text role="attr"} attribute of tests using @staticmethod and @classmethod is no longer None, but a fresh instance of the class, like in non-static methods.
Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions |
| --- | --- |
| docutils | [>= 0.17.a, < 0.18] |
| docutils | [>= 0.18.a, < 0.19] |
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the minor-patch group with 7 updates in the / directory:
2024.3.0
2024.4.2
9.8.0
9.9.0
1.42.0
1.43.0
8.1.1
8.2.0
0.3.5
0.4.2
7.2.6
7.3.7
0.20.1
0.21.2
Updates
dockerflow
from 2024.3.0 to 2024.4.2Release notes
Sourced from dockerflow's releases.
Changelog
Sourced from dockerflow's changelog.
Commits
391f9ba
Allowing for async checks in fastApi. Cleaning up old code. (#114)0424734
Update Django docs (#109)f3ff9c3
Fix docstrings about heartbeat status on warnings (200, not 5XX) (#110)9014f6e
Update changelog for 2024.4.0 release (#108)ea3d2ba
(fastapi) Initialize JsonLogFormatter to pass to handler (#107)540563a
Fix #45: Document extra log fields (#105)4c5ae34
Add support for Sanic 23 (#104)559aa01
Fix #79: add support for recent versions of Flask (#103)Updates
newrelic
from 9.8.0 to 9.9.0Release notes
Sourced from newrelic's releases.
Commits
d9dcfaa
Add PID into MEMORY_RUNTIME_METRICS_ENABLED (#1129)7b90b64
Celery Instrumentation Cleanup (#1128)3b46fad
Pin All GitHub Actions (#1126)649044c
Update Artifact Actions to Newer Versions (#1125)b364b5c
Tweak makefile (#1118)bd4e4b1
Update urllib3 to 1.26.18 to silence security warnings (#1124)780f4a2
Move validate_custom_event validators into validators directory (#1089)acf10cc
Celery Distributed Tracing (#1121)c55b4d0
Fix aiohttp Failures (#1123)240ea2e
Merge pull request #1122 from newrelic/memory-usage-sampler-configUpdates
playwright
from 1.42.0 to 1.43.0Release notes
Sourced from playwright's releases.
Commits
d12ce3b
feat(roll): roll Playwright to v1.43 (#2395)d1e3f3c
build(deps): bump types-requests from 2.31.0.20240311 to 2.31.0.20240406 (#2396)b26b1f5
test: port test_launcher to sync test-suite (#2392)d796ac7
devops(conda): publish a single version per OS instead of each supported Pyth...ac6e957
fix(cli): don't show a stack trace when command + c of the CLI (#2390)66ddfee
devops: add osx-arm64 and linux-aarch64 conda package builds (#2211)6a10c42
build(deps): bump pillow from 10.2.0 to 10.3.0 (#2387)7e5f197
feat(roll): roll Playwright to 1.43.0-beta-1711484700000 (#2381)6a84c65
build(deps): bump flaky from 3.8.0 to 3.8.1 (#2377)963d16d
build(deps): bump setuptools from 69.1.1 to 69.2.0 (#2379)Updates
pytest
from 8.1.1 to 8.2.0Release notes
Sourced from pytest's releases.
... (truncated)
Commits
6bd3f31
Tweak changelog for 8.2.09b6219b
Prepare release version 8.2.0835765c
Merge pull request #12130 from bluetech/fixtures-inline7e7503c
unittest: report class cleanup exceptions (#12250)882c4da
fixtures: inlinefail_fixturefunc
2e8fb9f
fixtures: extract a_check_fixturedef
methodacf2971
fixtures: inline_getnextfixturedef
into_get_active_fixturedef
3c77aec
fixtures: move "request" check earlyd217d68
fixtures: inline_compute_fixture_value
530be28
fixtures: use early return in_get_active_fixturedef
Updates
ruff
from 0.3.5 to 0.4.2Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
77c93fd
Bump version to 0.4.2 (#11151)1c9f5e3
Display the AST even with syntax errors (#11147)263a0d2
Usemacos-12
to build release wheels (#11146)4738e19
Remove unused lexical error types (#11145)f428bd5
Docs: mentionlint.typing-modules
inTCH001
,TCH002
,TCH003
(#11144)4690890
ruff server
: In 'publish diagnostics' mode, document diagnostics are cleare...19baabb
README: add Apache Superset to project list (#11136)cee38f3
[flake8-blind-expect
] Allow raise from inBLE001
(#11131)e3fde28
[flake8-pyi
] Allow overloaded__exit__
and__aexit__
definitions (`PYI0...1c8849f
Use Matchit to Resolve Per-File Settings (#11111)Updates
sphinx
from 7.2.6 to 7.3.7Release notes
Sourced from sphinx's releases.
Changelog
Sourced from sphinx's changelog.
... (truncated)
Commits
de4ac2f
Bump to 7.3.7 final4a0c9dd
Return the default value for unsupported theme configuration sections62c3bad
Re-exportpy_sig_re
from the Python domain3bcc669
Defer loading entry-point themes until neededfa4563f
Bump version630b4fb
Bump to 7.3.6 final740b964
fixup! Elaborate a little more in the warning message forconfig.cache
141f3ec
Elaborate a little more in the warning message forconfig.cache
af27188
Addconfig.cache
to the list of warning typesbe2b083
Re-export more names insphinx.domains.python
(#12297)Updates
docutils
from 0.20.1 to 0.21.2Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | docutils | [>= 0.17.a, < 0.18] | | docutils | [>= 0.18.a, < 0.19] |Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show