Change Source Name for Component/Sub-Component Without Logs-Parser

Change Source Name for Component/Sub-Component Without Logs-Parser

Context

Sometimes we need to change the names of a source without changing the customer specific configs through Logs-Parser. Using this way we can change the source name for a specific component/subcomponent.

When should you be Doing this?

  • You want to change the source name for a specific component/sub-component for all environments for the next release. You do not want to change it for a specific customer with custom specifications (look at Logs parsing config for that)

Steps

  1. Identify the component you want to change the source name for.

  2. Go to the specific repo and look for podAnnotations in values.yaml of the component.

  3. Add this specific line in the annotation : ad.datadoghq.com/<componentName>.logs: ‘[{"source": "desiredSourceName"}, {"service": "desiredSourceName"}]'.
    Note : If the target subcomponent shares the podAnnotations with it’s parent, create a new set of podAnnotations and make appropriate changes in the templates to pick it up while deploying it (look at the rulemanager PR below).

Example PRs

  1. Change of rulemanager source name where rulemanager was a subcomponent of query-service and the source was showing up as query-service instead of rulemanager:https://github.com/kloudfuse/query-service/pull/912

  2. Change of source name for logs-transformer, trace-transformer and metrics-transformer : https://github.com/kloudfuse/logs-transformer/pull/274