Attributes
Add Cluster Info
This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals.
Considerations
Before enabling add cluster info, please note the following:
- This action is meant to be used for static attributes that are known in advanced. It is not suitable for dynamic attributes that need to be extracted from an API or calculated at runtime.
- Some destinations may require specific configuration to index resource attributes and make them available for querying. Please refer to the documentation of the destination you are using for more information.
- If the attribute already exists in the telemetry signal, the value will be overwritten by the value provided in the action.
- An empty string is a valid value for the
attributeStringValue
field
Configuration Options
You can include any static value attribute that is meaningful to you, like team.name
etc.
We recommend:
k8s.cluster.name
: The name of the k8s cluster which can be useful to distinguish between different clusters.deployment.environment
: The environment of the cluster (e.g.production
,staging
,development
, etc).
Basic Example
The following example demonstrates how to insert the k8s.cluster.name
attribute to all telemetry signals.
1
Create a YAML file with the following content:
insert-cluster-name.yaml
2
Apply the action to the cluster: