You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timestamp instruction, value, and description updated
- 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 file name to clipboardExpand all lines: src/content/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api.mdx
+8-8
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Follow this example to send your first metric data points to New Relic:
28
28
29
29
1. Get the <InlinePopovertype="licenseKey"/> for the account you want to report data to.
30
30
2. Insert the license key into the following JSON, and then send the JSON to our [endpoint](#api-endpoint).
31
-
3. Update the `timestamp`with a valid epoch timestamp.
31
+
3. Update the `timestamp`value from `CURRENT_TIMESTAMP` to a valid epoch timestamp.
32
32
This example creates a single metric data point for a metric named `memory.heap`, but you can create additional attributes or data points by specifying [metric types](/docs/telemetry-data-platform/ingest-manage-data/understand-data/metric-data-type) or adding [optional `common` blocks](#optional-map-attributes).
33
33
34
34
```bash
@@ -40,7 +40,7 @@ Follow this example to send your first metric data points to New Relic:
40
40
"name":"memory.heap",
41
41
"type":"gauge",
42
42
"value":2.3,
43
-
"timestamp":1704431659000,
43
+
"timestamp":CURRENT_TIMESTAMP,
44
44
"attributes":{"host.name":"dev.server.com"}
45
45
}]
46
46
}]'
@@ -194,7 +194,7 @@ The JSON payload uses this structure:
194
194
"name": "service.errors.all",
195
195
"type": "count",
196
196
"value": 15,
197
-
"timestamp":1707110059000,
197
+
"timestamp":CURRENT_TIMESTAMP,
198
198
"interval.ms": 10000,
199
199
"attributes": {
200
200
"service.response.statuscode": "400",
@@ -206,7 +206,7 @@ The JSON payload uses this structure:
206
206
"name": "service.memory",
207
207
"type": "gauge",
208
208
"value": 2.7,
209
-
"timestamp":1707110059000,
209
+
"timestamp":CURRENT_TIMESTAMP,
210
210
"attributes": {
211
211
"host.name": "dev.server.com",
212
212
"app.name": "foo"
@@ -269,7 +269,7 @@ Each metric data point map in the `metrics` array uses the following key-value s
269
269
</td>
270
270
271
271
<td>
272
-
<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.
272
+
<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.
273
273
</td>
274
274
</tr>
275
275
@@ -324,7 +324,7 @@ Each metric data point map in the `metrics` array uses the following key-value s
324
324
"name": "cache.misses",
325
325
"type": "count",
326
326
"value": 15,
327
-
"timestamp":1709615659000,
327
+
"timestamp":CURRENT_TIMESTAMP,
328
328
"interval.ms": 10000,
329
329
"attributes": {
330
330
"cache.name": "myCache",
@@ -335,7 +335,7 @@ Each metric data point map in the `metrics` array uses the following key-value s
335
335
"name": "temperature",
336
336
"type": "gauge",
337
337
"value": 15,
338
-
"timestamp":1709615659000,
338
+
"timestamp":CURRENT_TIMESTAMP,
339
339
"attributes": {
340
340
"city": "Portland",
341
341
"state": "Oregon"
@@ -351,7 +351,7 @@ Each metric data point map in the `metrics` array uses the following key-value s
0 commit comments