Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resourceprocessor] share atrribute data between resource attribte and span/log/metrics attributes #24022

Closed
Frapschen opened this issue Jul 7, 2023 · 4 comments
Labels
enhancement New feature or request needs triage New item requiring triage processor/resource Resource processor

Comments

@Frapschen
Copy link
Contributor

Component(s)

processor/attributes, processor/resource

Is your feature request related to a problem? Please describe.

The two processors have the power ability to modify their attributes of themselves but, can't apply the ability between them,
e.g. I want to move a key value from the span attribute to its resource attribute,

Describe the solution you'd like

giving an option to tell resourceprocessor it will fetch data from span/log/metrics attribute instead of itself attribute when using from_attribute for the actions insert, update, and upsert

resourceprocessor config:

processors:
  resource:
    attributes:
    - key: k8s.cluster.name
      from_attribute: k8s-cluster
      use_attribute: true
      action: insert

The same as attributeprocessor, the config will look like:

processors:
  attributes/example:
    actions:
    - key: k8s.cluster.name
      from_attribute: k8s-cluster
      use_resource_attribute: true
      action: insert

Describe alternatives you've considered

No response

Additional context

In our scenes, we want to standardize the resource attributes map like: k8s.namespace.name, k8s.pod.name, service.name however istio trace only supports generating those in span attribute, we need to move them to resource attribute.

@Frapschen Frapschen added enhancement New feature or request needs triage New item requiring triage labels Jul 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • needs: Github issue template generation code needs this to generate the corresponding labels.

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Pinging code owners for processor/resource: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mar4uk
Copy link
Contributor

mar4uk commented Sep 29, 2023

Hey! To move the attribute to the resource attribute you can use groupbyattrsprocessor

processors:
  groupbyattrs:
    keys:
      - k8s.namespace.name
      - k8s.pod.name
      - service.name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage processor/resource Resource processor
Projects
None yet
Development

No branches or pull requests

3 participants