fix(telemetry): warn on unsupported LogPipeline processor types instead of silently skipping#2571
Open
suvvvv wants to merge 1 commit into
Open
Conversation
…ad of silently skipping LogPipelineProcessorType defines GrokParser, and processors of that type can be created via the UI/API, but applyProcessor has no case for it — it falls through to `default: return logRow`. The log passes through unchanged with no signal, so operators cannot tell why a GrokParser processor never transforms anything. Log a warning (naming the processor and its type) in the default branch so the unimplemented-processor situation is observable, while still returning the log unchanged. Also adds the first unit tests for LogPipelineService.processLog, which had no coverage: AttributeRemapper (remap + preserveSource), SeverityRemapper (match and no-match), CategoryProcessor, the unsupported-type warning, pipeline filter gating, and the no-mutation guarantee. Refs OneUptime#2515 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
LogPipelineProcessorTypedefinesGrokParser, and processors of that type can be created via the UI/API — butLogPipelineService.applyProcessor()has nocasefor it, so it falls through to:The log passes through unchanged with no signal, so an operator who creates a GrokParser processor has no way to tell why it never transforms anything.
This change logs a clear warning (naming the processor and its type) in the
defaultbranch, while still returning the log unchanged:This matches the issue's suggested option (surface a warning) without taking on a full grok implementation.
Why
Addresses the "silently does nothing" half of #2515 — unimplemented processor types are now observable in the logs instead of failing quietly on the ingest path.
Tests
LogPipelineService.processLogpreviously had no unit coverage. This adds it:preserveSource.severityText/severityNumber; leaves the log unchanged on no match.processLogdoesn't mutate the input log row.Prettier-clean; source lints clean.
Refs #2515