-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Change NewSplitDriver paramater and initialization #1798
Change NewSplitDriver paramater and initialization #1798
Conversation
Co-authored-by: Anthony Mirabella <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1798 +/- ##
=====================================
Coverage 78.6% 78.6%
=====================================
Files 137 137
Lines 7288 7298 +10
=====================================
+ Hits 5729 5739 +10
Misses 1315 1315
Partials 244 244
|
exporters/otlp/otlp_test.go
Outdated
|
||
recordCount := 5 | ||
assert.NoError(t, driver.ExportMetrics(ctx, stubCheckpointSet{recordCount}, metricsdk.StatelessExportKindSelector())) | ||
assert.NoError(t, driver.ExportTraces(ctx, nil)) |
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 know this makes no actual difference in the code, but could we change these nils to actual snapshots like the test above?
This is just to make sure future iterations of this can't shortcut nil or 0 len inputs and still pass but fail with real data.
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.
It would make sense to just abstract this part of the repeated code into a separate function that can be called and will ensure this uniform call.
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.
That makes a lot of sense. I will work on refining the test cases, was trying to get the core change out for review. Do you want me to change this to a draft PR @MrAlias ?
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.
@bryan-aguilar if you think the changes needed will be greater than just the two tests here doing in another PR sounds reasonable, but if not including the changes here seems valid.
Co-authored-by: Anthony Mirabella <[email protected]>
exporters/otlp/otlp_test.go
Outdated
|
||
recordCount := 5 | ||
assert.NoError(t, driver.ExportMetrics(ctx, stubCheckpointSet{recordCount}, metricsdk.StatelessExportKindSelector())) | ||
assert.NoError(t, driver.ExportTraces(ctx, nil)) |
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.
It would make sense to just abstract this part of the repeated code into a separate function that can be called and will ensure this uniform call.
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: Tyler Yahn <[email protected]>
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 PR updates the way that NewSplitDriver is initialized and the arguments that it takes. As discussed in the SIG meeting on 2021-04-01 the program should not panic if a user fails to initialize all drivers in the config. NewSplitDriver now accepts a set of options which moves it to be in line with the rest of the code base. A noopDriver is internally created for uninitialized fields.
Resolves #1583