How does the log verification classifiy errors
Learn how Harness Continuous Verification decides whether a log message is a known error or a new one.
Harness CV log verification answers one question for every log line produced during a deployment: "Have I seen this before in the baseline, or is this a new event I should surface?"
The decision follows a deterministic, three-step process. This page explains exactly what the algorithm keeps, what it discards, how it measures similarity, and how you can tune it with the Sensitivity setting.
What you will learn from this topic
Tokenization: How every log message is broken into meaningful words and what parts are kept versus discarded.
Baseline learning: How Harness builds a similarity model from your own baseline logs, not a generic dictionary.
Similarity scoring: How two messages are compared and what makes them the same known error or a new unknown event.
Sensitivity setting: How to tune the similarity threshold and frequency thresholds for your environment.
Log feedback: How marking a cluster as Expected is remembered and applied on future runs.
Log line classification
The log classification process analyzes each log line, learns patterns from your baseline logs, and assigns a similarity score to determine whether an event matches a known error or represents a new event.
Extract the meaningful parts
Every log line is broken into words. Some parts are automatically discarded because they add noise without adding meaning.
Timestamps
2024-01-15 10:23:45, T10:23:45Z
Discarded
Line numbers, thread numbers, process IDs, ports, HTTP status codes
line 42, pid=1234, :8080, 404
Discarded
Punctuation and short symbols
:, ;, []
Discarded
Class names, method names, package names
com.example.UserService, processRequest
Compared
Message text
not found, connection refused, timeout
Compared
Identifiers such as UUIDs, request IDs, and hashes
550e8400-e29b-41d4-a716-446655440000
Numeric digit runs normalized; letter portions compared
Identifiers such as UUIDs are not discarded, but they are not compared verbatim either. The algorithm replaces digit runs inside each token with positional markers (for example, 550e8400 becomes 0xxe1xx), while letter portions are kept. The effect is that two log lines differing only by a UUID still produce very similar tokens and cluster together.
Learn from your baseline logs
Harness does not use a generic dictionary to judge similarity. For every verification run, Harness learns from your baseline logs which words tend to appear near each other. The comparison is tailored to your service's own vocabulary and naming conventions, not a one-size-fits-all model.
Nothing is carried over across different services or accounts. Every verification learns its own patterns from its own baseline.
Score similarity
Each log message is reduced to a similarity fingerprint. Two messages are compared and given a similarity score. If that score reaches the required threshold, the new message is considered the same error as one already seen in the baseline. If it does not, it is treated as a new, unknown event.
The required threshold depends on the Sensitivity setting. Go to Sensitivity and log classification to review how each level affects the threshold.
Common questions
Sensitivity and log classification
The Sensitivity setting on the Verify step is the primary control over how strict or lenient log classification is. It affects two things: how similar two messages must be to be considered the same known error, and how much a log's frequency must change before it is flagged as unexpected.
High
~98% similar
Smaller shifts flagged (for example, ~15–20% increase)
Strictest; catches subtle changes but produces more findings to review
Medium (default)
~96% similar
Moderate shifts flagged (for example, ~25% increase)
Balanced; recommended for most production services
Low
~93% similar
Only large shifts flagged (for example, ~40–50% increase)
Most lenient; only surfaces major anomalies, best for noisy or unstable environments
Use High sensitivity if your engineers are concerned about missing real new errors. Use Low sensitivity if your environment is noisy and you are getting too many findings that turn out to be benign variations such as embedded IDs or minor wording differences.
Sensitivity is set per Verify step, so different services or environments can use different sensitivity levels. Changing sensitivity only affects future verifications. It does not retroactively reclassify past results.
Log feedback and classification
When you mark a cluster as Expected through log feedback, that decision is remembered and applied automatically on future runs. You do not need to re-classify the same recurring error every time.
Go to Event preference or log feedback to set event preferences for log clusters.
Next steps
You now understand how Harness CV log verification tokenizes log messages, learns word relationships from your baseline, and scores similarity to classify errors as known or new. You can tune Sensitivity and use log feedback to improve classification accuracy over time.
Interpret log verification results: Read the radar chart and event list after a verification run.
Event preference or log feedback: Mark clusters as expected or risky to improve future verification accuracy.
Machine learning usage in CV: Learn how the underlying ML model works for both metrics and logs.
Last updated
Was this helpful?