Resource processor ๐
The resource processor is an OpenTelemetry Collector component that can add, update, or delete resource attributes. The supported pipeline types are traces
, metrics
, and logs
. See Process your data with pipelines for more information.
The resource processor is useful when you want to add attributes that your instrumentation doesnโt provide, or when you need to override the value of attributes collected by receivers using other attributes. To edit existing attributes, for example to obfuscate sensitive information, use the attributes processor. See Attributes processor.
Target attributes are defined through the key
field. The value
field contains the desired value for the attribute. Each attribute in the list requires an action. The available actions are the following:
Action |
Description |
---|---|
|
Adds the key-value combination to attributes when the key doesnโt exist. Requires one of the following fields: |
|
Updates an existing key with a value. Requires one of the following fields: |
|
Adds or updates a key-value combination depending on the attributes containing the key. Requires one of the following fields: |
|
Deletes the attribute. |
|
Hashes an existing value using the SHA-1 algorithm. |
|
Extracts values from an attribute using a regular expression to add or update the value of keys specified in the rule. Requires the |
|
Converts the type of an existing attribute if the attribute can be converted. Requires the |
Note
For information about the Resource Detection processor, see Resource detection processor.
Get started ๐
Follow these steps to configure and activate the component:
Deploy the Splunk Distribution of OpenTelemetry Collector to your host or container platform:
Configure the resource processor as described in the next section.
Restart the Collector.
Sample configurations ๐
To activate the resource processor, add resource
to the processors
section of your
configuration file, as shown in the following example:
resource:
attributes:
# Adds the attribute overriding existing values
- key: cloud.availability_zone
value: zone-1
action: upsert
# Copies the value of an attribute into another
- key: k8s.cluster.name
from_attribute: k8s-cluster
action: insert
# Removes an attribute
- key: redundant-attribute
action: delete
To complete the configuration, include the receiver in any pipeline of the service
section of your
configuration file. For example:
service:
pipelines:
metrics:
processors: [resource]
logs:
processors: [resource]
traces:
processors: [resource]
Settings ๐
The following table shows the configuration options for the resource processor:
Troubleshooting ๐
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
Submit a case in the Splunk Support Portal .
Contact Splunk Support .
Available to prospective customers and free trial users
Ask a question and get answers through community support at Splunk Answers .
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.