Skip to content
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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

sujitnewrelic
Copy link
Collaborator

  • 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.
@sujitnewrelic sujitnewrelic added content requests related to docs site content from_tw Identifies issues/PRs from Tech Docs writers labels Nov 5, 2024
@sujitnewrelic sujitnewrelic self-assigned this Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

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).

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for docs-website-netlify ready!

Name Link
🔨 Latest commit f6d77c6
🔍 Latest deploy log https://app.netlify.com/sites/docs-website-netlify/deploys/67318fc819a4010008b64fbf
😎 Deploy Preview https://deploy-preview-19193--docs-website-netlify.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Nov 5, 2024

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

- 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.
Copy link

github-actions bot commented Nov 5, 2024

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

Linked "a valid epoch timestamp" to the "Required key-value pairs" section where the timestamp key is described in details.
Copy link

github-actions bot commented Nov 6, 2024

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

Copy link
Contributor

@rhetoric101 rhetoric101 left a 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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.

Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

Copy link
Contributor

@rhetoric101 rhetoric101 left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content requests related to docs site content from_tw Identifies issues/PRs from Tech Docs writers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants