feat(logger): GDC_LOGGING_APPENDER=CONSOLE routes splunk channel to stdout#2082
Merged
Conversation
…tdout When GDC_LOGGING_APPENDER=CONSOLE is set, the brick's splunk-shaped log channel writes to STDOUT instead of constructing a RemoteSyslogLogger to NODE_NAME:514. Default SYSLOG preserves the existing behavior. This mirrors the appender pattern adopted by Bear webapp services and lets Alloy scrape pod stdout natively (Loki-native ingestion) without going through the host rsyslog → /mnt/log/gdc-ruby hop. JIRA: GRIF-233
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.
Summary
GDC_LOGGING_APPENDER=CONSOLEis set, the brick's splunk-shaped log channel writes to STDOUT instead of constructing aRemoteSyslogLoggertoNODE_NAME:514.SYSLOGpreserves the existing behavior — no regression risk for clusters that don't opt in./mnt/log/gdc-rubyhop.JIRA: GRIF-233
Pairs with
gooddata/msf#6503 —
execmgr-k8schange that forwardsgdc.logging.appenderas theGDC_LOGGING_APPENDERenv var on every brick K8s Job. Both PRs need to land for the appender to flip end-to-end.Test plan
bundle exec rspec spec/unit/bricks/middleware/logger_middleware_spec.rb— green locally (13 examples, 0 failures, including 3 new ones: CONSOLE skips RemoteSyslogLogger, CONSOLE still registers splunk channel, explicit SYSLOG creates the syslog forwarder)gdc.logging.appender=CONSOLE, trigger one LCM brick and confirm output appears in Loki under{sourcetype="console-log", container=~".*brick.*"} |= "action="with the samebrick=…, action=…, execution_id=…key=value body that today appears undersourcetype="ruby".