public interface LogRedactorMetrics
Each metric has a name and zero or more tags. Tags are key-value pairs of Strings. Metric names and tag keys contain only letters, numbers, and underscores. Tag values may potentially contain any String. Implementors of the interface must escape and truncate tag values to fit their own validation requirements.
| Modifier and Type | Field and Description |
|---|---|
static String |
COUNT_ERROR |
static String |
COUNT_MATCHED_LOG_STATEMENTS |
static String |
COUNT_MATCHES |
static String |
COUNT_POLICY_UPDATE |
static String |
COUNT_REDACTED_LOG_STATEMENTS |
static String |
COUNT_REDACTIONS |
static String |
COUNT_SCANNED_LOG_STATEMENTS |
static String |
GAUGE_POLICY_RULE_COUNT |
static LogRedactorMetrics |
NOOP
A no-op implementation, that ignores all metrics rather than collecting them.
|
static String |
TIMER_READ_POLICY_SECONDS |
| Modifier and Type | Method and Description |
|---|---|
void |
count(String metricName,
Map<String,String> tags)
Called when an event occurs.
|
void |
gauge(double value,
String metricName,
Map<String,String> tags)
Called after measuring a "current" value.
|
void |
timer(double value,
String metricName,
Map<String,String> tags)
Called after measuring the time elapsed for an event.
|
static final String COUNT_POLICY_UPDATE
static final String COUNT_ERROR
static final String COUNT_REDACTIONS
static final String COUNT_MATCHES
static final String COUNT_SCANNED_LOG_STATEMENTS
static final String COUNT_REDACTED_LOG_STATEMENTS
static final String COUNT_MATCHED_LOG_STATEMENTS
static final String TIMER_READ_POLICY_SECONDS
static final String GAUGE_POLICY_RULE_COUNT
static final LogRedactorMetrics NOOP
void count(String metricName, Map<String,String> tags)
metricName - The name of the metric. May contain alpha-numerics and underscore.tags - Key-value pairs.void timer(double value,
String metricName,
Map<String,String> tags)
value - Elapsed time, in seconds.metricName - The name of the metric. May contain alpha-numerics and underscore.tags - Key-value pairs.Copyright © 2025 Confluent, Inc.. All rights reserved.