-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore(metric API): timestamp value update #19193
base: develop
Are you sure you want to change the base?
Conversation
sujitnewrelic
commented
Nov 5, 2024
- The values for "timestamp" key in the example payloads were "CURRENT_TIME," which were invalid as per the "Required key-value pairs" table. Updated the values with some epoch time samples.
- Refactored a sentence from passive voice to active voice.
In the payload examples, the values for the timestamp attributes were "CURRENT_TIME". As per the description for timestamp key in "Required key-value pairs" section, I have updated it to sample epoch time in milliseconds.
Updated the sentence from passive voice to active voice.
Hi @sujitnewrelic 👋 Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days. We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes). |
✅ Deploy Preview for docs-website-netlify ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
- Updated the instruction: Now it clearly guides the user to replace the placeholder timestamp value with a valid one. - Changed the sample epoch timestamps to placeholder, after discussing with the SME. - Updated the description of the timestamp key for better readability.
|
Linked "a valid epoch timestamp" to the "Required key-value pairs" section where the timestamp key is described in details.
|
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.
@sujitnewrelic thanks for cleaning up this metric page! I inserted a few suggestions you might consider.
@@ -324,7 +324,7 @@ Each metric data point map in the `metrics` array uses the following key-value s | |||
"name": "cache.misses", | |||
"type": "count", | |||
"value": 15, | |||
"timestamp": CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
@@ -335,7 +335,7 @@ Each metric data point map in the `metrics` array uses the following key-value s | |||
"name": "temperature", | |||
"type": "gauge", | |||
"value": 15, | |||
"timestamp": CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
@@ -351,7 +351,7 @@ Each metric data point map in the `metrics` array uses the following key-value s | |||
"max": 0.001708826 | |||
}, | |||
"interval.ms": 10000, | |||
"timestamp": CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
@@ -269,7 +269,7 @@ Each metric data point map in the `metrics` array uses the following key-value s | |||
</td> | |||
|
|||
<td> | |||
<DNT>**Required**</DNT>. The metric's start time in [Unix time](https://currentmillis.com/). The default uses UTC time zone. This field also support seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and query. Metrics reported with a timestamp older than 48 hours ago or newer than 24 hours from the time they are reported are dropped. | |||
<DNT>**Required**</DNT>. The metric's start time in [Unix time](https://currentmillis.com/). The default uses UTC time zone. This field also support seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and query. Metrics reported with a timestamp older than 48 hours in the past or more than 24 hours in the future from the time they are reported are dropped. |
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.
<DNT>**Required**</DNT>. The metric's start time in [Unix time](https://currentmillis.com/). The default uses UTC time zone. This field also support seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and query. Metrics reported with a timestamp older than 48 hours in the past or more than 24 hours in the future from the time they are reported are dropped. | |
<DNT>**Required**</DNT>. The metric's start time in [Unix time](https://currentmillis.com/). The default uses UTC time zone. This field also support seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and query. Metrics are dropped if they have a timestamp more than 48 hours in the past or more than 24 hours in the future from the time they are reported. |
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.
@sujitnewrelic I know this revision has passive voice, but in this case, that seems appropriate.
@@ -206,7 +206,7 @@ The JSON payload uses this structure: | |||
"name": "service.memory", | |||
"type": "gauge", | |||
"value": 2.7, | |||
"timestamp": CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
@@ -194,7 +194,7 @@ The JSON payload uses this structure: | |||
"name": "service.errors.all", | |||
"type": "count", | |||
"value": 15, | |||
"timestamp": CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
@@ -40,7 +40,7 @@ Follow this example to send your first metric data points to New Relic: | |||
"name":"memory.heap", | |||
"type":"gauge", | |||
"value":2.3, | |||
"timestamp":CURRENT_TIME, | |||
"timestamp":CURRENT_TIMESTAMP, |
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.
"timestamp":CURRENT_TIMESTAMP, | |
"timestamp": INSERT_CURRENT_TIMESTAMP, |
|
||
Follow this example to send your first metric data points to New Relic: | ||
|
||
1. Get the <InlinePopover type="licenseKey"/> for the account you want to report data to. | ||
2. Insert the license key into the following JSON, and then send the JSON to our [endpoint](#api-endpoint). | ||
3. Update the `timestamp` with a valid epoch timestamp. | ||
3. Update the `timestamp` value from `CURRENT_TIMESTAMP` to [a valid epoch timestamp](#json-payload-keys). |
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.
3. Update the `timestamp` value from `CURRENT_TIMESTAMP` to [a valid epoch timestamp](#json-payload-keys). | |
3. For `timestamp` replace `INSERT_CURRENT_TIMESTAMP` with a valid [epoch timestamp](#json-payload-keys). |
Updated review comments
|
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.
@sujitnewrelic thanks for making these changes!