fix: OTLP JSON examples (#516)

# Why
The example files do not follow the specification. 64 bit integers
must be [string
encoded](https://protobuf.dev/programming-guides/proto3/#json).

# What

 - Fix the encoding in the examples
 - Add an example for log `severityNumber` to point at the enum
   encoding rules.
pull/523/head
Ben Blackmore 10 months ago committed by GitHub
parent ea449ae0e9
commit c56093a326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      examples/logs.json
  2. 10
      examples/metrics.json
  3. 4
      examples/trace.json

@ -27,8 +27,9 @@
},
"logRecords": [
{
"timeUnixNano": 1544712660300000000,
"observedTimeUnixNano": 1544712660300000000,
"timeUnixNano": "1544712660300000000",
"observedTimeUnixNano": "1544712660300000000",
"severityNumber": 10,
"severityText": "Information",
"traceId": "5B8EFFF798038103D269B633813FC60C",
"spanId": "EEE19B7EC3C1B174",
@ -51,7 +52,7 @@
{
"key": "int.attribute",
"value": {
"intValue": 10
"intValue": "10"
}
},
{

@ -36,8 +36,8 @@
"dataPoints": [
{
"asDouble": 5,
"startTimeUnixNano": 1544712660300000000,
"timeUnixNano": 1544712660300000000,
"startTimeUnixNano": "1544712660300000000",
"timeUnixNano": "1544712660300000000",
"attributes": [
{
"key": "my.counter.attr",
@ -58,7 +58,7 @@
"dataPoints": [
{
"asDouble": 10,
"timeUnixNano": 1544712660300000000,
"timeUnixNano": "1544712660300000000",
"attributes": [
{
"key": "my.gauge.attr",
@ -79,8 +79,8 @@
"aggregationTemporality": 1,
"dataPoints": [
{
"startTimeUnixNano": 1544712660300000000,
"timeUnixNano": 1544712660300000000,
"startTimeUnixNano": "1544712660300000000",
"timeUnixNano": "1544712660300000000",
"count": 2,
"sum": 2,
"bucketCounts": [1,1],

@ -31,8 +31,8 @@
"spanId": "EEE19B7EC3C1B174",
"parentSpanId": "EEE19B7EC3C1B173",
"name": "I'm a server span",
"startTimeUnixNano": 1544712660000000000,
"endTimeUnixNano": 1544712661000000000,
"startTimeUnixNano": "1544712660000000000",
"endTimeUnixNano": "1544712661000000000",
"kind": 2,
"attributes": [
{

Loading…
Cancel
Save