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

[exporter/signalfx] Support removal of direction attribute #12642

Conversation

crobert-1
Copy link
Member

@crobert-1 crobert-1 commented Jul 21, 2022

Description:
Host metrics have split the direction attribute into multiple
metrics. The signalfx exporter has translation functionality
that assumed metrics were of the previous format, so this
change supports the new format, and drops support of the old.

This change also adds an "add_dimensions" translate ability, tests
this new functionality, and modifies tests to ensure output
metric format matches original.

Link to tracking Issue:
#12641

Testing:
Updated existing testing to match new metric format, added testing for add_dimensions translation.

Documentation:
Updated README for new translation functionality

Host metrics have split the direction attribute into multiple
metrics. The signalfx exporter has translation functionality
that assumed metrics were of the previous format, so this
change supports the new format, and drops support of the old.

This change also adds an "add_dimensions" translate ability, tests
this new functionality, and modifies tests to ensure output
metric format matches original.
@crobert-1 crobert-1 requested a review from a team July 21, 2022 23:35
@crobert-1 crobert-1 requested a review from dmitryax as a code owner July 21, 2022 23:35
@crobert-1 crobert-1 marked this pull request as draft July 21, 2022 23:38
exporter/signalfxexporter/factory_test.go Show resolved Hide resolved
Comment on lines +302 to +303
direction:
read: true
Copy link
Member

Choose a reason for hiding this comment

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

Why not just ?

Suggested change
direction:
read: true
direction: read

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't sure if they were equivalent. I'll test it and if it works I'll update accordingly.

Comment on lines +234 to +236
// Test uses 4 metrics, each with more than 1 data point. Aggregate by sum reduces each metric to 1 data point.
// 4 metrics, each with one data point, create 3 delta data points, either how much the current data point is
// larger than previous, or current data point's value (if smaller than previous).
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is an acceptable solution. We need to make sure that users see the same values in the charts built with disk_ops.total metric. I don't think it's going to be true if we break down disk_ops.total into several delta metrics. Please correct me if I'm wrong.

If it indeed introduces different results, I see the following options to restore the same disk_ops.total metric:

  1. Introduce a metricstransform processor in the default Splunk Otel distribution config to get a metric combined from system.disk.operations.read and system.disk.operations.write.
  2. Refactor the signalfx exporter translation logic to work on a metrics batch instead of just one metric.

1 approach seems simpler and more reliable to me.

Copy link
Member Author

@crobert-1 crobert-1 Jul 25, 2022

Choose a reason for hiding this comment

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

Thanks for the pointers! I've brought this up as a potential concern in #12641 and had thought about possibly doing solution 2, but I was worried that it might have unintended side effects working on other metrics.

I'll look into option 1.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2022

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 9, 2022
@crobert-1
Copy link
Member Author

This PR is stale at this point, I'll open a new one or re-open depending on solution approach taken.

@crobert-1 crobert-1 closed this Aug 10, 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