-
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
Instrument obsreport.Scraper #6460
Instrument obsreport.Scraper #6460
Conversation
3b37e8f
to
45a051a
Compare
bdc7135
to
3436c45
Compare
* instrument obsreport.scraper metrics with otel go
adb6a40
to
238e140
Compare
obsreport/obsreport_test.go
Outdated
|
||
parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) | ||
defer parentSpan.End() | ||
testTelemetry(t, func(tt obsreporttest.TestTelemetry, registry *featuregate.Registry) { |
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.
This API is horrible, makes everything be super indented...
/cc @paivagustavo
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.
@jmacd suggested the creation of new top level function tests as 5961f60, which keeps the same indentation for the existing tests and can be easily removed once we're done with the transition.
cc @moh-osman3
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.
Please refactor as suggested, and we can get this finalized + merged
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.
Let me know if my latest commit matches what was suggested.
Codecov ReportBase: 91.33% // Head: 90.96% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6460 +/- ##
==========================================
- Coverage 91.33% 90.96% -0.37%
==========================================
Files 242 241 -1
Lines 13888 14063 +175
==========================================
+ Hits 12684 12792 +108
- Misses 959 1019 +60
- Partials 245 252 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
obsreport/obsreport_test.go
Outdated
|
||
parentCtx, parentSpan := tt.TracerProvider.Tracer("test").Start(context.Background(), t.Name()) | ||
defer parentSpan.End() | ||
testTelemetry(t, func(tt obsreporttest.TestTelemetry, registry *featuregate.Registry) { |
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.
Please refactor as suggested, and we can get this finalized + merged
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 @moh-osman3!
Description:
This PR instruments obsreport.Scraper with otel go. This is a followup PR that is based on similar changes made for obsreport.Receiver: #6222
Link to tracking Issue: Part of #816
Testing:
Ran contrib collector with prometheusreceiver and hostmetricsreceiver and confirmed that new metrics show up. Tested both with feature gate disabled and enabled.