-
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
Minor additions to self-observability metrics #1549
Minor additions to self-observability metrics #1549
Conversation
if procStat, err := pmv.proc.Stat(); err == nil { | ||
stats.Record(context.Background(), mCPUSeconds.M(int64(procStat.CPUTime()))) | ||
if times, err := pmv.proc.Times(); err == nil { | ||
stats.Record(context.Background(), mCPUSeconds.M(int64(times.Total()))) |
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 should really be a double
but I didn't change it to maintain backwards compatibility
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 should plan to fix this in a follow-up.
825e0b2
to
2dbd112
Compare
Codecov Report
@@ Coverage Diff @@
## master #1549 +/- ##
==========================================
- Coverage 91.87% 91.83% -0.05%
==========================================
Files 255 255
Lines 17561 17570 +9
==========================================
+ Hits 16135 16136 +1
- Misses 1020 1025 +5
- Partials 406 409 +3
Continue to review full report at Codecov.
|
a7e8cd8
to
e060514
Compare
Name: mUptime.Name(), | ||
Description: mUptime.Description(), | ||
Measure: mUptime, | ||
Aggregation: view.Sum(), |
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.
Why not last value? Then you wouldn't need to calculate delta (i.e. record prevTimeUnixNano
) and just report the current value, as far as I undertand.
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.
Tbh I'm not super familiar with the OpenCensus APIs, and this may not be the right way to do this. But the reason for choosing Sum
was so this is created as a Counter
metric. If I use LastValue
, this is created as a Gauge
.
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
… on non-Linux OSs
e060514
to
91d2f3d
Compare
…metry#1697) * breaking(zipkin): removes servicName from zipkin exporter. Resource detector provides a serviceName in all cases, hence we can relay on span resource to obtain the serviceName. Also this is required by the spec https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk_exporters/zipkin.md\#service-name (open-telemetry#1549). * docs(zipkin): adds changelog. * chore(examples/zipkin): updates example accordingly. Co-authored-by: Anthony Mirabella <[email protected]>
…emetry#1549) Bumps golang from 1.18.1-stretch to 1.18.2-stretch. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…sessions. (open-telemetry#1549) Signed-off-by: owentou <[email protected]>
Description:
Added uptime metric as documented as desired in the Observability Goals.
Also:
total_sys_memory_bytes
metric which records total virtually mapped memorycpu_seconds
to work on OSs other than Linux.