Overriding Default Properties with InstrumentationRules
The Cluster Agent uses a combination of namespaceRegex
, matchString,
and labelMatch
properties in an InstrumentationRule
to target Deployments
, DeploymentConfigs
and StatefulSets
in a namespace for auto-instrumentation. The first matching InstrumentationRule
is used. If no matching rule is found, then the default properties are used to determine if auto-instrumentation should be applied:
-
nsToInstrumentRegex
-
defaultInstrumentationLabelMatch
-
defaultInstrumentMatchString
InstrumentationRule -matchString "<string>"
is added to the Cluster Agent configuration file:instrumentationRules:
- matchString: "<string>"
If the deployment name matches this string, then the remaining properties under the matching instrumentationRule
are applied and will override any default properties that are set. If the string does not match, then the Cluster Agent defaults to the properties nsToInstrumentRegex, defaultInstrumentationLabelMatch
, and defaultInstrumentMatchString
to determine the instrumentation rules.