-
Notifications
You must be signed in to change notification settings - Fork 21
metrics: OpenCensus-Go stats+view to Metrics converter #32
Conversation
I've also uploaded the part 2 of it. Unfortunately Github can't base a PR off one that hasn't yet been merged otherwise it'd have been a great candidate for splitting up. Anyways please take a look at the two different commits. |
2f146a1
to
c5f1f46
Compare
c5f1f46
to
a8a9cff
Compare
Kindly paging @bogdandrutu @songy23 @rakyll, this issue is blocking the OpenCensus-PHP stats implementation, so please help me review it, thanks! |
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 looks good on the high level. Some suggestions:
- Can you split it into a smaller PR than can be reviewed easily?
- In the same PR you include changes in the mod/sum - please move them in a separate PR.
- Ask a person with a good golang skill to review the language specific things.
Thanks for the comments @bogdandrutu!
Sure, I can do that
That go mod/sum change will have to be merged in before this otherwise CI won't build
Yes, I requested @rakyll and @songy23 for reviews. There aren't too many people working on OpenCensus-Go unfortunately. |
As requested in #32, splitting this up to prepare for the larger change. However this change needs to be merged in first before any Metrics related one.
@bogdandrutu I've mailed #33 for go.mod and go.sum changes. |
a8a9cff
to
8cd2c5e
Compare
8cd2c5e
to
1213671
Compare
Alright, since #32 has been merged into master and then rebased in this PR, what remains is just the basic uploading logic. PTAL @bogdandrutu @songy23 |
Addressed splitting up PRs, thank you.
1213671
to
59ea6a2
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.
LGTM overall. Consider filing issues for adding resource
support since it's needed in multiple places.
// Pid from the current process | ||
// StartTimestamp from the start time of this process | ||
// Language and library information. | ||
func NodeWithStartTime(nodeName string) *commonpb.Node { |
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 would say I prefer the old method name :) Not only start_time is derived from env vars.
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.
Gotcha. The reason why I changed it is because all the other variables can be retrieved alright from the environment but we don't expose startTime so it is the most important one.
Thank you @songy23 for the review!
In deed, I was actually just working on the resource inclusion but it has to come after this PR since we'll create a resource once when the exporter is started and then update each metric that's produced instead of creating a resource for every metric. |
This is the first step of piecemeal updates to allow
OpenCensus-Go to add metrics exporting before
https://github.com/census-instrumentation/opencensus-go#956
is resolved, as that issue is going to take a long time and
a lot of work.
After that, a follow-up change will be to then implement the
metrics service that will enable this exporter to
be an OpenCensus-Go stats+view exporter, then transform
that data into metricspb.Metric
Updates #31