Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions e2e/scenarios/nextjs-instrumentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.next
node_modules

20 changes: 20 additions & 0 deletions e2e/scenarios/nextjs-instrumentation/__snapshots__/otel-spans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"attributes": {
"runtime": "nodejs",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>"
},
"hasParent": false,
"name": "nextjs nodejs otel span"
},
{
"attributes": {
"runtime": "edge",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>"
},
"hasParent": true,
"name": "nextjs edge otel span"
}
]
348 changes: 348 additions & 0 deletions e2e/scenarios/nextjs-instrumentation/__snapshots__/request-flow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,348 @@
[
{
"headers": {
"content-type": "application/json"
},
"jsonBody": null,
"method": "POST",
"path": "/api/apikey/login",
"query": null,
"rawBody": null
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"org_id": "mock-org-id",
"project_name": "e2e-nextjs-instrumentation-nodejs-e2e-<uuid:1>"
},
"method": "POST",
"path": "/api/project/register",
"query": null,
"rawBody": "{\"project_name\":\"e2e-nextjs-instrumentation-nodejs-e2e-<uuid:1>\",\"org_id\":\"mock-org-id\"}"
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"api_version": 2,
"rows": [
{
"_is_merge": false,
"context": {},
"created": "<timestamp>",
"id": "<span:2>",
"input": {
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"log_id": "g",
"metadata": {
"runtime": "nodejs",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"start": 0
},
"project_id": "<uuid:4>",
"root_span_id": "<span:3>",
"span_attributes": {
"exec_counter": 0,
"name": "nextjs nodejs logger span",
"type": "task"
},
"span_id": "<span:3>"
}
]
},
"method": "POST",
"path": "/logs3",
"query": null,
"rawBody": {
"api_version": 2,
"rows": [
{
"_is_merge": false,
"context": {},
"created": "<timestamp>",
"id": "<span:2>",
"input": {
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"log_id": "g",
"metadata": {
"runtime": "nodejs",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"start": 0
},
"project_id": "<uuid:4>",
"root_span_id": "<span:3>",
"span_attributes": {
"exec_counter": 0,
"name": "nextjs nodejs logger span",
"type": "task"
},
"span_id": "<span:3>"
}
]
}
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"api_version": 2,
"rows": [
{
"_is_merge": true,
"id": "<span:2>",
"input": {
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"log_id": "g",
"metadata": {
"runtime": "nodejs",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"end": 0
},
"output": {
"ok": true,
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"project_id": "<uuid:4>",
"root_span_id": "<span:3>",
"span_id": "<span:3>"
}
]
},
"method": "POST",
"path": "/logs3",
"query": null,
"rawBody": {
"api_version": 2,
"rows": [
{
"_is_merge": true,
"id": "<span:2>",
"input": {
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"log_id": "g",
"metadata": {
"runtime": "nodejs",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"end": 0
},
"output": {
"ok": true,
"route": "/api/smoke-test/node",
"runtime": "nodejs"
},
"project_id": "<uuid:4>",
"root_span_id": "<span:3>",
"span_id": "<span:3>"
}
]
}
},
{
"headers": {
"content-type": "application/json",
"x-bt-parent": "<x-bt-parent>"
},
"jsonBody": "<omitted>",
"method": "POST",
"path": "/otel/v1/traces",
"query": null,
"rawBody": "<omitted>"
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"org_id": "mock-org-id",
"project_name": "e2e-nextjs-instrumentation-edge-e2e-<uuid:1>"
},
"method": "POST",
"path": "/api/project/register",
"query": null,
"rawBody": "{\"project_name\":\"e2e-nextjs-instrumentation-edge-e2e-<uuid:1>\",\"org_id\":\"mock-org-id\"}"
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"api_version": 2,
"rows": [
{
"_is_merge": false,
"context": {},
"created": "<timestamp>",
"id": "<span:5>",
"input": {
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"log_id": "g",
"metadata": {
"runtime": "edge",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"start": 0
},
"project_id": "<uuid:7>",
"root_span_id": "<span:6>",
"span_attributes": {
"exec_counter": 0,
"name": "nextjs edge logger span",
"type": "task"
},
"span_id": "<span:6>"
}
]
},
"method": "POST",
"path": "/logs3",
"query": null,
"rawBody": {
"api_version": 2,
"rows": [
{
"_is_merge": false,
"context": {},
"created": "<timestamp>",
"id": "<span:5>",
"input": {
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"log_id": "g",
"metadata": {
"runtime": "edge",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"start": 0
},
"project_id": "<uuid:7>",
"root_span_id": "<span:6>",
"span_attributes": {
"exec_counter": 0,
"name": "nextjs edge logger span",
"type": "task"
},
"span_id": "<span:6>"
}
]
}
},
{
"headers": {
"content-type": "application/json"
},
"jsonBody": {
"api_version": 2,
"rows": [
{
"_is_merge": true,
"id": "<span:5>",
"input": {
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"log_id": "g",
"metadata": {
"runtime": "edge",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"end": 0
},
"output": {
"ok": true,
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"project_id": "<uuid:7>",
"root_span_id": "<span:6>",
"span_id": "<span:6>"
}
]
},
"method": "POST",
"path": "/logs3",
"query": null,
"rawBody": {
"api_version": 2,
"rows": [
{
"_is_merge": true,
"id": "<span:5>",
"input": {
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"log_id": "g",
"metadata": {
"runtime": "edge",
"scenario": "nextjs-instrumentation",
"testRunId": "<run:1>",
"transport": "http"
},
"metrics": {
"end": 0
},
"output": {
"ok": true,
"route": "/api/smoke-test/edge",
"runtime": "edge"
},
"project_id": "<uuid:7>",
"root_span_id": "<span:6>",
"span_id": "<span:6>"
}
]
}
},
{
"headers": {
"content-type": "application/json",
"x-bt-parent": "<x-bt-parent>"
},
"jsonBody": "<omitted>",
"method": "POST",
"path": "/otel/v1/traces",
"query": null,
"rawBody": "<omitted>"
}
]
Loading
Loading