-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
New component: Sum Connector #32669
Comments
Hello @greatestusername, can you share a bit more details on the proposed configuration? I'm not sure I follow the proposed options and how it would impact the resulting output. |
Thanks @crobert-1 Let me know if you need further clarification? Thanks!
|
Thanks for sharing another example, that was helpful for me to better understand. A couple more questions:
|
I'll sponsor this component 👍 |
Thank you for offering to sponsor this! Also thank you for pointing this out! Yes a I think having Example config with
Does that make sense? |
Do you think there would be value in having some default behavior for a no configuration option? Something like:
It would result in a lot of internal logic and decision making that we'd have to work through, but maybe it would be useful for someone? |
In that sort of case where would it be getting the numerical value to sum? All attributes with numerical values? I'm not sure how that would work exactly. But interested in hearing more on the idea! |
It might be some kind of check if a value can be converted to a number, and keep it if successful. It's not a requirement for this component by any means though, and may be more complicated than it's worth. You're welcome to start submitting PRs, I think we've got a good outline here! |
Awesome! I'll get a wireframe PR up in the next couple days so I can get started on the meat. Thank you! And apologies for my tardy reply. |
Edit: I've got a PR up that should work I'm having some trouble getting tests for connectors to pass in the initial PR. I'm just trying to get a wireframe going but am hitting failures on tests like |
**Description:** Initial wireframe PR for a new sum connector (as described in #32669) Provides bare minimum to start developing a new connector (config, factory, integration test stubs for connector lifecycle, etc) Sum Connector takes in logs, metrics, or traces and matches an attribute then allows summing numerical values present in that attribute and sending those sums as a time series metric along with any attributes defined within the connector config. E.G. Log contains a field for `total_price` of a payment. Matching on `total_price` as the `source_attribute` will take numerical values from this attributte and emit a time series metric (`checkout.total`) of the sums along with any other attributes defined in the connector config. Example config: ``` receivers: foo: connectors: sum: logs: checkout.total: source_attribute: - attributes["total_price"] conditions: - attributes["total_price"] != "NULL" attributes: - key: payment.processor default_value: unspecified_processor - key: env default_value: no_env exporters: bar: service: pipelines: metrics/sum: receivers: [sum] exporters: [bar] logs: receivers: [foo] exporters: [sum] ``` **Link to tracking Issue:** 32669 **Testing:** Generated component and package tests **Documentation:** README and issue #32669 provide current documentation of projected future state.
**Description:** Fleshes out the config more fully and provides tests for the config and possible combinations of settings **Link to tracking Issue:** #32669 **Testing:** Added test cases and testing for config **Documentation:** No new documentation yet.
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 |
…ata) (#35434) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Adds tests for metrics to metrics and logs to metrics follows this pr: #34797 This is a lot of lines but it is mostly repetition and uses the same standard structure as the previously merged trace to metric tests. I dont think this needs any changelog but let me know if it does for some reason! 😸 **Link to tracking Issue:** #32669 **Testing:** <Describe what testing was performed and which tests were added.> Adds testing for metrics to metrics and logs to metrics using same methodology as previous PR **Documentation:** No changes to docs. This is just tests. --------- Co-authored-by: Curtis Robert <crobert@splunk.com>
…ata) (open-telemetry#35434) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Adds tests for metrics to metrics and logs to metrics follows this pr: open-telemetry#34797 This is a lot of lines but it is mostly repetition and uses the same standard structure as the previously merged trace to metric tests. I dont think this needs any changelog but let me know if it does for some reason! 😸 **Link to tracking Issue:** open-telemetry#32669 **Testing:** <Describe what testing was performed and which tests were added.> Adds testing for metrics to metrics and logs to metrics using same methodology as previous PR **Documentation:** No changes to docs. This is just tests. --------- Co-authored-by: Curtis Robert <crobert@splunk.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description - This PR changes stability to `alpha` - Updates README.md for more clarity and detailed config <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue [#32669] <!--Describe what testing was performed and which tests were added.--> #### Testing No additional testing needed <!--Describe the documentation added.--> #### Documentation Adds clarification of config, additional detail to detailed config, and notes about when and how to use which telemetry type. <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: jeremyh <jeremyh@splunk.com>
The purpose and use-cases of the new component
Sum Connector takes in logs, metrics, or traces and matches an attribute then allows summing numerical values present in that attribute and sending those sums as a time series metric along with any attributes defined within the connector config.
E.G. Log contains a field for
total_price
of a cart. Matching ontotal_price
will take numerical values from this field and emit a time series metric of the sums along with any other attributes defined in the connector config.This will function similarly to -- and be patterned after -- the current countconnector but emitting sums of values rather than counts of occurrences.
Example configuration for the component
Telemetry data types supported
In: Traces, metrics, logs
Out: Metrics
Is this a vendor-specific component?
Code Owner(s)
greatestusername, shalper2
Sponsor (optional)
@crobert-1
Additional context
No response
The text was updated successfully, but these errors were encountered: