You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the addition of #533, we will be using child loggers which allow adding metadata to each log line which is very useful for filtering by a particular uds-operator component in Loki (or other log parsers).
It would also be beneficial to try to standardize the objects that we are logging using pino so that we can go a step further and potentially filter by other metadata for example showing all operator reconcile logs related to a particular Package.
The change would end up taking log lines that looked like:
// note this is K8s Metadata but it could include anythingtypeUDSReconcileLogMetadata={name: string;namespace: string;};log.info<UDSReconcileLogMetadata>({ name, namespace },`Processing Package ${namespace}/${name}, status.phase: ${pkg.status?.phase}, observedGeneration: ${pkg.status?.observedGeneration}, retryAttempt: ${pkg.status?.retryAttempt}`,);
The value of this would be that instead of you could consistently search for logs relating to a particular Package without relying on the log message alone.
The text was updated successfully, but these errors were encountered:
also worth capturing in this issue could be the confusing nature of the pepr policies and the naming conventions there. The /policies/index.ts logs are under the policies component but technically refer to the operator.exemptions, maybe a restructuring of the files or renaming the components.
With the addition of #533, we will be using child loggers which allow adding metadata to each log line which is very useful for filtering by a particular uds-operator component in Loki (or other log parsers).
It would also be beneficial to try to standardize the objects that we are logging using
pino
so that we can go a step further and potentially filter by other metadata for example showing all operator reconcile logs related to a particularPackage
.The change would end up taking log lines that looked like:
and converting them to something like:
The value of this would be that instead of you could consistently search for logs relating to a particular Package without relying on the log message alone.
The text was updated successfully, but these errors were encountered: