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
Identify the component you want to change the source name for.
Go to the specific repo and look for
podAnnotations
invalues.yaml
of the component.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 therulemanager
PR below).
Example PRs
Change of
rulemanager
source name whererulemanager
was a subcomponent ofquery-service
and the source was showing up asquery-service
instead ofrulemanager
:https://github.com/kloudfuse/query-service/pull/912Change of source name for
logs-transformer
,trace-transformer
andmetrics-transformer
: https://github.com/kloudfuse/logs-transformer/pull/274