Notes
This release of the Python agent adds support for AI Monitoring server-side configuration, adds context propagation for Bedrock invocations made through Microsoft Agent Framework, fixes duplicate tool entities for LangChain tools backed by a remote MCP server, reduces race condition risk in the garbage collection data sampler, fixes inconsistent transaction names when using Wagtail, and removes byte encoding from outbound Kombu distributed tracing headers.
Install the agent using easy_install/pip/distribute via the Python Package Index, using conda via the Conda-Forge Package Index, or download it directly from the New Relic download site.
New Features
Add support for AI Monitoring server-side configuration
- The Python agent now supports server-side configuration of AI Monitoring. When configured, the server-side
ai_monitoring.enabled,ai_monitoring.record_content.enabled, andai_monitoring.streaming.enabledvalues take precedence over the local settings.
- The Python agent now supports server-side configuration of AI Monitoring. When configured, the server-side
Add context propagation for Bedrock invocations through Agent Framework
- Propagates trace context across thread boundaries created by Microsoft Agent Framework's Bedrock integration. This allows the agent's existing botocore instrumentation to capture LLM events for Bedrock invocations made through Agent Framework. This does not add full instrumentation of Agent Framework itself.
Bugs
Fix inconsistent transaction names when using Wagtail
- Previously, transaction names for apps built on Wagtail were inconsistent and could be the same for different page views. This has been fixed.
Fix duplicate tool entities for LangChain tools backed by a remote MCP server
- Previously, when a LangChain tool was backed by a remote MCP server that was also separately instrumented, duplicate tool entities appeared in the UI. This has been fixed by gating subcomponent attributes off of LangChain tools when a known remote tool is detected.
Fix missing User Input field for LangChain and LangGraph MCP tool calls
- Previously, when LangChain or LangGraph used tools from an MCP server, the User Input field could be missing from AI monitoring data if the input message wasn't the last message in the streamed sequence. This has been fixed, and the agent now correctly extracts the input message in these cases.
Reduce race condition risk in the garbage collection data sampler
- Previously, the agent always called
gc.get_objects()to sample garbage collector object counts, regardless of configuration. This has been changed sogc.get_objects()is only called whentop_object_count_limitis configured above0, avoiding unnecessary heap iteration for customers who don't track object types collected by the garbage collector.
- Previously, the agent always called
Remove byte encoding from outbound Kombu distributed tracing headers
- Previously, distributed tracing headers added by Kombu instrumentation were byte-encoded, which broke transports that serialize payloads with the standard library
jsonmodule (for example, SQLAlchemy-backed transports). The byte encoding has been removed so these transports work correctly.
- Previously, distributed tracing headers added by Kombu instrumentation were byte-encoded, which broke transports that serialize payloads with the standard library
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
이번 파이썬 에이전트 릴리스는 Google ADK에 대한 계측 지원을 추가하고, 여러 AI 제공업체(Anthropic, Google 생성형 AI, OpenAI 및 AWS Bedrock)에 대한 토큰 계산을 추가하며, 아웃바운드 tracestate 헤더 크기를 줄이고, graphql-core 계측의 충돌을 수정합니다.
easy_install/pip/distribute 사용하여 에이전트를 설치하세요. 파이썬 패키지 인덱스를 통해 conda 사용하거나, Conda-Forge 패키지 인덱스를 통해 을 사용하거나, 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
개선된 기능
Google ADK에 대한 계측 추가
파이썬 에이전트는 이제 Google ADK (에이전트 개발 키트) AI 에이전트 워크플로우를 계측합니다.
계측된 구성 요소는 다음과 같습니다:
LlmAgentgoogle.genai을(를) 통해 Gemini 또는 VertexAI 백앤드에 연결됨- 사용자 정의
FunctionTool인스턴스 - 하위 에이전트 및
AgentTool인스턴스를 포함하는 하위 에이전트 워크플로우 Workflow클래스와 더 이상 사용되지 않는LoopAgent,ParallelAgent및SequentialAgent클래스를 포함하는 다중 에이전트 워크플로우
Anthropic, Gemini, OpenAI 및 Bedrock에 대한 토큰 계산 추가
파이썬 에이전트는 이제 여러 AI 제공업체의 모든 LLM 호출에 대한 토큰 수를 보고합니다:
- Anthropic SDK
- Google 생성형 AI SDK
- OpenAI SDK
- botocore 및 aiobotocore를 통한 AWS Bedrock
벌레
graphql-core v3.2.10의 계측 충돌 수정
- 이전에 graphql-core v3.2.10에서
ExecutionContext의errors속성 이름을collected_errors(으)로 변경하여 에이전트 충돌이 발생했습니다. 이 문제가 수정되었으며, 이제 에이전트가 graphql-core v3.2.10 이상에서 올바르게 작동합니다.
- 이전에 graphql-core v3.2.10에서
아웃바운드
tracestate헤더에서spanId제거- 이전에 에이전트는 아웃바운드
tracestate헤더에spanId을(를) 포함했습니다.spanId이(가) 이미traceparent헤더에 있으므로 이는 불필요한 중복이었습니다. 아웃바운드 헤더 크기를 줄이기 위해tracestate에서spanId이(가) 제거되었습니다.
- 이전에 에이전트는 아웃바운드
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이번 파이썬 에이전트 릴리스는 LangChain 체인 LLM 이벤트에 추가 모델 정보를 추가하고, LangGraph 스트리밍 계측의 버그를 수정합니다.
easy_install/pip/distribute 사용하여 에이전트를 설치하세요. 파이썬 패키지 인덱스를 통해 conda 사용하거나, Conda-Forge 패키지 인덱스를 통해 을 사용하거나, 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
개선된 기능
LangChain 체인 LLM 이벤트에 추가 모델 정보 추가
- LangChain 체인에서 생성된 LLM 이벤트에
request.model및response.model속성을 추가합니다. - 이 정보는 최선을 다해 수집되지만 항상 제공되지는 않을 수 있습니다.
- LangChain 체인에서 생성된 LLM 이벤트에
벌레
LangGraph 스트리밍 계측에서 TypeError 수정
- 이전에 LangGraph에서 스트리밍 API의 하위 집합을 사용할 때, LangGraph의
weakref.WeakMethod사용으로 인해 에이전트에서TypeError이(가) 발생했습니다. 이 문제가 해결되었으며, 이제 에이전트가 해당 LangGraph 스트리밍 메서드에서 정상적으로 작동합니다.
- 이전에 LangGraph에서 스트리밍 API의 하위 집합을 사용할 때, LangGraph의
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이번 파이썬 에이전트 릴리스에서는 여러 새로운 레디스 명령에 대한 지원을 추가하고, LangGraph 계측의 버그를 수정하며, 하베스트 제한 설정의 처리 및 로깅을 개선합니다.
easy_install/pip/distribute 사용하여 에이전트를 설치하세요. 파이썬 패키지 인덱스를 통해 conda 사용하거나, Conda-Forge 패키지 인덱스를 통해 을 사용하거나, 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
개선된 기능
새로운 레디스 v8.8.0 명령어에 대한 계측 추가
redis-py v8.8.0의 다음 새로운 레디스 명령어 에 대한 계측을 추가합니다:
- 기타 명령어: INCREX, XNACK
- 어레이 명령: ARCOUNT, ARDEL, ARDELRANGE, ARGET, ARGETRANGE, ARGREP, ARINFO, ARINSERT, ARLASTITEMS, ARLEN, ARMGET, ARMSET, ARNEXT, AROP, ARRING, ARSCAN, ARSEEK, ARSET
벌레
LangGraph 계측의 크래시 수정
- 이전에는 LangGraph 계측을 사용할 때 AsyncBackgroundExecutor의 작업에 대한 컨텍스트 전파 문제로 인해 에이전트가 충돌했습니다. 이 문제는 해결되었으며, 이제 에이전트가 LangGraph와 함께 정상적으로 작동합니다.
하베스트 제한 설정의 처리 및 로깅 개선
- 이제 에이전트는 뉴렐릭 원의 환경 탭에 수집 메서드 및 제한 목록을 더 정확하게 보고합니다.
- 이제 에이전트는 시작 시 수집 제한 설정에 대해 더 일관된 디버그 로깅을 제공합니다.
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
이번 파이썬 에이전트 릴리스에서는 LangChain 및 LangGraph의 컨텍스트 전파 문제, OpenAI 채팅 완료 기록 문제, 그리고 LiteLLM을 프록시로 사용하여 OpenAI(https://pypi.org/project/openai) 스트리밍을 사용할 때 발생하는 문제를 수정합니다.
easy_install/pip/distribute 사용하여 에이전트를 설치하세요. 파이썬 패키지 인덱스를 통해 conda 사용하거나, Conda-Forge 패키지 인덱스를 통해 을 사용하거나, 뉴렐릭 다운로드 사이트 에서 직접 다운로드하세요.
벌레
LangChain 및 LangGraph에서 컨텍스트 전파 수정
OpenAI 챗 컴플리션 기록 문제 해결
- OpenAI 는 소비자가 모든 데이터를 읽지 않았더라도 스트리밍 응답을 닫는 로직을 다시 도입했습니다. 이전에는 스트림의 끝에 도달했을 때만 채팅 완료 데이터가 기록되었으며, 이로 인해 스트림이 닫힐 때 채팅 완료 데이터가 기록되지 않았습니다. 이제 스트림이 완전히 읽히지 않은 경우에도 채팅 완료 데이터를 캡처하는 로직이 추가되었습니다.
LiteLLM을 프록시로 사용하여 OpenAI 스트리밍을 사용할 때 발생하는 문제를 수정했습니다.
지지 성명
최신 에이전트 버전이 출시되면 즉시 업데이트하는 것이 좋습니다. 최신 버전으로 업그레이드할 수 없는 경우, 에이전트를 90일 이내 버전으로 업데이트하세요. 에이전트에게 최신 정보를 제공하는 방법에 대해 자세히 알아보세요.
에이전트 릴리스 및 지원 날짜에 대한 정보는 뉴렐릭 끌어 당기는 에이전트 EOL 정책을 참조하세요.
Notes
This release of the Python agent removes support for Python lambda function in the config file, excludes the newrelic header by default, adds support for exclude and include settings for Hybrid Agent traces, anthropic instrumentation, gemini response streaming, improves caching of IS_PYPY in gc_data.py for performance, and adds http.statusCode attribute in transaction events. This release also resends modules during reconnect ensuring they are recorded, guards garbage collection metrics against re-entrant calls, fixes task propagation in async generators and starlette context propagation in StreamingResponse.
Install the agent using easy_install/pip/distribute via the Python Package Index, using conda via the Conda-Forge Package Index, or download it directly from the New Relic download site.
Removed features
Remove support for Python lambda functions in the config file
- Previously, the agent allowed specifying a Python lambda function to dynamically name transactions, background task, database trace, profile trace, external trace url and method, function trace, generator trace, and memcache trace. Since support for this feature exposes a security vulnerability in the agent this feature is being removed.
Deprecations
- The
response.statusattribute inWebTransactions is considered deprecated and will be removed in the upcoming 14.0.0 release. It is being replaced byhttp.statusCode. We recommend replacing all references toresponse.statuswithhttp.statusCode.
New features
Exclude the
newrelicheader by default- The
newrelicdistributed tracing header is now no longer sent by default. Only the W3Ctraceparentandtracestateheaders will be sent.
- The
Add exclude and include settings for Hybrid Agent traces
opentelemetry.traces.includefor the configuration file orNEW_RELIC_OPENTELEMETRY_TRACES_INCLUDEto be used as an environment variableopentelemetry.traces.excludefor the configuration file orNEW_RELIC_OPENTELEMETRY_TRACES_EXCLUDEto be used as an environment variable
The Hybrid Agent's default behavior will be different as well. Now, only libraries and tracers that are supported by OpenTelemetry but not already supported by New Relic will utilize OpenTelemetry's instrumentation. Otherwise, the agent will default to the New Relic instrumentation hooks.
More information about these settings can be found in the Python Agent configuration page as well as the OpenTelemetry API support page.
Add Anthropic streaming instrumentation
- Adds instrumentation support for anthropic.
Improve caching of IS_PYPY in gc_data.py for performance
Now checks and caches IS_PYPY once when the module is loaded.
Add Gemini response streaming
- Add response streaming support to Gemini through the google-genai package.
Add
http.statusCodeattribute to transaction events- To conform with the rest of the language agents, the Python agent now sends the http status to the
WebTransactionattributehttp.statusCode. The Python agent will continue to send the attribute toresponse.statusas well, but theresponse.statusattribute will be removed in the future.
- To conform with the rest of the language agents, the Python agent now sends the http status to the
Bugs
Resend modules during reconnect
- The agent previously only sent the module list periodically after the first connect cycle. If the agent reconnected to the collector, this data would not be resubmitted, so the UI would no longer show the module data. This has now been fixed.
Guard garbage collection metrics against re-entrant calls
- Adds a flag to prevent re-entrant calls to
_GCDataSource.record_gc()to prevent infinite recursion on Python 3.13+.
- Adds a flag to prevent re-entrant calls to
Enable task propagation in async generators
- Fixes an issue where
AsyncGeneratorProxywould not properly handle transaction context propagation if spread over multiple tasks.
- Fixes an issue where
Fix Starlette context propagation in
StreamingResponse- Adds trace context propagation to starlette
StreamingResponsefor both synchronous and asynchronous generators.
- Adds trace context propagation to starlette
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.