This documentation and the Cisco Observability Platform functionalities it describes are subject to change. Data saved on the platform may disappear and APIs may change without notice.


fmm:attributePromotion

Description

Note: This configuration is deprecated and will be replaced by a CNCF Serverless Workflow configuration.

Configures how the platform promotes attributes.

Syntax

{
  "namespace": "<object>",
  "kind": "<string>",
  "name": "<string>",
  "displayName": "<string>",
  "description": "<string>",
  "appliesTo": "<string>",
  "scopeFilter": "<string>",
  "mappings": "<boolean>",
  "attributeNameMappings": "<array>",
  "groupings": "<array>"
}

Attributes

Attribute Description
namespace Required. The name of the domain ( fmm:namespace object) that this configuration belongs to.
kind Required. The data type of this configuration. Set this to attributePromotion.
name Required. The name of this configuration within the context of the namespace. Must be unique within a solution. Can contain only alphanumeric characters, underscores, or hyphens.
displayName Required. The name of this configuration as it will appear in the user interface.
description Description of the configuration.
appliesTo Required. MELT type for which attribute promotion needs to done.
Valid values: metric, log, span, all.
all means applies to ALL types.
scopeFilter Required. A filter expression matching the entities or packets eligible for the specified transformations.
Predefined variables:
source (Source of the data)
resourceAttributes (refers to OpenTelemetry resource attributes)
entity.type (Entity type)
entity.namespace (Entity namespace)

Predefined functions:
boolean containsAll(resourceAttributes, String[] names)
boolean matchAny(resourceAttributes, String[] names)
KeyValue getAttributes(resourceAttributes, String name)
getValue(resourceAttributes, attributeName)
.
mappings Mappings from metric or span attributes to entity attributes.
Valid target map path is "resourceAttributes".
attributeNameMappings Mappings from metric or span attributes to entity attributes. The promotion applies even if only a subset of attributes is present.
Syntax: "<namespace><entity-name>" : "<metric-or-span-attribute-name>"
groupings Configurations to group MELT data after attribute promotion.
Syntax: "<namespace><entity-name>","<namespace><entity-name>","<namespace><entity-name>"

Example

{
  "namespace": {
    "name": "k8s",
    "version": 1
  },
  "kind": "attributePromotion",
  "name": "k8s_pod_metric_attribute_promotion",
  "appliesTo": "metric",
  "displayName": "Kubernetes Pod Metric Attribute Promotion",
  "description": "Kubernetes Pod Metric Attribute Promotion",
  "scopeFilter": "containsAll(resourceAttributes, ['k8s.ingress.class', 'k8s.namespace.name', 'k8s.cluster.name', 'k8s.pod.name'])",
  "attributeNameMappings": {
    "k8s.service.name": "k8s.service.name"
  },
  "mappings": [
    {
      "to": "resourceAttributes",
      "from": "{'key': \"dem.url.template\", 'value': \"getValue(attributes, \"url\").substring(0, getValue(attributes, \"url\").lastIndexOf(\"/\")).concat(\"/*\")\"}"
    }
  ],
  "groupings": [
    {
      "scopeFilter": "true",
      "groupByAttributes": [
        "k8s.cluster.name",
        "k8s.namespace.name"
      ],
      "conflictResolution": "OVERRIDE"
    }
  ]
}