-
Notifications
You must be signed in to change notification settings - Fork 164
Conversation
|
||
The application owner (developer Y) would only want the following metrics: | ||
|
||
* [System CPU Usage](#system-cpu-usage) reported every 5 seconds |
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.
Not sure if this is something we want in initial stage, but i'd like to add a requirement of same metric being reported with different interval, potentially with diff. dimensions.
For example, the app owner wants to see HTTP Server Duration metric exported every 1 second with only HttpStatusCode dimension, and HTTP Server Duration metric exported every 30 seconds with dimensions {hostname, HTTP Method, Host, Status Code, Client Type}. The former is typically used for near-real-time dashboards, and the latter for more permanent storage.
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 your example - I guess normally people would only report the 1 second one from the SDK pre-aggregation, and rely on the metrics backend to aggregate the 30 seconds one (and daily/weekly/monthly summary if there is a need).
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
* HTTP request counters, reported every 5 seconds: | ||
* Total number of received HTTP requests | ||
* Total number of finished HTTP requests | ||
* Number of currently-in-flight HTTP requests (concurrent HTTP requests) |
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 like how this example asks for three counters, because it seems possible to achieve with two instruments: a count of received requests and a histogram of response durations (i.e., seems to call for either a view or a 3rd instrument).
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.
And it might affect the semantic convention open-telemetry/opentelemetry-specification#1378 (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.
store.process_order("customerA", {"tomato": 1}) | ||
``` | ||
|
||
When the store is closed, we will report the following metrics: |
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 see (1) and (2) as good use-cases for monitoring using a metrics API, but maybe not (3). Although the example feels like it fell out of a textbook, you could re-imagine the store as a Message-Queue consumer processing orders in a horizontally scalable store. Can we ask another form of query: "how many stores were in operation at a given time?"
The application owner (developer Y) would only want the following metrics: | ||
|
||
* Server temperature - reported every 5 seconds | ||
* Server humidity - reported every minute |
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.
AFAIK, we need to have multiple "pipelines" for different configurations. This may include...
- Reporting period which is related to Collection rate, Export rate, etc...
- Selection / grouping of desired metrics for this pipeline
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.
These are all SDK configuration topics, to me. The use-cases in this document are about how code is instrumented, I think, and what the API looks like.
OpenCensus had a programmatic API for configuring the kinds of variables you mentioned. I'm not sure if a programmatic API or a configuration file is what user's want, but I'd argue to keep this setup out of the instrumentation API.
Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Leighton Chen <[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.
My main comment, thinking deeper on this, is whether or not "external annotation" needs to be called out specifically as a non-goal.
Specifically, should we call out a use case where an DevOps wants to add metric labels POST DEVELOPMENT to the API. I think this is an SDK concern and should be called out there (e.g. how you can add annotations to Resource via ENV, which would then influence metrics), but I think the scenarios listed here are sufficient for API discussions.
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.
Looks great, thanks @reyang!
Co-authored-by: Cijo Thomas <[email protected]>
I reviewed the open comments and believe that @reyang has addressed them all. Thank you! |
* metrics prototype scenario * rename * fix typo * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * clarify GA/stable * add example to exemplar * adjust the proposed timeline considering most folks will be on vacation in Dec. * fix nits * adjust the ToC * fix nits * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * adjust wording * fix typo * address review comment * address comments * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Leighton Chen <[email protected]>
* metrics prototype scenario * rename * fix typo * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * clarify GA/stable * add example to exemplar * adjust the proposed timeline considering most folks will be on vacation in Dec. * fix nits * adjust the ToC * fix nits * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * adjust wording * fix typo * address review comment * address comments * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Leighton Chen <[email protected]>
* metrics prototype scenario * rename * fix typo * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * clarify GA/stable * add example to exemplar * adjust the proposed timeline considering most folks will be on vacation in Dec. * fix nits * adjust the ToC * fix nits * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * adjust wording * fix typo * address review comment * address comments * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Leighton Chen <[email protected]>
* metrics prototype scenario * rename * fix typo * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> * clarify GA/stable * add example to exemplar * adjust the proposed timeline considering most folks will be on vacation in Dec. * fix nits * adjust the ToC * fix nits * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Leighton Chen <[email protected]> * adjust wording * fix typo * address review comment * address comments * Update text/metrics/0146-metrics-prototype-scenarios.md Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Leighton Chen <[email protected]>
Follow up on the 02/11/2021 #108 Metrics API/SDK SIG Mtg, I've created this OTEP which has described two scenarios for the metrics prototyping work.
The actual prototype will be submitted as PR(s) to the language client repo, for example: