autotel-plugins 0.19.26 → 0.19.27

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.
@@ -4,51 +4,55 @@ import { BigQueryOptions, BigQuery } from '@google-cloud/bigquery';
4
4
  * Plugin-only options for BigQuery instrumentation (not part of official BigQueryOptions).
5
5
  */
6
6
  interface BigQueryInstrumentationPluginOptions {
7
- /**
8
- * Custom tracer name (default: "autotel-plugins/bigquery").
9
- */
10
- tracerName?: string;
11
- /**
12
- * How to handle query text in spans:
13
- * - 'never': Don't capture any query text
14
- * - 'summary': Only capture low-cardinality summary (default)
15
- * - 'sanitized': Sanitize by replacing literals with ?
16
- * - 'raw': Capture raw query text (opt-in, not recommended for production)
17
- * @default 'summary'
18
- */
19
- captureQueryText?: 'never' | 'summary' | 'sanitized' | 'raw';
20
- /**
21
- * Maximum length for captured query text. Queries longer than this will be truncated.
22
- * @default 1000
23
- */
24
- maxQueryTextLength?: number;
25
- /**
26
- * Whether to include a hash of the query for exact matching without exposing text.
27
- * @default true
28
- */
29
- includeQueryHash?: boolean;
30
- /**
31
- * Whether to instrument admin operations (dataset/table create, delete, metadata).
32
- * @default false
33
- */
34
- instrumentAdminOps?: boolean;
35
- /**
36
- * Whether to instrument BigQuery ML (model) operations.
37
- * @default false
38
- */
39
- instrumentBqmlOps?: boolean;
40
- /**
41
- * Whether to instrument routine (stored procedure/function) operations.
42
- * @default false
43
- */
44
- instrumentRoutineOps?: boolean;
7
+ /**
8
+ * Custom tracer name (default: "autotel-plugins/bigquery").
9
+ */
10
+ tracerName?: string;
11
+ /**
12
+ * How to handle query text in spans:
13
+ * - 'never': Don't capture any query text
14
+ * - 'summary': Only capture low-cardinality summary (default)
15
+ * - 'sanitized': Sanitize by replacing literals with ?
16
+ * - 'raw': Capture raw query text (opt-in, not recommended for production)
17
+ * @default 'summary'
18
+ */
19
+ captureQueryText?: 'never' | 'summary' | 'sanitized' | 'raw';
20
+ /**
21
+ * Maximum length for captured query text. Queries longer than this will be truncated.
22
+ * @default 1000
23
+ */
24
+ maxQueryTextLength?: number;
25
+ /**
26
+ * Whether to include a hash of the query for exact matching without exposing text.
27
+ * @default true
28
+ */
29
+ includeQueryHash?: boolean;
30
+ /**
31
+ * Whether to instrument admin operations (dataset/table create, delete, metadata).
32
+ * @default false
33
+ */
34
+ instrumentAdminOps?: boolean;
35
+ /**
36
+ * Whether to instrument BigQuery ML (model) operations.
37
+ * @default false
38
+ */
39
+ instrumentBqmlOps?: boolean;
40
+ /**
41
+ * Whether to instrument routine (stored procedure/function) operations.
42
+ * @default false
43
+ */
44
+ instrumentRoutineOps?: boolean;
45
45
  }
46
46
  /**
47
47
  * Configuration options for BigQuery instrumentation.
48
48
  * Uses official BigQueryOptions for projectId and location (same semantics as the BigQuery constructor).
49
49
  * All other fields are plugin-only options.
50
50
  */
51
- type BigQueryInstrumentationConfig = Pick<BigQueryOptions, 'projectId' | 'location'> & BigQueryInstrumentationPluginOptions;
51
+ type BigQueryInstrumentationConfig = Pick<
52
+ BigQueryOptions,
53
+ 'projectId' | 'location'
54
+ > &
55
+ BigQueryInstrumentationPluginOptions;
52
56
  /**
53
57
  * Instruments BigQuery with OpenTelemetry tracing.
54
58
  *
@@ -81,15 +85,23 @@ type BigQueryInstrumentationConfig = Pick<BigQueryOptions, 'projectId' | 'locati
81
85
  * });
82
86
  * ```
83
87
  */
84
- declare function instrumentBigQuery(bigquery: BigQuery, config?: BigQueryInstrumentationConfig): BigQuery;
88
+ declare function instrumentBigQuery(
89
+ bigquery: BigQuery,
90
+ config?: BigQueryInstrumentationConfig,
91
+ ): BigQuery;
85
92
  /**
86
93
  * Legacy export for backwards compatibility.
87
94
  * @deprecated Use `instrumentBigQuery` instead.
88
95
  */
89
96
  declare class BigQueryInstrumentation {
90
- private config?;
91
- constructor(config?: BigQueryInstrumentationConfig | undefined);
92
- enable(bigquery: BigQuery): void;
97
+ private config?;
98
+ constructor(config?: BigQueryInstrumentationConfig | undefined);
99
+ enable(bigquery: BigQuery): void;
93
100
  }
94
101
 
95
- export { BigQueryInstrumentation, type BigQueryInstrumentationConfig, type BigQueryInstrumentationPluginOptions, instrumentBigQuery };
102
+ export {
103
+ BigQueryInstrumentation,
104
+ type BigQueryInstrumentationConfig,
105
+ type BigQueryInstrumentationPluginOptions,
106
+ instrumentBigQuery,
107
+ };
@@ -4,51 +4,55 @@ import { BigQueryOptions, BigQuery } from '@google-cloud/bigquery';
4
4
  * Plugin-only options for BigQuery instrumentation (not part of official BigQueryOptions).
5
5
  */
6
6
  interface BigQueryInstrumentationPluginOptions {
7
- /**
8
- * Custom tracer name (default: "autotel-plugins/bigquery").
9
- */
10
- tracerName?: string;
11
- /**
12
- * How to handle query text in spans:
13
- * - 'never': Don't capture any query text
14
- * - 'summary': Only capture low-cardinality summary (default)
15
- * - 'sanitized': Sanitize by replacing literals with ?
16
- * - 'raw': Capture raw query text (opt-in, not recommended for production)
17
- * @default 'summary'
18
- */
19
- captureQueryText?: 'never' | 'summary' | 'sanitized' | 'raw';
20
- /**
21
- * Maximum length for captured query text. Queries longer than this will be truncated.
22
- * @default 1000
23
- */
24
- maxQueryTextLength?: number;
25
- /**
26
- * Whether to include a hash of the query for exact matching without exposing text.
27
- * @default true
28
- */
29
- includeQueryHash?: boolean;
30
- /**
31
- * Whether to instrument admin operations (dataset/table create, delete, metadata).
32
- * @default false
33
- */
34
- instrumentAdminOps?: boolean;
35
- /**
36
- * Whether to instrument BigQuery ML (model) operations.
37
- * @default false
38
- */
39
- instrumentBqmlOps?: boolean;
40
- /**
41
- * Whether to instrument routine (stored procedure/function) operations.
42
- * @default false
43
- */
44
- instrumentRoutineOps?: boolean;
7
+ /**
8
+ * Custom tracer name (default: "autotel-plugins/bigquery").
9
+ */
10
+ tracerName?: string;
11
+ /**
12
+ * How to handle query text in spans:
13
+ * - 'never': Don't capture any query text
14
+ * - 'summary': Only capture low-cardinality summary (default)
15
+ * - 'sanitized': Sanitize by replacing literals with ?
16
+ * - 'raw': Capture raw query text (opt-in, not recommended for production)
17
+ * @default 'summary'
18
+ */
19
+ captureQueryText?: 'never' | 'summary' | 'sanitized' | 'raw';
20
+ /**
21
+ * Maximum length for captured query text. Queries longer than this will be truncated.
22
+ * @default 1000
23
+ */
24
+ maxQueryTextLength?: number;
25
+ /**
26
+ * Whether to include a hash of the query for exact matching without exposing text.
27
+ * @default true
28
+ */
29
+ includeQueryHash?: boolean;
30
+ /**
31
+ * Whether to instrument admin operations (dataset/table create, delete, metadata).
32
+ * @default false
33
+ */
34
+ instrumentAdminOps?: boolean;
35
+ /**
36
+ * Whether to instrument BigQuery ML (model) operations.
37
+ * @default false
38
+ */
39
+ instrumentBqmlOps?: boolean;
40
+ /**
41
+ * Whether to instrument routine (stored procedure/function) operations.
42
+ * @default false
43
+ */
44
+ instrumentRoutineOps?: boolean;
45
45
  }
46
46
  /**
47
47
  * Configuration options for BigQuery instrumentation.
48
48
  * Uses official BigQueryOptions for projectId and location (same semantics as the BigQuery constructor).
49
49
  * All other fields are plugin-only options.
50
50
  */
51
- type BigQueryInstrumentationConfig = Pick<BigQueryOptions, 'projectId' | 'location'> & BigQueryInstrumentationPluginOptions;
51
+ type BigQueryInstrumentationConfig = Pick<
52
+ BigQueryOptions,
53
+ 'projectId' | 'location'
54
+ > &
55
+ BigQueryInstrumentationPluginOptions;
52
56
  /**
53
57
  * Instruments BigQuery with OpenTelemetry tracing.
54
58
  *
@@ -81,15 +85,23 @@ type BigQueryInstrumentationConfig = Pick<BigQueryOptions, 'projectId' | 'locati
81
85
  * });
82
86
  * ```
83
87
  */
84
- declare function instrumentBigQuery(bigquery: BigQuery, config?: BigQueryInstrumentationConfig): BigQuery;
88
+ declare function instrumentBigQuery(
89
+ bigquery: BigQuery,
90
+ config?: BigQueryInstrumentationConfig,
91
+ ): BigQuery;
85
92
  /**
86
93
  * Legacy export for backwards compatibility.
87
94
  * @deprecated Use `instrumentBigQuery` instead.
88
95
  */
89
96
  declare class BigQueryInstrumentation {
90
- private config?;
91
- constructor(config?: BigQueryInstrumentationConfig | undefined);
92
- enable(bigquery: BigQuery): void;
97
+ private config?;
98
+ constructor(config?: BigQueryInstrumentationConfig | undefined);
99
+ enable(bigquery: BigQuery): void;
93
100
  }
94
101
 
95
- export { BigQueryInstrumentation, type BigQueryInstrumentationConfig, type BigQueryInstrumentationPluginOptions, instrumentBigQuery };
102
+ export {
103
+ BigQueryInstrumentation,
104
+ type BigQueryInstrumentationConfig,
105
+ type BigQueryInstrumentationPluginOptions,
106
+ instrumentBigQuery,
107
+ };