Repository navigation
QFw: keep QFw's log lines in Loki, beside the traces - #48
Merged
Merged
Conversation
The cluster side of QFw's logs tier (QFw #123, #124). A Loki container with its own volume and two weeks of retention joins the stack, the collector forwards OTLP logs to it through a pipeline that trims the resource the way the metrics one does, and Grafana gets a Loki data source. The Tempo source links a span to its trace's lines, the Loki source links a line's trace id back to its trace, the QFw Trace dashboard shows a job's lines under its waterfall, and QFw Jobs lists recent warnings and errors. The overlay sets QFW_TELEMETRY_LOGS=debug, the tier at which QFw writes a job's story, and qfw-site-services forwards it to the service hosts. Loki keeps service_name, qfw_component_role and qfw_device_name as stream labels; trace_id, span_id and severity_text ride as structured metadata, which is what the queries select on. The README describes it. Signed-off-by: Doug Oucharek <dougso@me.com>
Collaborator
Author
|
The limit noted in the description is now addressed on the QFw side by openQSE/QFw#125: the instrumentation layer writes five story lines per job inside the job's spans, and the tier re-attaches its handler after DEFw's log-level setup strips the root logger, which had left the tier silently dead in every service process. With #124 and #125 in the image, a fake-IQM trace shows three QPM lines and QFw's run-path lines under its waterfall; verified on this stack with 318 stitched lines over 20 jobs. |
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.
The cluster side of QFw's logs tier (openQSE/QFw#123 and #124).
grafana/loki:3.7.8) joins the stack with its own volume, two weeks of retention like Tempo, and OTLP ingestion.telemetry/loki.yamlkeepsservice.name,qfw.component.roleandqfw.device.nameas stream labels; everything else on the resource, andtrace_id,span_id,severity_textand the code location, ride as structured metadata on each line.otlphttpto Loki's/otlpendpoint. The 0.162 contrib build has no Loki exporter any more; Loki's native OTLP is the hop.{service_name=~"qfw-.+"} | trace_id="<the span's trace>", deliberately not filtered by the span's service so the client's lines show under a QPM span too; the Loki source's derived field opens a line's trace in Tempo. QFw Trace gains a logs panel under the waterfall; QFw Jobs a "Recent warnings and errors" panel. Provisioning files expand$VAR, so the run-time variables are written$$.QFW_TELEMETRY_LOGS=debug, the tier at which QFw writes a job's story, andqfw-site-servicesforwards it.do_telemetry.shknows the fifth container and its volume forpurge. The README has a Logs section, the variable, a check and a troubleshooting entry.Verified on the live stack: compose validates; the five containers come up; a local plane and the site fake-IQM QPM, run from a QFw with #124, put their lines in Loki with the right labels and no DEFw chatter at
debug; Grafana's Loki source answers; the fallback snapshots still build with the new panels.One honest limit, for the fake IQM: nothing it logs sits inside a job's spans today (its two per-job lines belong to the device query the client makes before the job starts), so its traces show no lines yet. Real drivers log inside their execute spans and will. A few milestone lines from QFw's instrumentation layer would give every backend a story under the waterfall; that is a QFw decision, raised separately.
The live stack carries these files uncommitted until the catch-up; the site services report once the image carries #123 and #124.