Skip to content

Instantly share code, notes, and snippets.

@juliangiuca
Created January 10, 2023 01:21
Show Gist options
  • Select an option

  • Save juliangiuca/d7b5ebe85033c1a1e96c73ec072f435c to your computer and use it in GitHub Desktop.

Select an option

Save juliangiuca/d7b5ebe85033c1a1e96c73ec072f435c to your computer and use it in GitHub Desktop.
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "query"
}
},
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "nodejs"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "1.8.0"
}
},
{
"key": "service.version",
"value": {
"stringValue": "0.1.0"
}
}
],
"droppedAttributesCount": 0
},
"scopeSpans": [
{
"scope": {
"name": "@opentelemetry/instrumentation-express",
"version": "0.32.0"
},
"spans": [
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "9b2a090b8e3e9abc",
"parentSpanId": "e57e95e4f8578b66",
"name": "middleware - query",
"kind": 1,
"startTimeUnixNano": 1671557599547729200,
"endTimeUnixNano": 1671557599547775700,
"attributes": [
{
"key": "http.route",
"value": {
"stringValue": "/"
}
},
{
"key": "express.name",
"value": {
"stringValue": "query"
}
},
{
"key": "express.type",
"value": {
"stringValue": "middleware"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "731874ccb0e3229b",
"parentSpanId": "e57e95e4f8578b66",
"name": "middleware - expressInit",
"kind": 1,
"startTimeUnixNano": 1671557599547839500,
"endTimeUnixNano": 1671557599547897900,
"attributes": [
{
"key": "http.route",
"value": {
"stringValue": "/"
}
},
{
"key": "express.name",
"value": {
"stringValue": "expressInit"
}
},
{
"key": "express.type",
"value": {
"stringValue": "middleware"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "34226defe6cf6ec4",
"parentSpanId": "e57e95e4f8578b66",
"name": "middleware - corsMiddleware",
"kind": 1,
"startTimeUnixNano": 1671557599547939300,
"endTimeUnixNano": 1671557599547977200,
"attributes": [
{
"key": "http.route",
"value": {
"stringValue": "/graphql"
}
},
{
"key": "express.name",
"value": {
"stringValue": "corsMiddleware"
}
},
{
"key": "express.type",
"value": {
"stringValue": "middleware"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "43ffa722fca41ab3",
"parentSpanId": "e57e95e4f8578b66",
"name": "middleware - jsonParser",
"kind": 1,
"startTimeUnixNano": 1671557599548069400,
"endTimeUnixNano": 1671557599548549400,
"attributes": [
{
"key": "http.route",
"value": {
"stringValue": "/graphql"
}
},
{
"key": "express.name",
"value": {
"stringValue": "jsonParser"
}
},
{
"key": "express.type",
"value": {
"stringValue": "middleware"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "22876d3b00105fbc",
"parentSpanId": "e57e95e4f8578b66",
"name": "middleware - <anonymous>",
"kind": 1,
"startTimeUnixNano": 1671557599548621600,
"endTimeUnixNano": 1671557600531195400,
"attributes": [
{
"key": "http.route",
"value": {
"stringValue": "/graphql"
}
},
{
"key": "express.name",
"value": {
"stringValue": "<anonymous>"
}
},
{
"key": "express.type",
"value": {
"stringValue": "middleware"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
}
]
},
{
"scope": {
"name": "@opentelemetry/instrumentation-knex",
"version": "0.31.0"
},
"spans": [
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "169720fc55f2cb8b",
"parentSpanId": "3d1a0038bf1e2786",
"name": "select getdatable.logs",
"kind": 1,
"startTimeUnixNano": 1671557599551940000,
"endTimeUnixNano": 1671557599739795700,
"attributes": [
{
"key": "knex.version",
"value": {
"stringValue": "2.3.0"
}
},
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "db.sql.table",
"value": {
"stringValue": "logs"
}
},
{
"key": "db.operation",
"value": {
"stringValue": "select"
}
},
{
"key": "db.user",
"value": {
"stringValue": "postgres"
}
},
{
"key": "db.name",
"value": {
"stringValue": "getdatable"
}
},
{
"key": "net.peer.name",
"value": {
"stringValue": "100.103.128.99"
}
},
{
"key": "db.statement",
"value": {
"stringValue": "select * from \"logs\" where true and \"timestamp\" >= ? and \"timestamp\" <= ? order by \"timestamp\" asc limit ?"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "edd632dd71e4b439",
"parentSpanId": "1e62f2ea84ceac7f",
"name": "select getdatable.logs",
"kind": 1,
"startTimeUnixNano": 1671557599743554000,
"endTimeUnixNano": 1671557600237367800,
"attributes": [
{
"key": "knex.version",
"value": {
"stringValue": "2.3.0"
}
},
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "db.sql.table",
"value": {
"stringValue": "logs"
}
},
{
"key": "db.operation",
"value": {
"stringValue": "select"
}
},
{
"key": "db.user",
"value": {
"stringValue": "postgres"
}
},
{
"key": "db.name",
"value": {
"stringValue": "getdatable"
}
},
{
"key": "net.peer.name",
"value": {
"stringValue": "100.103.128.99"
}
},
{
"key": "db.statement",
"value": {
"stringValue": "select count(*) from \"logs\""
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "f032cfdaaa582e32",
"parentSpanId": "07503fdc4dbb57cc",
"name": "select getdatable.logs",
"kind": 1,
"startTimeUnixNano": 1671557599743861000,
"endTimeUnixNano": 1671557600517961700,
"attributes": [
{
"key": "knex.version",
"value": {
"stringValue": "2.3.0"
}
},
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "db.sql.table",
"value": {
"stringValue": "logs"
}
},
{
"key": "db.operation",
"value": {
"stringValue": "select"
}
},
{
"key": "db.user",
"value": {
"stringValue": "postgres"
}
},
{
"key": "db.name",
"value": {
"stringValue": "getdatable"
}
},
{
"key": "net.peer.name",
"value": {
"stringValue": "100.103.128.99"
}
},
{
"key": "db.statement",
"value": {
"stringValue": "select time_bucket_gapfill(INTERVAL '10 minutes', timestamp, '2022-12-12T23:24:00.000Z', '2022-12-19T23:24:00.000Z') AS btime, count(*) as volume from \"logs\" where \"timestamp\" >= ? and \"timestamp\" < ? group by \"btime\" order by \"btime\" asc"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
}
]
},
{
"scope": {
"name": "log-graph"
},
"spans": [
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "3d1a0038bf1e2786",
"parentSpanId": "6014d62341415dd8",
"name": "chart",
"kind": 1,
"startTimeUnixNano": 1671557599550719500,
"endTimeUnixNano": 1671557599740270600,
"attributes": [],
"droppedAttributesCount": 0,
"events": [
{
"attributes": [],
"name": "log query execution time:",
"timeUnixNano": 1671474727002183200,
"droppedAttributesCount": 0
}
],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "6014d62341415dd8",
"parentSpanId": "bce3133ccd76b2e3",
"name": "GraphQL Log query",
"kind": 1,
"startTimeUnixNano": 1671557599549438200,
"endTimeUnixNano": 1671557599742339300,
"attributes": [],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "ce1d011aa503d47d",
"parentSpanId": "bce3133ccd76b2e3",
"name": "GraphQL logs",
"kind": 1,
"startTimeUnixNano": 1671557599742553300,
"endTimeUnixNano": 1671557599742570800,
"attributes": [],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "1e62f2ea84ceac7f",
"parentSpanId": "bce3133ccd76b2e3",
"name": "GraphQL counter",
"kind": 1,
"startTimeUnixNano": 1671557599742593800,
"endTimeUnixNano": 1671557600237749200,
"attributes": [],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "07503fdc4dbb57cc",
"parentSpanId": "45f0fbbeac9684db",
"name": "chart",
"kind": 1,
"startTimeUnixNano": 1671557599743103500,
"endTimeUnixNano": 1671557600518398700,
"attributes": [],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
},
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "45f0fbbeac9684db",
"parentSpanId": "bce3133ccd76b2e3",
"name": "GraphQL counter",
"kind": 1,
"startTimeUnixNano": 1671557599743085800,
"endTimeUnixNano": 1671557600518417700,
"attributes": [],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
}
]
},
{
"scope": {
"name": "@opentelemetry/instrumentation-graphql",
"version": "0.33.0"
},
"spans": [
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "bce3133ccd76b2e3",
"parentSpanId": "e57e95e4f8578b66",
"name": "graphql.execute",
"kind": 1,
"startTimeUnixNano": 1671557599548952000,
"endTimeUnixNano": 1671557600529154600,
"attributes": [
{
"key": "graphql.operation.type",
"value": {
"stringValue": "query"
}
},
{
"key": "graphql.operation.name",
"value": {
"stringValue": "ExampleQuery"
}
},
{
"key": "graphql.source",
"value": {
"stringValue": "query ExampleQuery($startTime: DateTime $endTime: DateTime) {\n logs(startTime: $startTime endTime: $endTime) {\n logs\n counter\n chart {\n bucket\n series {\n timestamp\n volume\n }\n }\n }\n}\n"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
}
]
},
{
"scope": {
"name": "@opentelemetry/instrumentation-http",
"version": "0.34.0"
},
"spans": [
{
"traceId": "92c5331fbc8903ac558bc4f74b0d5544",
"spanId": "e57e95e4f8578b66",
"name": "HTTP POST",
"kind": 2,
"startTimeUnixNano": 1671557599547565600,
"endTimeUnixNano": 1671557600531147300,
"attributes": [
{
"key": "http.url",
"value": {
"stringValue": "http://localhost:4000/graphql"
}
},
{
"key": "http.host",
"value": {
"stringValue": "localhost:4000"
}
},
{
"key": "net.host.name",
"value": {
"stringValue": "localhost"
}
},
{
"key": "http.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "http.scheme",
"value": {
"stringValue": "http"
}
},
{
"key": "http.target",
"value": {
"stringValue": "/graphql"
}
},
{
"key": "http.user_agent",
"value": {
"stringValue": "insomnia/2021.6.0"
}
},
{
"key": "http.request_content_length_uncompressed",
"value": {
"intValue": 343
}
},
{
"key": "http.flavor",
"value": {
"stringValue": "1.1"
}
},
{
"key": "net.transport",
"value": {
"stringValue": "ip_tcp"
}
},
{
"key": "net.host.ip",
"value": {
"stringValue": "::1"
}
},
{
"key": "net.host.port",
"value": {
"intValue": 4000
}
},
{
"key": "net.peer.ip",
"value": {
"stringValue": "::1"
}
},
{
"key": "net.peer.port",
"value": {
"intValue": 50487
}
},
{
"key": "http.status_code",
"value": {
"intValue": 200
}
},
{
"key": "http.status_text",
"value": {
"stringValue": "OK"
}
},
{
"key": "http.route",
"value": {
"stringValue": "/graphql"
}
}
],
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 0
},
"links": [],
"droppedLinksCount": 0
}
]
}
]
}
],
"messageId": "49636179927245907139015416763830786717950791793177001986-0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment