IBM Cloud Docs
Configure custom metadata values by using Helm

Configure custom metadata values by using Helm

When you deploy or upgrade the Logging agent, you can configure the logs-values.yaml file to include custom values for applicationName and subsystemName, and also add custom tags to your log records.

After you modify the logs-values.yaml, you can Upgrade the agent or continue modifying the file before applying all the changes.

Configure custom values for applicationName and subsystemName

You can configure the defaultMetadata section to override the default subsystemName and applicationName that are used in the environment.

The default value is set by the output plug-in dynamically as follows

  • applicationName: the Kubernetes namespace that generated the log
  • subsystemName: the container name that generated the log

The entry in the logs-values.yaml file looks as follows:

defaultMetadata:
  subsystemName: ""
  applicationName: ""

Configure custom tags

You can configure the additionalMetadata section to add additional tags.

A tag is a key/value pair that will be added under the meta object in each log record.

The entry in the logs-values.yaml file looks as follows:

additionalMetadata:
  region: ca-tor
  env: production

The previous example will result in the following additional fields added to each log line in IBM Cloud Logs:

{
  "meta": {
    "region": "ca-tor",
    "env": "production"
  }
}