Skip to content

feat: export position error counters to a production-observable metrics system #142

Description

@coderabbitai

Summary

POSITION_PARSE_ERROR_COUNT and POSITION_CONVERSION_ERROR_COUNT in crates/weaverd/src/dispatch/act/refactor/metrics.rs are private AtomicU64 process-local statics. They are visible only in debug-level tracing logs and are not plumbed into any exportable metrics system (Prometheus, OpenTelemetry, the metrics crate, etc.), which means they cannot be used for production alerting or monitoring.

Work Required

Once an observability exporter is chosen for weaverd (see issue #125 for the structured-logging/tracing context), wire these two counters into the chosen interface:

Counter name Incremented when
position_parse_error_count parse_line_col returns Err
position_conversion_error_count line_col_to_byte_offset returns Err

Names, labels, and export path must follow whatever conventions are established for all weaverd metrics.

Background

Raised as an out-of-scope observability follow-up from PR #126.
Requested by @leynos.

Related: #125

Backlink: #126

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions