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/metricstransform] Include Splitby operation #16276

Closed
MovieStoreGuy opened this issue Nov 13, 2022 · 9 comments
Closed

[processor/metricstransform] Include Splitby operation #16276

MovieStoreGuy opened this issue Nov 13, 2022 · 9 comments
Labels
closed as inactive enhancement New feature or request processor/metricstransform Metrics Transform processor Stale

Comments

@MovieStoreGuy
Copy link
Contributor

Component(s)

processor/metricstransform

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

In the components current form, it is not possible without some complicated aggregation logic to convert an attribute to a new metric.

Describe the solution you'd like

What I'd like to do is the following:

processors:
   metricstransform:
      transform:
      - include: system.cpu.utilization
        action: update
        operations:
        - action: split_metric
          new_name: cpu.idle # potential worth reusing `new_value`
          label: state
          label_value: idle

Describe alternatives you've considered

At this point in time, to make split_metric logic work, I have either done some combination of label aggregation or using the signalfx exporter to perform this operation.

Additional context

While A solution exists and works, it is split across two components so keeping metric names consistent across different systems isn't possible.

@MovieStoreGuy MovieStoreGuy added enhancement New feature or request needs triage New item requiring triage labels Nov 13, 2022
@github-actions github-actions bot added the processor/metricstransform Metrics Transform processor label Nov 13, 2022
@github-actions
Copy link
Contributor

Pinging code owners:

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

@MovieStoreGuy MovieStoreGuy changed the title [processor/metricstransfomr [processor/metricstransform] Include Splitby operation Nov 15, 2022
@dmitryax
Copy link
Member

I think this should be implemented as new functionality in the transform processor instead of metricstransform processor. @TylerHelmuth do you have any ideas on how this can be done?

@TylerHelmuth
Copy link
Member

I'm struggle to imaging what it's like to build a metric out of an attribute, but I'm sure the transform processor could be made to do it now.

@MovieStoreGuy
Copy link
Contributor Author

I'm struggle to imaging what it's like to build a metric out of an attribute, but I'm sure the transform processor could be made to do it now.

We are currently using the SignalFx Exporter to do this for us, but effectively the logic is:

if v, exist := dp.attributes.Get(operation.Label); exist && v.AsString() == operation.LabelValue {
   m := NewMetric()
   dp.CopyTo(m) 
   dps.Remove(dp)
   m.SetName(operation.NewName)
   m.Attributes.Remove(operation.Label)
   m.CopyTo(dps.AppendEmpty())
}

@TylerHelmuth
Copy link
Member

Yes I think a function could be added to do that. It would probably be best to do it at the Metric context, but it's possible to do at the DataPoint Context. The caveat with doing it at the datapoint level is that you shouldn't remove items from the datapoint list.

@MovieStoreGuy
Copy link
Contributor Author

That is fair, it would help unblock our dependancy on signalfx exporter performing this operation.

@github-actions
Copy link
Contributor

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:

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

@github-actions github-actions bot added the Stale label Jan 19, 2023
@atoulme atoulme removed the needs triage New item requiring triage label Mar 8, 2023
@github-actions github-actions bot removed the Stale label May 26, 2023
@github-actions
Copy link
Contributor

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:

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

@github-actions github-actions bot added the Stale label Jul 26, 2023
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed as inactive enhancement New feature or request processor/metricstransform Metrics Transform processor Stale
Projects
None yet
Development

No branches or pull requests

4 participants