-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add ingoing and outgoing counts to processorhelper #10910
Add ingoing and outgoing counts to processorhelper #10910
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10910 +/- ##
==========================================
- Coverage 92.21% 92.21% -0.01%
==========================================
Files 414 414
Lines 19718 19792 +74
==========================================
+ Hits 18183 18251 +68
- Misses 1165 1168 +3
- Partials 370 373 +3 ☔ View full report in Codecov by Sentry. |
259cf00
to
f574d98
Compare
Any thoughts on this, @open-telemetry/collector-contrib-approvers? |
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.
Thanks @djaglowski, this looks good overall, just one question around setting the meter provider
processor/processorhelper/logs.go
Outdated
@@ -39,12 +40,25 @@ func NewLogsProcessor( | |||
return nil, errors.New("nil logsFunc") | |||
} | |||
|
|||
if set.MeterProvider == nil { | |||
set.MeterProvider = noop.NewMeterProvider() |
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 wouldn't expect this to be needed here, can you confirm whether it is?
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.
You're right, it was a problem with a particular test, not something that needs to be addressed here.
processor/processorhelper/metrics.go
Outdated
@@ -39,12 +40,25 @@ func NewMetricsProcessor( | |||
return nil, errors.New("nil metricsFunc") | |||
} | |||
|
|||
if set.MeterProvider == nil { | |||
set.MeterProvider = noop.NewMeterProvider() |
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.
same question as above
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.
Removed for all three signals.
f574d98
to
4421a21
Compare
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've rebased and resolved the conflict.
processor/processorhelper/logs.go
Outdated
@@ -39,12 +40,25 @@ func NewLogsProcessor( | |||
return nil, errors.New("nil logsFunc") | |||
} | |||
|
|||
if set.MeterProvider == nil { | |||
set.MeterProvider = noop.NewMeterProvider() |
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.
You're right, it was a problem with a particular test, not something that needs to be addressed here.
A contrib test failed, but I think it expected with this change:
|
The test is likely a failure of the new metrics being emitted and the original test not expecting them to be there. Please open a PR to update the test as a follow up |
Thanks for the review @codeboten. I created open-telemetry/opentelemetry-collector-contrib#35073 to update the contrib test. |
dps.AppendEmpty() | ||
dps.AppendEmpty() | ||
|
||
metricReader := sdkmetric.NewManualReader() |
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.
Could the test code here use the generated test code? Can be done in a follow up PR
…35073) This updates collector modules and fixes a test that was broken by open-telemetry/opentelemetry-collector#10910 --------- Signed-off-by: Dan Jaglowski <[email protected]> Signed-off-by: Alex Boten <[email protected]> Co-authored-by: Alex Boten <[email protected]>
) #### Description Implements ingoing and outgoing counts as described in open-telemetry#10708.
Follow up for #10910 (comment), ping @djaglowski as the author of the PR Signed-off-by: Alex Boten <[email protected]>
…pen-telemetry#35073) This updates collector modules and fixes a test that was broken by open-telemetry/opentelemetry-collector#10910 --------- Signed-off-by: Dan Jaglowski <[email protected]> Signed-off-by: Alex Boten <[email protected]> Co-authored-by: Alex Boten <[email protected]>
…s Undefined Behavior (#11349) The main issue is that after #10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like #11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes #11350 --------- Signed-off-by: Bogdan Drutu <[email protected]>
…pen-telemetry#35073) This updates collector modules and fixes a test that was broken by open-telemetry/opentelemetry-collector#10910 --------- Signed-off-by: Dan Jaglowski <[email protected]> Signed-off-by: Alex Boten <[email protected]> Co-authored-by: Alex Boten <[email protected]>
…s Undefined Behavior (open-telemetry#11349) The main issue is that after open-telemetry#10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like open-telemetry#11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes open-telemetry#11350 --------- Signed-off-by: Bogdan Drutu <[email protected]>
…s Undefined Behavior (open-telemetry#11349) The main issue is that after open-telemetry#10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like open-telemetry#11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes open-telemetry#11350 --------- Signed-off-by: Bogdan Drutu <[email protected]>
Description
Implements ingoing and outgoing counts as described in #10708.