-
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
Some metrics followup #177
Conversation
7730d18
to
29788ac
Compare
measurementBatches []batch | ||
observers observerMap | ||
} | ||
) |
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.
Should mockMeter be defined in internal/metric package (like mock tracer)?
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 wonder if it should be in a test-support package, not an internal one, so that users can write mock tests of their own easily. Either way, let's leave a TODO behind and not block this PR.
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.
opened #203.
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.
Actually, that was the first thing I did. But then I got import cycles (tests in api/metric package were importing internal/metric package to get the mock meter, and that in turn imported api/metric to implement the Meter interface). So annoying. So to resolve that I would either need to make tests a different package or put the mock meter into api/metric. I went with the latter for now.
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.
We can move the tersts in api/metric
out of the "metric" package, into "metrics_test", to break this cycle. Let's leave it for a future TODO.
measurementBatches []batch | ||
observers observerMap | ||
} | ||
) |
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 wonder if it should be in a test-support package, not an internal one, so that users can write mock tests of their own easily. Either way, let's leave a TODO behind and not block this PR.
@krnowak can you please resolve the conflict? |
29788ac
to
4535726
Compare
Updated. |
measurementBatches []batch | ||
observers observerMap | ||
} | ||
) |
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.
We can move the tersts in api/metric
out of the "metric" package, into "metrics_test", to break this cycle. Let's leave it for a future TODO.
I know that the spec is going to have more changes, but I had some more work. Basically tests, more docs and some observer changes.