身怀六甲什么意思| 耳朵响是什么原因| 心门是什么意思| 痱子吃什么药| 骨头坏死是什么原因造成的| 甲状腺1类是什么意思| 脸上经常长痘痘是什么原因| 逸夫是什么意思| 太监是什么意思| y是什么意思| 小气是什么意思| 仓鼠能吃什么东西| 北京生源是什么意思| 梅开二度的意思是什么| 绿豆与什么食物相克| 王姓为什么出不了皇帝| 屁股里面疼是什么原因| 我不知道你在说什么英文| 巫山云雨是什么意思| 第一次同房要注意什么| 卡西欧手表什么档次| 什么是玄关在哪个位置| 维生素d补什么| 补铁吃什么食物好| 肾虚腰疼吃什么药最有效| ed患者是什么意思| 门齿是指什么地方| 打九价是什么意思| 谷氨酰转移酶高是什么病| 分山念什么| 怎么算自己五行缺什么| 阴道里面瘙痒是什么原因| 自学成才是什么意思| 满族不吃什么肉| 梦见自己捡钱是什么意思| 儿童发育过早应该挂什么科| 脚脱皮用什么药| 大姨妈期间不能吃什么东西| 操逼是什么感觉| 0型血和b型血生的孩子是什么血型| 小便有泡沫是什么情况| 橄榄菜是什么菜| 为什么腰痛| 70岁是什么之年| 92年的猴是什么命| 头热手脚冰凉什么原因| 胃胀气打嗝是什么原因| 常务理事是什么职位| 水落石出是什么生肖| 蛋白粉吃多了有什么危害| 手链突然断了预示什么| 肾炎的饮食应注意什么| 女生无缘无故头疼是什么原因| 美联储加息意味着什么| 舒肝解郁胶囊治什么病| 辅酶q10什么时候吃最好| 吃什么排宿便清肠彻底| 下午三点到四点是什么时辰| 因人而异是什么意思| afp是什么传染病| 298什么意思| hcg翻倍慢是什么原因| jsdun是什么牌子的手表| 吐血是什么原因引起的| 白头翁幼鸟吃什么| 心脏做什么检查最准确| 失能是什么意思| 风湿性关节炎什么症状| 化疗吃什么补白细胞| 117是什么意思| 五指姑娘是什么意思| 机关单位和事业单位有什么区别| bmo是什么意思| 副词是什么| 大便阳性说明什么问题| 做什么运动能瘦肚子| 糜烂性胃炎可以吃什么蔬菜| 梦见买碗是什么意思| 霸王硬上弓是什么意思| 师傅和师父有什么区别| 低血压吃什么好的最快女性| 好好好是什么语气| 吃什么治肝病| 二月什么座| 什么样的人容易得脑瘤| 窦性心律过缓什么意思| 水泻拉肚子是什么原因| 海马有什么功效作用| 脸上老是长闭口粉刺是什么原因| 税号是什么| 梅花表属于什么档次| 眼睛干涩吃什么食物好| pv是什么材质| 晚上放屁多是什么原因| 匝道是什么| 心花怒放是什么生肖| 东北有什么好玩的景点| 什么是人乳头瘤病毒| petct是什么| 一吃东西就牙疼是什么原因引起的| 上颌窦囊肿是什么意思| 舌头发苦是什么原因造成的| 小巧玲珑是什么意思| 宫颈常大是什么意思| 胃酸胃胀反酸水吃什么药| 吃什么助睡眠| 空洞是什么意思| 广州的市花是什么| 荷花和睡莲有什么区别| 西游记有什么故事| 虚热吃什么药| 雯字五行属什么| 月经期不能吃什么水果| 36是什么生肖| 泾渭分明是什么意思| 梦见戴手表是什么意思| 起酥油是什么油| 为什么用英语怎么说| 讨扰是什么意思| 肿脚是什么原因引起的| 捆是什么意思| 检查耳朵挂什么科| 长颈鹿吃什么树叶| 什么人容易得间质瘤| hpv和tct有什么区别| 农历二月是什么月| 十二年是什么婚| 多巴胺是什么意思| 宫保鸡丁是什么菜系| 血小板低会引发什么病| 米氮平是什么药| 9月15号是什么星座| 女生为什么会流白带| negative什么意思| 个性是什么意思| 宫颈粘膜慢性炎是什么意思| 不稀罕是什么意思| 重逢是什么意思| 鼻涕臭是什么原因| 菱形脸适合什么刘海| 拉仇恨是什么意思| 表是什么意思| 老是睡不着觉是什么原因| gold是什么牌子| 腰痛吃什么药好| 干细胞移植是什么意思| 潘氏试验阳性说明什么| 扁平息肉属于什么性质| 路人甲什么意思| 百合什么时候收获| 甲状腺挂什么科| 桥本氏甲状腺炎是什么意思| 脉浮是什么意思| 妊娠是什么意思啊| 鞑靼是什么意思| 白头翁是什么动物| 喜大普奔是什么意思| 五蕴皆空是什么意思| 孕妇吃蓝莓对胎儿有什么好处| 鞠婧祎什么学历| 复方药是什么意思| qq2g在线是什么意思| 排卵期什么时候| 梦见别人生孩子预示什么| 嘴唇麻木什么病兆| 男性吃什么可以壮阳| 鑫字代表什么生肖| 沙眼是什么原因引起的| 玻尿酸是什么东西| 陨石有什么作用和功效| 赢荡为什么传位嬴稷| mmi是什么药| 不能吃辛辣是指什么| 前列腺钙化有什么症状| hr什么意思| rop胎位是什么意思| m代表什么意思| 刺梨是什么水果| 今天股市为什么大跌| 牛肉和什么包饺子好吃| 莘莘学子是什么意思| 胃疼去医院挂什么科| 炎性肉芽肿是什么意思| 肠化什么意思| 酸枣仁有什么功效| sg比重是什么意思| 头尖适合什么发型| 敬谢不敏是什么意思| 手机贴什么膜最好| 预产期是什么意思| 蓝色妖姬适合送什么人| 荷兰豆炒什么好吃| 佳的五行属什么| 什么是包皮过长| gold什么意思| 交替脉见于什么病| 做梦梦见下大雨是什么意思| forever21是什么牌子| 北京的区长是什么级别| 双性人是什么意思| 言重了是什么意思| 人为什么会生病| 敏感肌是什么意思| 石见读什么| 嘴角烂了涂什么药| 什么的蜡烛| 贴水是什么意思| 卧室放什么驱虫最好| 心脏痛吃什么药效果好| 儿童风寒咳嗽吃什么药| 什么的旅行| 魅可口红属于什么档次| 四史指的是什么| 白塞病是什么病| 梦见狗咬人是什么预兆| 妈妈的弟弟的老婆叫什么| 得性病有什么症状| md是什么学位| 更年期吃什么药好| 枸杞泡水喝有什么功效| 生不逢时是什么意思| 林伽是什么| nt是什么币| 增加性功能吃什么药| 太容易出汗是什么原因| 抽风是什么意思| 蝉什么时候出来| 不甚是什么意思| 九月24日是什么星座| 茹是什么意思| 兔子能吃什么水果| 经常拉屎是什么原因| 广州有什么特产| 悸是什么意思| 男性尿道出血什么原因| 嘴唇颜色深是什么原因| 荞麦枕头有什么好处| 肩膀疼应该挂什么科| 鼻炎看什么科| 昊字五行属什么| 耳朵痒是什么预兆| 女命正印代表什么| 什么是人大代表| 段泥紫砂壶适合泡什么茶| 做生化是检查什么的| 肺大泡是什么病严重吗| 白醋和陈醋有什么区别| 高丽参和红参有什么区别| 口渴是什么病的前兆| 天高云淡是什么季节| 湿热吃什么食物| 山楂和什么泡水喝降血压| 腹黑是什么意思| 白细胞弱阳性是什么意思| 遐龄是什么意思| 内痔用什么药治最好效果最快| 水有什么作用| 核辐射是什么意思| 惊艳了时光温柔了岁月什么意思| 什么是碱性食物| 跳大神什么意思| 不干胶是什么| 优点是什么意思| 生脉饮适合什么人群| 百度
  • /
  • EnglishEspa?olFran?ais日本語???Português
  • Log inStart now

密云摄协推出“美丽冯家峪 幸福生态谷”摄影大赛活动

百度 标准普尔500指数下跌%,金融股下落达到%。

Our Python agent lets you change the default agent behavior agent using configuration options.

The only required Python agent configuration setting is the . The license key identifies the account where the agent reports application data. Depending on how you are hosting your application, the license key can be provided via a configuration file or an environment variable.

Configuration methods and precedence

The primary way to configure the Python agent is via the configuration file, which is generated as part of the standard install process. It is also possible to set a limited number of configuration options using server-side configuration in the UI or by using environment variables. You can also specify some settings on a per-request basis by passing settings with the WSGI request environ dictionary.

The Python agent follows this order of precedence for configuration:

diagram-python-config-precedence.png

With the Python agent, per-request options override server-side config. If enabled, server-side config overrides all corresponding values in the agent config file, even if the server-side values are left blank. The agent config file overrides environment variables. Environment variables override the agent defaults.

Here are detailed descriptions of each configuration method:

Multiple environment configuration

The agent reads its primary configuration from an agent config section called [newrelic] for ini files, or [tool.newrelic] for .toml files. You can provide overrides for specific deployment environments (for example, Development, Staging, Production) in additional sections. Preface these sections with [newrelic:environment] for .ini files, or [tool.newrelic.env.environment] for .toml files (where environment is replaced with the name of your environment).

To specify that the agent should use an environment-based configuration, use one of these methods:

  • When you call newrelic.agent.initialize(), provide the environment name as the second argument.

    OR

  • Set the NEW_RELIC_ENVIRONMENT environment variable to the environment name.

If no environment is specified, the agent will use the default settings as specified in the newrelic agent config section.

The basic structure of the configuration file is:

General configuration settings

These settings are available in the agent configuration file.

Attributes

Attributes are key-value pairs that provide information for transaction traces, traced errors, , and transaction events. In addition to configuring attributes for all four destinations with the general attribute settings below, they can also be configured on a per-destination basis.

For more information, see Python agent attributes, Enabling and disabling attributes, and Attribute examples.

AI monitoring

This section includes Python agent configurations for setting up AI monitoring.

Important

You must enable distributed tracing to capture AI data. It's turned on by default in Python agent versions 7.0.0.166 and higher.

Important

When enabled, AI monitoring records a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein. You're responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI monitoring feature.

Transaction tracer configuration

Important

Do not use brackets [suffix] at the end of your transaction name. The agent automatically strips brackets from the name. Instead, use parentheses (suffix) or other symbols if needed.

For more information about transaction traces, see Transaction traces.

Transaction segment configuration

Here are Transaction segment settings available via the agent configuration file.

Error collector configuration

Here are error collector settings available via the agent configuration file.

Tip

For an overview of error configuration in APM, see Manage errors in APM.

Browser monitoring settings

Here are browser monitoring settings available via the agent configuration file.

Transaction events settings

Here are Transaction events settings available via the agent configuration file.

Tip

These configuration settings used to be called analytic_events. If your configuration file still uses analytic_events, update your agent to use transaction_events.

Custom events settings

Here are custom events settings available via the agent configuration file.

Datastore tracer settings

These datastore tracer settings are available via the agent configuration file:

Distributed tracing settings

Distributed tracing lets you see the path that a request takes as it travels through a distributed system. Starting in Python agent version 7.0.0.166 or higher, distributed tracing is enabled by default.

Important

Enabling distributed tracing disables cross application tracing and has other effects on APM features. If migrating from cross application tracing, read the transition guide.

For more information, see Distributed tracing for your Python services.

Settings include:

Span event configuration

Span events are collected for distributed tracing. Distributed tracing must be enabled to report span events. Configuration options include:

Event harvest configuration

Event harvest settings limit the amount of event type data sent to New Relic. When you use these settings, consider these important points:

  • Event harvest settings affect the limits for a single instance of the agent, and not across the entire application. See the usage example below for how to set limits across an entire application.
  • Real time streaming sends data every five seconds (12 times per minute), but the event harvest settings still affect the rate in events per minute. Enabling or disabling real time streaming does not require changing these settings.
  • With real time streaming (enabled by default), New Relic will display the event harvest limits for entities in five second intervals. This means, for example, when you set a limit value of 1200 in the config file, you'll see it as 100 in New Relic.

Usage example

Let's say an application is deployed across 10 hosts, each running four processes per host. To limit the number of span events to 10,000 events per minute for the entire application, divide that number by 10 hosts. Then divide again by four processes per host.

10000 / (10 * 4) = 250

Based on that calculation, the final setting is:

event_harvest_config.harvest_limits.span_event_data = 250

Tip

Because of the way New Relic harvests data (12 times per minute), if the event data count is less than 12, it will show up as 0 in New Relic.

Event harvest configuration settings include:

Event loop visibility settings

Event loop visibility surfaces information about transactions that block the event loop. The agent will generate information about transactions that have waited a significant amount of time to acquire control of the event loop. Settings include:

Runtime metrics for physical memory

These runtime metrics settings are available via the agent configuration file:

Garbage collection runtime metrics settings

These garbage collection runtime metrics settings are available via the agent configuration file:

Code-level metrics settings

The following settings are available for configuration of code-level metrics in the agent.

Errors inbox configuration

Setting one of the following tags will help you identify which versions of your software are producing the errors.

  • NEW_RELIC_METADATA_SERVICE_VERSION will create tags.service.version on event data containing the version of your code that is deployed, in many cases a semantic version such as 1.2.3, but not always.
  • NEW_RELIC_METADATA_RELEASE_TAG will create tags.releaseTag on event data containing the release tag (such as v0.1.209 or release-209).
  • NEW_RELIC_METADATA_COMMIT will create tags.commit on event data containing the commit sha. The entire sha can be used or just the first seven characters (e.g., 734713b).

An upcoming release of errors inbox will automatically track which versions of your software are producing errors. Any version data will also be displayed in CodeStream.

Application logging settings

The following settings are available for configuration of application logging in the agent.

For some tips on configuring logs for the Python agent, see Configure Python logs in context.

Instrumentation settings

These instrumentation package specific settings are available via the agent configuration file:

Machine Learning settings

The following settings are available for configuration of machine learning data in the agent.

Other configuration settings

Here are assorted other settings available via the agent configuration file.

Heroku

Built-in instrumentation

The Python agent instruments a range of Python packages/modules. This instrumentation only occurs when the target Python package/module is imported by an application.

To disable default instrumentation, provide a special import-hook section corresponding to the name of the module that triggered instrumentation. Then set the enabled setting to false to disable instrumentation of that module.

Copyright ? 2025 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

人中龙凤下一句是什么 长时间憋尿会有什么影响 外阴瘙痒是什么病 指甲挂什么科 ray是什么意思
手心发痒是什么原因 45年属什么 肛门下坠感是什么原因 肋骨神经痛吃什么药 左眼跳什么意思
54岁属什么的 吃猪肺有什么好处和坏处 彩超是什么 不懂事是什么意思 做梦相亲是什么意思
蒲公英泡水喝有什么用 gg是什么牌子的包包 梦见青蛙是什么预兆 结婚六十年是什么婚 崩塌的读音是什么
蟑螂中药名称叫什么inbungee.com 二甲医院是什么意思adwl56.com 熠五行属什么hcv8jop0ns6r.cn 29是什么生肖hcv9jop3ns8r.cn 膝关节退行性改变是什么意思hcv7jop4ns6r.cn
肝炎吃什么药最好hcv9jop2ns8r.cn 什么是人格分裂hcv9jop5ns6r.cn 心火旺吃什么药hcv9jop8ns2r.cn 1月30日什么星座hcv8jop7ns0r.cn 上海属于什么方向hcv8jop3ns0r.cn
女人自尊心强说明什么hcv9jop4ns5r.cn 牙龈肿痛上火吃什么药最好hcv9jop4ns4r.cn 大熊猫属于什么科zhongyiyatai.com 乳糖不耐受不能吃什么naasee.com 情商是什么意思hcv9jop4ns3r.cn
a216是什么材质hcv8jop2ns1r.cn 车顶放饮料是什么意思hcv9jop8ns1r.cn 窦性心律不齐是什么hcv9jop0ns3r.cn 脚底板热是什么原因zsyouku.com 985大学什么意思520myf.com
百度