Logging setup for deployment
GlobalDcc uses Serilog to output logs using a json format. The advantage of having log output in json format is that it makes it convenient for certain search engines specialized for logs to perform their actions. Examples of logs can be found here. Pods of gdcc-dev-api should represent their logs in json format.
Serilog
Serilog is a well maintained highly used C# library that offers logging solutions, and it offers a json formatter. This makes it a good choice for our use case.
Implementation
When it comes to implementation of these changes to deployment, some of the
steps can be found in
updating deployment documentation. In addition,
Serilog requires additional configuration to be provided by the
appsettings.json
file. Helm charts are in charge of appsettings.json
generation inside the deployment pods. The specific chart responsible in this
case is
charts/globaldcc/templates/api/configmap.yaml
.
In addition to the above referenced steps,
gdcc_helm_ci
pipeline should also be executed. In Transport-ArgoCD, inside the file
dev/apps/team-r/global-dcc.yaml
there is a source for helm/globaldcc
. The targetRevision
should be updated
to fit the number from the
gdcc_helm_ci
pipeline.