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

[processor] Join attribtues processor #12660

Closed

Conversation

edenkoveshi
Copy link

Description

A new processor to join values of chosen attributes and populate them as a value of another attribute using a chosen separator. If the target attribute already exists it is not overriden by default, but it can be configured.

Supported pipeline types: traces

Full proccessor configuration is given in the following example

processors:
  join_attributes:
    # An array of attribute keys whose values are to be joined.
    attributes: ["attribute-1",...,"attribute-N"]
    # A key of an attribute that will be populated with the new value.
    target_attribute: "some-attribute"
    # A character/string to separate the values.
    separator: ","

  join_attributes/override:
    # An array of attribute keys whose values are to be joined.
    attributes: ["attribute-1",...,"attribute-N"]
    # A key of an attribute that will be populated with the new value.
    target_attribute: "some-attribute"
    # A character/string to separate the values.
    separator: ","
    # If the target attribute already has a value, override it. (default is false)
    override: true

Tested and documented

- Added documentation & examples
- Added test cases & tested manually
@edenkoveshi edenkoveshi requested review from a team and mx-psi July 23, 2022 09:52
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! Thanks for your contribution. New components need to follow the contributing guidelines for new components, which includes creating a new issue using this template. You need to do this before this component gets added to contrib.

Nonetheless I think this may fit better as a function on the transform processor. cc @TylerHelmuth @kentquirk to evaluate this

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Jul 25, 2022

@edenkoveshi would this issue cover your needs? #12476. That issue details a solution to concat any number of strings in the transform processor, which could then be used to set an attribute.

@edenkoveshi
Copy link
Author

@edenkoveshi would this issue cover your needs? #12476. That issue details a solution to concat any number of strings in the transform processor, which could then be used to set an attribute.

It does, but I think as a principle, there should be simple processors for doing simple operations (like most of them really) rather than a complex processor and a new query language.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 13, 2022
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants