Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a0775a2
feat(opentelemetry): add schema coordinate to error events
EmrysMyrddin Oct 27, 2025
9debe75
feat(opentelemetry): migrate errors to events with more attributes
EmrysMyrddin Oct 27, 2025
0d91ec7
fix review
EmrysMyrddin Oct 27, 2025
ce9cdc8
fix typo
EmrysMyrddin Oct 27, 2025
43d9bbc
add @graphql-tools/executor to opentelemetry plugin
EmrysMyrddin Oct 28, 2025
a71b9f0
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Oct 28, 2025
dab431c
add tests
EmrysMyrddin Oct 28, 2025
dc63e97
migrate validation and parsing errors
EmrysMyrddin Oct 28, 2025
a0a420a
allow to disable logging for `openTelemetrySetup` and `hiveTracingSetup`
EmrysMyrddin Oct 28, 2025
5872988
fix linter
EmrysMyrddin Oct 28, 2025
cf02e02
update latest alpha
EmrysMyrddin Oct 28, 2025
b1713f2
skip GC tests in Bun
EmrysMyrddin Oct 28, 2025
db199f2
fix opentelemetry e2e
EmrysMyrddin Oct 29, 2025
b056ee2
fix abortSingalAll for runtimes not implementing FinalizationRegistry
EmrysMyrddin Oct 29, 2025
6895289
add comment
EmrysMyrddin Oct 29, 2025
7b5ad8e
update snapshots
EmrysMyrddin Nov 14, 2025
fbb71c6
use plugin to enable error coordinate
EmrysMyrddin Nov 20, 2025
bdb8517
add changeset
EmrysMyrddin Nov 20, 2025
bb954b0
update yoga
EmrysMyrddin Nov 28, 2025
31fe4be
chore(dependencies): updated changesets for modified dependencies
github-actions[bot] Nov 28, 2025
45cf7c0
docs(examples): converted from e2es
theguild-bot Nov 28, 2025
ea3987f
fix unused variable
EmrysMyrddin Nov 28, 2025
03bae42
unskip test
EmrysMyrddin Nov 28, 2025
befecd2
fix coordinate not available in router runtime
EmrysMyrddin Nov 28, 2025
8c46d59
fix tests for hive router runtime
EmrysMyrddin Nov 28, 2025
0108554
fix signal util import path
EmrysMyrddin Dec 8, 2025
64ccb74
docs(examples): converted from e2es
theguild-bot Dec 15, 2025
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
7 changes: 7 additions & 0 deletions .changeset/@graphql-hive_gateway-1636-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-hive/gateway': patch
---

dependencies updates:

- Updated dependency [`graphql-yoga@^5.17.0` ↗︎](https://www.npmjs.com/package/graphql-yoga/v/5.17.0) (from `^5.16.2`, in `dependencies`)
7 changes: 7 additions & 0 deletions .changeset/@graphql-hive_gateway-runtime-1636-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-hive/gateway-runtime': patch
---

dependencies updates:

- Updated dependency [`graphql-yoga@^5.17.0` ↗︎](https://www.npmjs.com/package/graphql-yoga/v/5.17.0) (from `^5.16.2`, in `dependencies`)
7 changes: 7 additions & 0 deletions .changeset/@graphql-hive_gateway-testing-1636-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-hive/gateway-testing': patch
---

dependencies updates:

- Updated dependency [`graphql-yoga@^5.17.0` ↗︎](https://www.npmjs.com/package/graphql-yoga/v/5.17.0) (from `^5.16.2`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-hive/plugin-opentelemetry': patch
---

dependencies updates:

- Added dependency [`@graphql-tools/executor@^1.4.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.4.9) (to `dependencies`)
7 changes: 7 additions & 0 deletions .changeset/@graphql-mesh_fusion-runtime-1636-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-mesh/fusion-runtime': patch
---

dependencies updates:

- Updated dependency [`graphql-yoga@^5.17.0` ↗︎](https://www.npmjs.com/package/graphql-yoga/v/5.17.0) (from `^5.16.2`, in `dependencies`)
22 changes: 22 additions & 0 deletions .changeset/little-ties-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@graphql-hive/plugin-opentelemetry': minor
'@graphql-hive/gateway-runtime': minor
---

Expose GraphQLError as OpenTelemetry Events.

Errors contains in the result of a graphql operation are now reported as standalone OpenTelemetry
Events (name `graphql.error`) instead of OpenTelemetry Exceptions.

This is aligned with the guidance of the Graphql OpenTelemetry working group.

It allows to add more graphql specific attributes to errors reported in a response:

- `message`: The error message
- `path`: The path in the operation document from which the error originated
- `locations`: The list of related locations in the document source
- `coordinate`: The schema coordinate of the resolver which is the source of the error

This brings the experimental support of the `coordinate` error attribute in the Yoga Runtime. For
security reason, this attribute is purposefully not serialized, to avoid leaking schema information
to clients.
2 changes: 1 addition & 1 deletion e2e/auto-type-merging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@graphql-mesh/compose-cli": "^1.5.3",
"@omnigraph/openapi": "^0.109.23",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/aws-sigv4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"aws4-express": "^0.12.0",
"express": "^5.0.0",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/demand-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@apollo/subgraph": "^2.11.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/extra-fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/graphos-polling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@apollo/subgraph": "^2.11.3",
"fastify": "^5.6.2",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"pino-pretty": "^13.1.2"
}
}
2 changes: 1 addition & 1 deletion e2e/hmac-auth-https/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@graphql-mesh/hmac-upstream-signature": "workspace:^",
"@graphql-mesh/plugin-jwt-auth": "workspace:^",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2"
"graphql-yoga": "^5.17.0"
}
}
2 changes: 1 addition & 1 deletion e2e/interface-additional-resolvers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
82 changes: 79 additions & 3 deletions e2e/opentelemetry/opentelemetry.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,17 @@ type JaegerTraceResource = {
tags: JaegerTraceTag[];
};

type JaegerTraceLog = {
timestamp: number;
fields: JaegerTraceTag[];
};

type JaegerTraceSpan = {
traceID: string;
spanID: string;
operationName: string;
tags: Array<JaegerTraceTag>;
logs: Array<JaegerTraceLog>;
references: Array<{ refType: string; spanID: string; traceID: string }>;
};

Expand Down Expand Up @@ -402,6 +408,30 @@ describe('OpenTelemetry', () => {
expect(relevantTrace?.spans).toContainEqual(
expect.objectContaining({ operationName: 'POST /graphql' }),
);

const operationSpan = relevantTrace!.spans.find(
(span) => span.operationName === 'graphql.operation',
);

expect(operationSpan?.logs).toContainEqual(
expect.objectContaining({
fields: expect.arrayContaining([
expect.objectContaining({
key: 'event',
value: 'graphql.error',
}),
expect.objectContaining({
key: 'hive.graphql.error.locations',
value: '["1:13"]',
}),
expect.objectContaining({
key: 'hive.graphql.error.message',
value: 'Syntax Error: Expected Name, found <EOF>.',
}),
]),
}),
);

expect(relevantTrace?.spans).toContainEqual(
expect.objectContaining({
operationName: 'graphql.parse',
Expand All @@ -416,7 +446,7 @@ describe('OpenTelemetry', () => {
}),
expect.objectContaining({
key: 'otel.status_description',
value: 'Syntax Error: Expected Name, found <EOF>.',
value: 'GraphQL Parse Error',
}),
expect.objectContaining({
key: 'hive.graphql.error.count',
Expand Down Expand Up @@ -477,6 +507,53 @@ describe('OpenTelemetry', () => {
expect(relevantTrace?.spans).toContainEqual(
expect.objectContaining({ operationName: 'POST /graphql' }),
);
expect(relevantTrace?.spans).toContainEqual(
expect.objectContaining({
operationName: 'graphql.operation',
tags: expect.arrayContaining([
expect.objectContaining({
key: 'otel.status_code',
value: 'ERROR',
}),
expect.objectContaining({
key: 'error',
value: true,
}),
expect.objectContaining({
key: 'otel.status_description',
value: 'GraphQL Validation Error',
}),
expect.objectContaining({
key: 'hive.graphql.error.count',
value: 1,
}),
]),
}),
);
const operationSpan = relevantTrace!.spans.find(
(span) => span.operationName === 'graphql.operation',
);

expect(operationSpan?.logs).toContainEqual(
expect.objectContaining({
fields: expect.arrayContaining([
expect.objectContaining({
key: 'event',
value: 'graphql.error',
}),
expect.objectContaining({
key: 'hive.graphql.error.locations',
value: '["1:9"]',
}),
expect.objectContaining({
key: 'hive.graphql.error.message',
value:
'Cannot query field "nonExistentField" on type "Query".',
}),
]),
}),
);

expect(relevantTrace?.spans).toContainEqual(
expect.objectContaining({ operationName: 'graphql.parse' }),
);
Expand All @@ -494,8 +571,7 @@ describe('OpenTelemetry', () => {
}),
expect.objectContaining({
key: 'otel.status_description',
value:
'Cannot query field "nonExistentField" on type "Query".',
value: 'GraphQL Validation Error',
}),
expect.objectContaining({
key: 'hive.graphql.error.count',
Expand Down
2 changes: 1 addition & 1 deletion e2e/opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@apollo/subgraph": "^2.11.3",
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/polling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"@graphql-mesh/compose-cli": "^1.5.3",
"express": "^5.0.0",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2"
"graphql-yoga": "^5.17.0"
}
}
2 changes: 1 addition & 1 deletion e2e/retry-timeout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@apollo/subgraph": "^2.11.3",
"@graphql-hive/gateway": "workspace:*",
"graphql": "16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/subscriptions-with-transforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "16.12.0",
"graphql-sse": "^2.6.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion e2e/type-merging-batching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1"
}
}
Binary file modified examples/extra-fields/example.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/extra-fields/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/extra-fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1",
"@graphql-hive/gateway": "^2.1.23"
},
Expand Down
Binary file modified examples/hmac-auth-https/example.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/hmac-auth-https/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/hmac-auth-https/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@graphql-mesh/hmac-upstream-signature": "^2.0.8",
"@graphql-mesh/plugin-jwt-auth": "^2.0.9",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2"
"graphql-yoga": "^5.17.0"
},
"devDependencies": {
"tsx": "^4.20.3"
Expand Down
Binary file modified examples/interface-additional-resolvers/example.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/interface-additional-resolvers/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/interface-additional-resolvers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1",
"@graphql-hive/gateway": "^2.1.23"
},
Expand Down
Binary file modified examples/subscriptions-with-transforms/example.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/subscriptions-with-transforms/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/subscriptions-with-transforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "16.12.0",
"graphql-sse": "^2.6.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1",
"@graphql-hive/gateway": "^2.1.23"
},
Expand Down
Binary file modified examples/type-merging-batching/example.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/type-merging-batching/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/type-merging-batching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@graphql-mesh/compose-cli": "^1.5.3",
"graphql": "^16.12.0",
"graphql-yoga": "^5.16.2",
"graphql-yoga": "^5.17.0",
"tslib": "^2.8.1",
"@graphql-hive/gateway": "^2.1.23"
},
Expand Down
Loading
Loading