From fbe21cd291254432b448f3f072ea5b0a060b57ea Mon Sep 17 00:00:00 2001 From: Tim Simmons Date: Tue, 11 Mar 2025 13:12:43 -0500 Subject: [PATCH 1/3] update promql-to-scrape README Update to more accurately reflect the guidance we give for users of this service. --- cloud/observability/promql-to-scrape/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cloud/observability/promql-to-scrape/README.md b/cloud/observability/promql-to-scrape/README.md index 062c325..e31529a 100644 --- a/cloud/observability/promql-to-scrape/README.md +++ b/cloud/observability/promql-to-scrape/README.md @@ -21,9 +21,13 @@ This means you can now hit http://localhost:9001/metrics on your machine and see ### Important Usability Information -**Important:** When you go to scrape this, you should do so with a **60s** scrape interval, unless you are meaningfully modifying this code. The example queries all assume a 1 minute rate and you'll want these to be equal. +**Important:** When you scrape this endpoint, you should do so with a scrape interval **<= the rate interval of the queries in your config file, and at least 1m**. -**Very Important:** The data you will see here is approximately 1 minute delayed (should you conform to the guidance above). Due to the aggregation that happens before metrics are presented to you, it's necessary for us to send the queries from this application to look 60 seconds in the past. Otherwise data aggregation would not be complete, and there would be no results for each query. +In general, you'll want the scrape interval and rate interval to be equal, as downstream systems may assume that timeseries data is exclusive to the interval between points. + +But if you're ok with a gauge that is looking back longer than the interval between data points in your timeseries database, a scrape interval < the rate interval is acceptable. + +**Important:** The data you will see here is subject to an aggregation delay. You may encounter issues with data appearing missing if you **use a rate interval < 2m**. ## Deployment From 2478457d9d71d7b602b65a3ea4113f37ba1d1a42 Mon Sep 17 00:00:00 2001 From: Tim Simmons Date: Tue, 11 Mar 2025 13:48:45 -0500 Subject: [PATCH 2/3] clarify time delay https://github.com/temporalio/samples-server/blob/main/cloud/observability/promql-to-scrape/internal/client.go#L88 --- cloud/observability/promql-to-scrape/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloud/observability/promql-to-scrape/README.md b/cloud/observability/promql-to-scrape/README.md index e31529a..acad097 100644 --- a/cloud/observability/promql-to-scrape/README.md +++ b/cloud/observability/promql-to-scrape/README.md @@ -21,13 +21,14 @@ This means you can now hit http://localhost:9001/metrics on your machine and see ### Important Usability Information +**Very Important:** This application will show data _delayed by one minute_. This is done in an attempt to smooth out some aggregation delay. However, you may encounter issues with data appearing missing if you **use a rate interval < 2m**. + **Important:** When you scrape this endpoint, you should do so with a scrape interval **<= the rate interval of the queries in your config file, and at least 1m**. In general, you'll want the scrape interval and rate interval to be equal, as downstream systems may assume that timeseries data is exclusive to the interval between points. But if you're ok with a gauge that is looking back longer than the interval between data points in your timeseries database, a scrape interval < the rate interval is acceptable. -**Important:** The data you will see here is subject to an aggregation delay. You may encounter issues with data appearing missing if you **use a rate interval < 2m**. ## Deployment From b1660d174e2edd2419352d92a9aad4285c178e35 Mon Sep 17 00:00:00 2001 From: Tim Simmons Date: Wed, 12 Mar 2025 11:15:04 -0500 Subject: [PATCH 3/3] remove confusion --- cloud/observability/promql-to-scrape/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cloud/observability/promql-to-scrape/README.md b/cloud/observability/promql-to-scrape/README.md index acad097..1921613 100644 --- a/cloud/observability/promql-to-scrape/README.md +++ b/cloud/observability/promql-to-scrape/README.md @@ -25,11 +25,6 @@ This means you can now hit http://localhost:9001/metrics on your machine and see **Important:** When you scrape this endpoint, you should do so with a scrape interval **<= the rate interval of the queries in your config file, and at least 1m**. -In general, you'll want the scrape interval and rate interval to be equal, as downstream systems may assume that timeseries data is exclusive to the interval between points. - -But if you're ok with a gauge that is looking back longer than the interval between data points in your timeseries database, a scrape interval < the rate interval is acceptable. - - ## Deployment Some example Kubernetes manifests are provided in the `/examples` directory. Filling in your certificates and account should get you going pretty quickly.