Syntax
NewRelic.Api.Agent.NewRelic.IncrementCounter(string $metric_name)
Increment the counter for a custom metric by 1.
Requirements
Compatible with all agent versions.
Compatible with all app types.
Description
Increment the counter for a custom metric by 1. To view these custom metrics, use the query builder to search metrics and create customizable charts. See also RecordMetric()
and RecordResponseTimeMetric()
.
重要
When creating a custom metric, start the name with Custom/
(for example, Custom/MyMetric
).
Parameters
Parameter | Description |
---|---|
string | Required. The name of the metric to increment. |
Examples
NewRelic.Api.Agent.NewRelic.IncrementCounter("ExampleMetric");
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。