@m1212e/rumble 0.23.17 → 0.23.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/index.cjs +530 -248
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +53 -3
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +54 -4
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +531 -249
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
package/out/index.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
|
|
|
3
3
|
import { Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { YogaServerOptions, createPubSub } from "graphql-yoga";
|
|
5
5
|
import { Table } from "drizzle-orm";
|
|
6
|
+
import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
6
7
|
import { PgAsyncDatabase } from "drizzle-orm/pg-core";
|
|
7
8
|
import { MySqlAsyncDatabase } from "drizzle-orm/mysql-core";
|
|
8
|
-
import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
|
|
9
9
|
import { SQLiteAsyncDatabase } from "drizzle-orm/sqlite-core";
|
|
10
10
|
import SchemaBuilder from "@pothos/core";
|
|
11
11
|
import { IncomingMessage, RequestListener, ServerResponse } from "node:http";
|
|
@@ -4415,6 +4415,10 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
|
|
|
4415
4415
|
} | undefined;
|
|
4416
4416
|
/**
|
|
4417
4417
|
* rumble can set up otel tracing if you want to. This will provide details of execution time and outcome to the provided tracer. See https://pothos-graphql.dev/docs/plugins/tracing#install for more information.
|
|
4418
|
+
*
|
|
4419
|
+
* The emitted spans and attributes are identical for every transport, so an
|
|
4420
|
+
* operation served via GraphQL, the SOFA REST adapter or WebSockets produces
|
|
4421
|
+
* the same trace shape (see `rumble.transport` to tell them apart).
|
|
4418
4422
|
*/
|
|
4419
4423
|
otel?: {
|
|
4420
4424
|
/**
|
|
@@ -4429,6 +4433,33 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
|
|
|
4429
4433
|
* You can pass options to the tracing wrapper
|
|
4430
4434
|
*/
|
|
4431
4435
|
options?: TracingWrapperOptions<unknown>;
|
|
4436
|
+
/**
|
|
4437
|
+
* Whether the operation source is attached to operation spans as
|
|
4438
|
+
* `graphql.document`.
|
|
4439
|
+
*
|
|
4440
|
+
* Keep in mind that a document can carry inline argument literals, so this
|
|
4441
|
+
* may contain user data.
|
|
4442
|
+
* @default true
|
|
4443
|
+
*/
|
|
4444
|
+
includeDocument?: boolean;
|
|
4445
|
+
/**
|
|
4446
|
+
* Whether the incoming operation variables are attached to operation spans
|
|
4447
|
+
* as `graphql.variables.<name>` attributes.
|
|
4448
|
+
*
|
|
4449
|
+
* Variables regularly carry personal data, so you can turn this off
|
|
4450
|
+
* entirely (`false`) or pass a function to redact or drop single entries
|
|
4451
|
+
* before they leave the process.
|
|
4452
|
+
*
|
|
4453
|
+
* @example
|
|
4454
|
+
* ```ts
|
|
4455
|
+
* otel: {
|
|
4456
|
+
* enabled: true,
|
|
4457
|
+
* includeVariables: ({ password, ...rest }) => rest,
|
|
4458
|
+
* }
|
|
4459
|
+
* ```
|
|
4460
|
+
* @default true
|
|
4461
|
+
*/
|
|
4462
|
+
includeVariables?: boolean | ((variables: Record<string, unknown>) => Record<string, unknown> | undefined);
|
|
4432
4463
|
};
|
|
4433
4464
|
/**
|
|
4434
4465
|
* Structured logging for rumble internals. Pass a pino (or compatible) logger instance.
|
|
@@ -4445,12 +4476,31 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
|
|
|
4445
4476
|
*/
|
|
4446
4477
|
logger: RumbleLogger;
|
|
4447
4478
|
/**
|
|
4448
|
-
* When both logger and otel are enabled, inject `
|
|
4449
|
-
* log entry emitted during a GraphQL operation. Useful for correlating
|
|
4450
|
-
* traces in backends like Jaeger or Grafana Tempo.
|
|
4479
|
+
* When both logger and otel are enabled, inject `trace_id`, `span_id` and `trace_flags`
|
|
4480
|
+
* fields into every log entry emitted during a GraphQL operation. Useful for correlating
|
|
4481
|
+
* log lines with traces in backends like Jaeger or Grafana Tempo.
|
|
4451
4482
|
* @default true
|
|
4452
4483
|
*/
|
|
4453
4484
|
injectTraceId?: boolean;
|
|
4485
|
+
/**
|
|
4486
|
+
* Whether the incoming operation variables are attached to the operation
|
|
4487
|
+
* start log entry as a `graphql.variables` object.
|
|
4488
|
+
*
|
|
4489
|
+
* Variables regularly carry personal data, so you can turn this off
|
|
4490
|
+
* entirely (`false`) or pass a function to redact or drop single entries
|
|
4491
|
+
* before they are logged.
|
|
4492
|
+
*
|
|
4493
|
+
* @example
|
|
4494
|
+
* ```ts
|
|
4495
|
+
* logger: {
|
|
4496
|
+
* enabled: true,
|
|
4497
|
+
* logger: pino(),
|
|
4498
|
+
* includeVariables: ({ password, ...rest }) => rest,
|
|
4499
|
+
* }
|
|
4500
|
+
* ```
|
|
4501
|
+
* @default true
|
|
4502
|
+
*/
|
|
4503
|
+
includeVariables?: boolean | ((variables: Record<string, unknown>) => Record<string, unknown> | undefined);
|
|
4454
4504
|
};
|
|
4455
4505
|
};
|
|
4456
4506
|
//#endregion
|