-
Notifications
You must be signed in to change notification settings - Fork 598
Few doc updates for opentelemetry #2353
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2353 +/- ##
=====================================
Coverage 79.5% 79.5%
=====================================
Files 123 123
Lines 21448 21448
=====================================
Hits 17061 17061
Misses 4387 4387 ☔ View full report in Codecov by Sentry. |
| //! # Getting Started with Metrics | ||
| //! | ||
| //! The [`metrics`] module provides types for recording measurements about a | ||
| //! service at runtime. Below are the key steps to report measurements using |
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.
"Service" is an overloaded term. Not introduced in this PR but I think we should remove "about a service" from the sentence here to just say: The [metrics]module provides types for recording measurements about a service at runtime.
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.
Agree. It is copied from otel official website. I'll address it in the future.
| //! ## How Metrics Work in OpenTelemetry | ||
| //! In OpenTelemetry, raw measurements recorded using instruments are | ||
| //! **aggregated in memory** to form metrics. These aggregated metrics are | ||
| //! periodically exported by the [`opentelemetry_sdk`] at fixed intervals (e.g., |
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.
Since this is a general introduction, should we talk about pull based exporters as well?
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.
in future iteration, yes.
| //! values to be reported through a callback function. Observable instruments | ||
| //! are ideal when the metric value is managed elsewhere and needs to be | ||
| //! observed by OpenTelemetry instrumentation. The callbacks are automatically | ||
| //! invoked by the OpenTelemetry SDK before every export (e.g., every 60 |
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.
| //! invoked by the OpenTelemetry SDK before every export (e.g., every 60 | |
| //! invoked by the OpenTelemetry SDK before every export, force_flush and shutdown. |
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.
Good point. i'll keep iterating to make it more thorough, in follow up PRs.
lalitb
left a comment
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. These are ongoing improvements, so we can keep revisiting them as needed.
| //! | ||
| //! | ||
| //! # Logs | ||
| //! # Getting Started with Logs |
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 could add a code sample for Logs as well similar to Metrics and Traces.
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'll need to revisit how to do that, as for logs, we just ask people to use existing tracing or log apis....
utpilla
left a comment
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's a good start. Further improvements can be made in follow-up PRs.
Trying to see if this is better, where we provide most details in the
opentelemetrycrates' doc page.