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
apiVersion: actions.odigos.io/v1alpha1
kind: AddClusterInfo
metadata:
  name: insert-cluster-name
  namespace: odigos-system
spec:
  actionName: insert-cluster-name
  clusterAttributes:
    - attributeName: k8s.cluster.name
      attributeStringValue: my-cluster
  signals:
    - TRACES
    - METRICS
    - LOGS
2

Apply the action to the cluster:

kubectl apply -f insert-cluster-name.yaml