-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[datadogexporter] Use a singleton for sublayer calculation #1759
[datadogexporter] Use a singleton for sublayer calculation #1759
Conversation
Ideally, we would use one sublayer calculator per worker as the Datadog Agent does, but we can't here since we don't have access to the queue consumers.
Codecov Report
@@ Coverage Diff @@
## master #1759 +/- ##
=======================================
Coverage 89.85% 89.85%
=======================================
Files 376 376
Lines 18180 18184 +4
=======================================
+ Hits 16336 16340 +4
Misses 1383 1383
Partials 461 461
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 lgtm, approving on behalf of datadog
exporter/datadogexporter/stats.go
Outdated
@@ -26,8 +26,7 @@ const ( | |||
) | |||
|
|||
// ComputeAPMStats calculates the stats that should be submitted to APM about a given trace | |||
func ComputeAPMStats(tracePayload *pb.TracePayload, calculator *stats.SublayerCalculator, pushTime int64) *stats.Payload { | |||
|
|||
func ComputeAPMStats(tracePayload *pb.TracePayload, calculator *sublayerCalculator, pushTime int64) *stats.Payload { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to maintain the visibility of existing functions that were already public. I have double checked with the person who wrote this code and these and other functions can be made private, so I have done so in commit 1345a4d.
I can also make these changes in a separate PR if need be.
…er (#1759) * add test to cover default configurations; update document for default max_elapsed_time value * check type assertion
Description:
Link to tracking Issue: aws-observability/aws-otel-collector#179
Testing: Unit tests were amended. Tested end to end and performance tested.