Skip to content

feat(logs pipelines): surface the collector logs in the preview - #12535

Draft
tushar-signoz wants to merge 2 commits into
mainfrom
tvats-pipelines-collector-logs
Draft

feat(logs pipelines): surface the collector logs in the preview#12535
tushar-signoz wants to merge 2 commits into
mainfrom
tvats-pipelines-collector-logs

Conversation

@tushar-signoz

@tushar-signoz tushar-signoz commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • The preview response has always carried collectorLogs — what the collector logged while simulating — but the UI dropped the field. They are now shown under the previewed output, so a pipeline that silently does nothing explains itself.
  • The collector emits a stack trace after each error, one array entry per frame, so a single failure arrived as 19 entries. Those frames are filtered out server-side, leaving one line per failure.

Additional Information

The case this exists for: with use_json_body on, the collector runs a normalize pipeline before user operators, so the body is a map by then. A parser pointed at body instead of body.message cannot work — it extracts nothing and, until now, said nothing. Driven against a local collector, preview with parse_from: body returns empty attributes plus:

type 'map[string]interface {}' cannot be parsed as grok

Stacked on #12520 — retarget to main once that merges.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@tushar-signoz
tushar-signoz force-pushed the tvats-fix-json-pipelines-preview branch from 96ac129 to f235791 Compare August 12, 2026 15:35
@tushar-signoz
tushar-signoz force-pushed the tvats-pipelines-collector-logs branch from ec5b281 to 44173e9 Compare August 12, 2026 15:36
The collector gets a normalize pipeline prepended ahead of user pipelines
when use_json_body is on, delivered over opamp, so a pipeline authored
against body.<field> behaved differently in preview than in production.
Preview evaluates the flag for the caller's org and prepends the same
pipeline.
@tushar-signoz
tushar-signoz force-pushed the tvats-fix-json-pipelines-preview branch from f235791 to 5b5ef4d Compare August 12, 2026 20:40
- return what the collector logged while simulating, so an operator that
  could not parse a log explains itself instead of silently changing nothing
- drop the stack trace lines the collector emits after each error, which
  arrive as one entry per frame
@tushar-signoz
tushar-signoz force-pushed the tvats-pipelines-collector-logs branch from 44173e9 to 0d50887 Compare August 12, 2026 20:41
Base automatically changed from tvats-fix-json-pipelines-preview to main August 13, 2026 23:16
pull Bot pushed a commit to Mu-L/signoz that referenced this pull request Aug 13, 2026
…igNoz#12520)

#### Description

- The collector gets a `normalize` pipeline prepended ahead of user
pipelines when `use_json_body` is on — injected in
`RecommendAgentConfig` and delivered over opamp — which parses the log
body into JSON. Preview simulated only the user's pipelines, so a
pipeline authored against `body.<field>` behaved differently in preview
than in production, and one written against `body` looked fine in
preview while doing nothing on real logs.
- Preview now evaluates the flag for the caller's org and prepends the
same pipeline, so what it shows is what the collector does.

#### Issues closed by this PR

Fixes SigNoz/engineering-pod#5897

#### Additional Information

Verified end to end against a local stack — devenv ClickHouse, a
collector with `body_json_enabled` connected over opamp, `use_json_body`
on — by driving the two calls the preview screen makes: sample logs,
then preview with those logs. `parse_from: body.message` extracts
attributes; `parse_from: body` extracts nothing, matching what the
collector does with a normalized body.

Log bodies render as stored rather than unwrapped, so what you see is
what the pipeline operates on.

Needs SigNoz#12534 to pick sample logs by body — without it the
v3 query behind the sample-log list errors for these orgs.
SigNoz#12535 stacks on this to surface the collector's own
explanation when an operator cannot parse a log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant