Notes
This release of the Python agent makes the following changes:
- Removes support for Python 3.7
- Removes and or deprecates various APIs and settings
- Deprecates aioredis instrumentation
- Raises the minimum supported version of
setuptools
andsetuptools_scm
- Adds new instrumentation for AutoGen
- Adds new instrumentation for Pyzeebe
- Adds new MCP (Model Context Protocol) named spans
- Fixes a crash in psycopg
- Ensures MCP spans are only recorded when AI monitoring is enabled
Install the agent using easy_install/pip/distribute
via the Python Package Index or download it directly from the New Relic download site.
Removed features
Removes support for Python 3.7
- Python 3.7 was EOL'd June 27, 2023. The Python agent has dropped support for it.
Removes various deprecated APIs
The following APIs have been removed:
Legacy API Replacement API accept_distributed_trace_payload
accept_distributed_trace_headers
add_custom_parameter
add_custom_attribute
add_custom_parameters
add_custom_attributes
create_distributed_trace_payload
insert_distributed_trace_headers
get_browser_timing_footer
The functionality of this has been wrapped into get_browser_timing_header()
record_exception
notice_error()
NewRelicLogHandler
NewRelicLogForwardingHandler
lambda_handler
&LambdaHandlerWrapper
These APIs have moved to the newrelic-lambda
package.
Removes various deprecated settings
The following settings have been removed:
Legacy Setting Replacement Setting transaction_tracer.capture_attributes
transaction_tracer.attributes.enabled
error_collector.capture_attributes
error_collector.attributes.enabled
browser_monitoring.capture_attributes
browser_monitoring.attributes.enabled
analytics_events.enabled
transaction_events.enabled
analytics_events.capture_attributes
transaction_events.attributes.enabled
error_collector.ignore_errors
error_collector.ignore_classes
strip_exception_messages.whitelist
strip_exception_messages.allowlist
ssl
This is now hardcoded to true
so it has been removed as a setting option.ignored_params
Use newrelic.attributes.exclude = request.parameters.{name}
instead. Add each request parameter key to thenewrelic.attributes.exclude
list, delimited by commas. Be sure to prepend the key withrequest.parameters
.agent_limits.merge_stats_maximum
This is now completely ignored in favor of serverside config.
Deprecated features
Instrumentation for aioredis has been deprecated
Deprecates some existing harvest settings to match other language agents
In order to be more consistent with the conventions of the other language agents, the following harvest settings are now deprecated:
Legacy Setting Replacement Setting event_harvest_config.harvest_limits.analytic_event_data
transaction_events.max_samples_stored
event_harvest_config.harvest_limits.span_event_data
span_events.max_samples_stored
event_harvest_config.harvest_limits.error_event_data
error_collector.max_event_samples_stored
event_harvest_config.harvest_limits.custom_event_data
custom_insights_events.max_samples_stored
event_harvest_config.harvest_limits.log_event_data
application_logging.forwarding.max_samples_stored
This is a revert of a previous change that renamed these settings from
*.max_samples_stored
to theevent_harvest_config.harvest_limits.*
form. This decision has been reversed, and the original settings named have been restored to match the other language agents who did not change these settings names. The deprecated settings will continue to work for now, but they will be removed in a future release.
Deprecates configuration of the agent through the WSGI environ dictionary
The following settings which were previously possible to configure through the WSGI environ dictionary are now deprecated. Please configure these settings through environment variables or the config file.
newrelic.set_background_task
newrelic.suppress_apdex_metric
newrelic.suppress_transaction_trace
newrelic.capture_request_params
newrelic.disable_browser_autorum
Deprecates support for building the agent with
setuptools<61.2
orsetuptools_scm<6.4
- The minimum supported versions of
setuptools
andsetuptools_scm
have been increased to61.2
and6.4
respectively. This is to support the use ofpyproject.toml
for configuring the package metadata and building instructions. The agent can now be built with more modern build tools which will no longer log warnings about the lack of apyproject.toml
file. - This change adds new version attributes to the packages,
newrelic.__version__
andnewrelic.__version_tuple__
, which can be used to programmatically check the version of the agent at runtime.
- The minimum supported versions of
New features
Adds new instrumentation for AutoGen
- Adds instrumentation (named spans and custom
Llm
events) for agents and tools in AutoGen
- Adds instrumentation (named spans and custom
Adds new instrumentation for Pyzeebe
- Adds automatic instrumentation and framework-specific agent attributes for Pyzeebe
Adds new MCP (Model Context Protocol) named spans
- Adds new named spans for MCP (Model Context Protocol) tool calls made via tool manager to support Streamable HTTP
Bug fixes
Fixes a crash in
psycopg>=3.2.0
when callingas_string()
- Fixes an issue in
psycopg>=3.2.0
where theas_string()
method no longer required arguments, causing a potential crash. This has been fixed, and both signatures of this method are supported.
- Fixes an issue in
Ensures MCP (Model Context Protocol) spans are only recorded when AI monitoring is enabled
- Ensures MCP (Model Context Protocol) spans are only recorded when the setting
ai_monitoring.enabled
is enabled.
- Ensures MCP (Model Context Protocol) spans are only recorded when the setting
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.
Notes
이번 릴리스 에이전트에는 다음에 대한 지원이 추가되었습니다.
- Celery의 사용자 정의 작업
- 그래핀-Django 모니터링
- Django의 미들웨어 필터링
- AWS Bedrock Converse API
- W3CTraceParent 헤더 샘플링 플래그
이 릴리스에서는 다음과 같은 수정 사항도 제공됩니다.
- GraphQL에서 가장 깊은 고유 경로에 대한 보호 장치
- 웹 URL 요청 구문 분석을 위한 보안 조치
- ElasticSearch 및 GraphQL에 대한 대체
trace.settings==None
- 비동기 ElasticSearch 클라이언트 목록에서
options
메서드 제거
끌어오기 패키지 색인을 통해 easy_install/pip/distribute
사용하여 에이전트를 설치하거나 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
새로운 기능
Celery에서 사용자 정의 작업에 대한 지원을 추가합니다.
Graphene-Django에 대한 지원을 추가합니다.
- Graphene-Django 로 생성된 동기 스키마에 대한 모니터링 지원을 추가합니다. 이전에는 Graphene-Django로 생성된 스키마가 부분적으로만 모니터링되어 GraphQL 관련 속성이 누락되었습니다.
Django에서 미들웨어 필터링에 대한 지원을 추가합니다.
이제 사용자는 모니터링할 Django 미들웨어를 필터링할 수 있습니다. 이제 세 가지 추가 설정이 있습니다.
instrumentation.middleware.django.enabled
(기본값은true
입니다)instrumentation.middleware.django.exclude
instrumentation.middleware.django.include
자세한 내용과 예제는 Django 미들웨어 필터링 페이지를 참조하세요.
AWS Bedrock Converse API에 대한 지원을 추가합니다.
- 스트리밍이 아닌 Converse API에 대한 모니터링 지원을 추가합니다. 여기에는
boto3
및aioboto3
클라이언트를 사용하여 수행된converse
채팅 완료 호출에 대한 지원이 포함됩니다.
- 스트리밍이 아닌 Converse API에 대한 모니터링 지원을 추가합니다. 여기에는
W3CTraceParent 헤더 샘플링 플래그에 대한 지원을 추가합니다.
- 업스트림 서비스가 샘플링 플래그가 설정된 W3CTraceParent 헤더를 보내면 뉴렐릭은 currentResources를 샘플링할지 여부를 결정할 때 해당 샘플링 결정을 고려합니다.
원격 부모가 샘플링되었는지 여부에 따라 샘플링 결정에 대한 지원이 추가되었습니다.
두 가지 새로운 설정 옵션에 대한 지원이 추가되었습니다.
distributed_tracing.sampler.remote_parent_sampled
distributed_tracing.sampler.remote_parent_not_sampled
default
기본 동작이며 이 변경 이전과 동일하게 동작합니다(트랜잭션을 샘플링할지 여부를 결정하기 위해 샘플링 결정을 적응형 샘플링 알고리즘에 전달함).always_on
즉, 원격 부모가 샘플링되었거나 샘플링되지 않은 트레이스는 항상 샘플링됩니다.always_off
즉, 원격 부모가 샘플링되었거나 샘플링되지 않은 원격 부모가 있는 트레이스는 절대 샘플링되지 않습니다.
버그 수정
GraphQL에서 가장 깊은 고유 경로에 대한 보호 기능 추가
- 일부 사용자는 GraphQL 에서 필드 이름이
None
반환하여 가장 깊은 고유 경로가 생성되지 않는 문제를 경험했습니다. 이 문제는 해결되었습니다.
- 일부 사용자는 GraphQL 에서 필드 이름이
웹 요청 구문 분석을 위한 보호 기능 추가
- 일부 사용자는
request_uri
잘못 형식화되었거나 잘못된 문자를 포함하고 있어 구문 분석 오류를 경험했습니다. 요청 헤더의request_uri
이 유효하지 않고 원래 제공된 (유효한) URL과 일치하지 않는 경우 이 문제가 발생할 수 있습니다. 이 보호 장치는 현재 뉴렐릭에 적용되었지만,urllib
에서는 2025년 1월 31일 이후에 출시된 버전에 대한 이 문제를 해결했습니다.
- 일부 사용자는
ElasticSearch 및 GraphQL에서 충돌을 수정합니다.
trace.settings==None
trace.settings
이None
인 경우 ElasticSearch에 대한 측정, 리소스가 작동을 중단했습니다.global_settings
대안이 마련되었습니다. 이는 GraphQL에서 발견되는 동일한 문제를 해결합니다.
비동기 ElasticSearch 클라이언트 목록에서
options
메서드 제거- 이전 측정, ElasticSearch의 계측은
options
비동기 메서드 목록에 있기 때문에 충돌이 발생했습니다. 이 메서드는 어떠한 데이터스토어 작업/requests 도 수행하지 않으므로 더 이상DatastoreTrace
에 래핑되지 않습니다.
- 이전 측정, ElasticSearch의 계측은
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이 에이전트 릴리스에서는 새로운 레디스 함수에 대한 지원이 추가되고, 모든 내부 경로를 os.path
에서 pathlib.Path
로 변환하며, PosixPaths의 JSON 인코딩 문제를 해결합니다.
끌어오기 패키지 색인을 통해 easy_install/pip/distribute
사용하여 에이전트를 설치하거나 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
새로운 기능
새로운 레디스 기능에 대한 지원을 추가합니다.
- 새로운 레디스 함수에 대한 측정, 로그를 추가합니다.
os.path
의 모든 내부 경로를 다음으로 변환합니다.pathlib.Path
- Windows 경로를 지원하기 위해 문자열 기반 경로의 모든 내부 사용법과
os.path
을pathlib.Path
로 변환합니다.
- Windows 경로를 지원하기 위해 문자열 기반 경로의 모든 내부 사용법과
버그 수정
PosixPath JSON 인코딩 문제 해결
- 일부 사용자는 JSON 인코딩
PosixPath
구성 설정에서 문제를 겪고 있었습니다. 이 문제는 해결되었습니다.
- 일부 사용자는 JSON 인코딩
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이번 릴리스 에이전트는 oracledb 에 대한 지원을 추가하고, MessageTransaction
객체에 destination_name
속성이 없는 Kombu 및 Kafka의 버그를 수정하고, AWS 에서 사용률 메타데이터가 사라지는 문제를 수정합니다.
끌어오기 패키지 색인을 통해 easy_install/pip/distribute
사용하여 에이전트를 설치하거나 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
새로운 기능
OracleDB에 대한 지원을 추가합니다.
- oracledb 에 대한 측정, 도구를 추가합니다.
버그 수정
"
MessageTransaction
개체에 속성destination_name
없습니다" 버그 수정- MessageBroker 측정, 과학적 버그를 수정했습니다. 이 버그에서는 직렬화 메서드가
MessageTransaction
에서destination_name
속성을 찾았지만 해당 속성이 존재하지 않았습니다.
- MessageBroker 측정, 과학적 버그를 수정했습니다. 이 버그에서는 직렬화 메서드가
AWS와 K8s를 함께 실행할 때 발생하는 AWS 활용 메타데이터 문제 해결
- AWS EC2 서버에서 실행되는 K8s 파드의 권한 설정으로 인해 사용량을 처음으로 검색할 수 있습니다. 그러나 애플리케이션을 계속해서 실행하면 에이전트가 다시 연결되고 사용률 메타데이터가 로드되지 않습니다. 이러한 경우, 활용 메타데이터는 에이전트 인스턴스별로 캐시되며 검색이 가능합니다.
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이번 릴리스 에이전트에는 Azure Function Apps 및 protobuf v6에 대한 지원이 추가되었습니다.
끌어오기 패키지 색인을 통해 easy_install/pip/distribute
사용하여 에이전트를 설치하거나 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
새로운 기능
Azure 함수 앱에 대한 지원을 추가합니다.
- HTTPTrigger 유형에 대한 Azure Function Apps 에 대한 지원을 추가합니다.
버그 수정
protobuf v6 지원을 활성화하기 위해 pb2 파일을 추가합니다.
- 이전에는 protobuf v6 지원이 부족하여 여러 Google 패키지가 뉴렐릭과 호환되지 않았습니다. 이제 이 문제는 해결되었습니다.
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
This release of the Python agent adds support for the Model Context Protocol (MCP) and fixes import logic for importlib.metadata
and pkg_resources
.
Install the agent using easy_install/pip/distribute
via the Python Package Index or download it directly from the New Relic download site.
New features
Add support for Model Context Protocol (MCP)
Bug fixes
Fix import logic for
importlib.metadata
andpkg_resources
- Updates logic around import of
importlib.metadata
to also attempt to use theimportlib_metadata
backport before falling back topkg_resources.*
. This also removes use ofsys.version
conditionals and fixes issues where Python 3.9 could only usepkg_resources
despite havingimportlib.metadata
available.
- Updates logic around import of
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.