219.7. メトリクスタイプのヒストグラム
metrics:histogram:metricname[?options]
219.7.1. オプション
名前 | デフォルト | 説明 |
---|---|---|
value | - | ヒストグラムで使用する値 |
value
が設定されていない場合、ヒストグラムには何も追加されず、警告がログに記録されます。
// adds value 9923 to simple.histogram from("direct:in") .to("metric:histogram:simple.histogram?value=9923") .to("direct:out");
// nothing is added to simple.histogram; warning is logged from("direct:in") .to("metric:histogram:simple.histogram") .to("direct:out");
219.7.2. ヘッダー
メッセージヘッダーを使用して、メトリクスコンポーネント URI で指定された値をオーバーライドできます。
名前 | 説明 | 想定されるタイプ |
---|---|---|
CamelMetricsHistogramValue | URI のヒストグラム値をオーバーライドする | Long |
// adds value 992 to simple.histogram from("direct:in") .setHeader(MetricsConstants.HEADER_HISTOGRAM_VALUE, constant(992L)) .to("metric:histogram:simple.histogram?value=700") .to("direct:out")