[exporter/datadog]: updated remove sublayer stats calc and mutex (3rd times a charm) #3531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR is an update of #2478 and #3378
It removes sublayer stats calculation of trace payloads from the datadogexporter, as these are now calculated on the datadog backend. This follows work done in the datadog-agent, here: DataDog/datadog-agent#7450.
Removing this computation will improve performance and is an incremental step toward enabling support of distributed sublayer metric calculations.
Originally we had planned to hold off on shipping this until some broader work around the
exportable/stats
package itself was complete, which would allow us to use more up to date code exported from the datadog-agent...but given some user feedback on CPU consumption, I feel it makes sense to ship this now and get the benefit.Update: I've confirmed internally within my organization that the practical implications of using a
nil
value in the old payload is functionally equivalent to the updated stats payload, and that sublayer statistics/metrics will be generated correctly by passing a nil value, which was the concern that caused us to close this PR previously as described here: #3378 (comment)Link to tracking Issue:
Testing: removed all sublayer calc references and tests from test suite
Documentation: