IBMStockTrader / stocktrader-helm

Umbrella helm chart that installs/configures the IBM Stock Trader sample
8 stars 43 forks source link

Route trace log entries to Kube logging server #38

Closed jwalcorn closed 2 years ago

jwalcorn commented 2 years ago

Today, console log entries and FFDC log entries are getting routed to the Kubernetes logging server (like LogDNA or CloudWatch), but not the trace log entries. I have it so you can specify the trace spec in my CR yaml, but right now, you can only see that if you kubectl exec into the pod and do a cat /logs/trace.log. Need to adjust the WLP_LOGGING_CONSOLE_SOURCE to include trace entries, in each microservice's yaml in my helm chart (that gets wrapped by my operator).

To be more explicit, this:

{{- if .Values.global.jsonLogging }}
          - name: WLP_LOGGING_CONSOLE_FORMAT
            value: json
          - name: WLP_LOGGING_CONSOLE_SOURCE
            value: message,ffdc
{{- end }}

Needs to become this:

{{- if .Values.global.jsonLogging }}
          - name: WLP_LOGGING_CONSOLE_FORMAT
            value: json
          - name: WLP_LOGGING_CONSOLE_SOURCE
            value: message,ffdc,trace
{{- end }}

I could consider adding http access logs too - need to decide if that would be useful. Note all of this special routing of logs other than the console log is only available in Liberty when JSON logging mode is enabled.

jwalcorn commented 2 years ago

Fixed