Repository navigation
Conversation
Klio exports its traces and metrics through OpenTelemetry, but its logs only reach the standard output, so collecting them still needs a node agent or a sidecar. Every Klio process now builds a log provider with the resource and the exporter selection of its other signals, and hands it to the logging of machinery before configuring it, so the records written on the standard output are exported too. OTEL_LOGS_EXPORTER enables the export and is unset by default, so a configuration written for the traces and the metrics does not start sending the logs. Each command exports its own records and flushes them before exiting, including the short-lived commands that the plugin sidecar spawns, while `retention get` now runs without the OTEL_* variables like `get-metadata`, as its output is captured. The operator moves from the controller-runtime logger to the one of machinery, which the server and the sidecar already use: it now logs in JSON at the info level by default, and keeps accepting the --zap-* arguments along with --log-level. This needs cloudnative-pg/machinery#343, pinned to its head until it is released. Closes #549 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Make the operator's ShutdownLogs own its timeout and error logging, as in core, and defer it in run right after the logging is configured, so main reduces to os.Exit(run()). Assisted-by: Claude Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
The command logs nothing on success and its output is discarded on failure, so the console exporters cannot reach the logged policy. Assisted-by: Claude Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Logs now follow the specification and the other signals: they are exported via OTLP as soon as OpenTelemetry is configured, unless OTEL_LOGS_EXPORTER is "none". OTEL_SDK_DISABLED=true now disables every signal; previously, being an OTEL_* variable, it enabled the traces and the metrics. Assisted-by: Claude Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Pick up the OTEL_SDK_DISABLED and OTEL_LOGS_EXPORTER handling of the OpenTelemetry log export. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This branch has not been deployed
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.
Klio exports its traces and metrics through OpenTelemetry, but its logs
only reach the standard output, so collecting them still needs a node
agent or a sidecar.
Every Klio process now builds a log provider with the resource and the
exporter selection of its other signals, and hands it to the logging of
machinery before configuring it, so the records written on the standard
output are exported too. OTEL_LOGS_EXPORTER enables the export and is
unset by default, so a configuration written for the traces and the
metrics does not start sending the logs. Each command exports its own
records and flushes them before exiting, including the short-lived
commands that the plugin sidecar spawns, while
retention getnow runswithout the OTEL_* variables like
get-metadata, as its output iscaptured.
The operator moves from the controller-runtime logger to the one of
machinery, which the server and the sidecar already use: it now logs in
JSON at the info level by default, and keeps accepting the --zap-*
arguments along with --log-level.
This needs cloudnative-pg/machinery#343, pinned to its head until it is
released.
Closes #549