Add the countconnector to your Collector config; connectors appear in both the exporters section of a source pipeline and the receivers section of a destination pipeline
In the logs pipeline set the count connector as an exporter: service.pipelines.logs.exporters: [count]; in the metrics pipeline set it as a receiver: service.pipelines.metrics.receivers: [count]
Configure the count connector with a logs block; each entry defines a metric name, description, unit, and optional conditions (OTTL expressions) that filter which log records contribute to that counter
Add an attributes list to the metric definition to group counts by log record attributes (e.g., http.status_code, service.name); the connector emits a separate data point per unique combination of attribute values
Set match_type in conditions to strict or regexp; use OTTL conditions like severity_number >= SEVERITY_NUMBER_ERROR to count only error-level logs, or body =~ "payment.*failed" for pattern-based business event counts
Wire the metrics pipeline to a Prometheus exporter or OTLP exporter to expose the generated metrics to your alerting system; alert on the generated counters using the same threshold logic you would apply to application-emitted metrics
Known gotchas
The count connector resets counters on Collector restart because state is in-memory only; if your alerting depends on cumulative counts, configure a downstream backend that accumulates counters across Collector instances or restarts
Each unique attribute combination creates a separate time series in the metrics backend; if you group by a high-cardinality attribute like request_id, you will produce millions of time series—restrict grouping to low-cardinality attributes
Conditions use OTTL syntax; an OTTL parse error in a condition causes the entire connector to fail to start—validate OTTL expressions with --dry-run or a local test Collector before deploying
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp