@stainlessdev/xray-core 0.3.1 → 0.4.0-branch.bg-rework-exporters.2fa33ac
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/dist/index.cjs +32 -112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +33 -115
- package/dist/index.js.map +1 -1
- package/dist/internal.d.cts +2 -1
- package/dist/internal.d.ts +2 -1
- package/dist/{types-D3Vzw_TA.d.cts → types-BA4cE85r.d.cts} +10 -8
- package/dist/{types-D3Vzw_TA.d.ts → types-BA4cE85r.d.ts} +10 -8
- package/package.json +1 -3
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { C as CapturedBody, b as Logger, L as LogLevel, d as XrayContext, e as CaptureConfig, f as RedactionConfig } from './types-
|
|
1
|
+
import { C as CapturedBody, b as Logger, L as LogLevel, d as XrayContext, e as CaptureConfig, f as RedactionConfig } from './types-BA4cE85r.js';
|
|
2
|
+
import '@opentelemetry/sdk-trace-base';
|
|
2
3
|
|
|
3
4
|
declare function makeCapturedBody(bytes: Uint8Array | undefined, totalBytes: number, truncated: boolean, mode: 'text' | 'base64'): CapturedBody | undefined;
|
|
4
5
|
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import * as _opentelemetry_sdk_trace_base from '@opentelemetry/sdk-trace-base';
|
|
2
|
+
|
|
1
3
|
interface ExporterConfig {
|
|
2
|
-
|
|
3
|
-
endpointUrl?: string;
|
|
4
|
+
endpointUrl: string;
|
|
4
5
|
headers?: Record<string, string>;
|
|
5
6
|
timeoutMs: number;
|
|
6
7
|
spanProcessor: 'simple' | 'batch';
|
|
7
|
-
sampler: {
|
|
8
|
-
type: 'always_on' | 'always_off' | 'ratio';
|
|
9
|
-
ratio?: number;
|
|
10
|
-
};
|
|
11
8
|
}
|
|
12
9
|
interface CaptureConfig {
|
|
13
10
|
requestHeaders: boolean;
|
|
@@ -43,6 +40,11 @@ interface XrayConfig {
|
|
|
43
40
|
requestId?: Partial<RequestIdConfig>;
|
|
44
41
|
route?: Partial<RouteConfig>;
|
|
45
42
|
}
|
|
43
|
+
type XrayRuntimeConfig = Omit<XrayConfig, 'exporter'> & {
|
|
44
|
+
exporter?: Partial<ExporterConfig> & {
|
|
45
|
+
instance?: _opentelemetry_sdk_trace_base.SpanExporter;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
46
48
|
interface ResolvedXrayConfig {
|
|
47
49
|
serviceName: string;
|
|
48
50
|
environment?: string;
|
|
@@ -56,7 +58,7 @@ interface ResolvedXrayConfig {
|
|
|
56
58
|
route: RouteConfig;
|
|
57
59
|
}
|
|
58
60
|
declare class XrayConfigError extends Error {
|
|
59
|
-
code: 'INVALID_CONFIG' | '
|
|
61
|
+
code: 'INVALID_CONFIG' | 'INVALID_REDACTION';
|
|
60
62
|
constructor(code: XrayConfigError['code'], message: string);
|
|
61
63
|
}
|
|
62
64
|
declare function normalizeConfig(config: XrayConfig): ResolvedXrayConfig;
|
|
@@ -133,4 +135,4 @@ interface XrayEmitter {
|
|
|
133
135
|
shutdown(): Promise<void>;
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
export { type AttributeValue as A, type CapturedBody as C, type ExporterConfig as E, type LogLevel as L, type NormalizedRequest as N, type RequestLog as R, type XrayConfig as X, type XrayEmitter as a, type Logger as b, type NormalizedResponse as c, type XrayContext as d, type CaptureConfig as e, type RedactionConfig as f, type RequestIdConfig as g, type ResolvedXrayConfig as h, type RouteConfig as i,
|
|
138
|
+
export { type AttributeValue as A, type CapturedBody as C, type ExporterConfig as E, type LogLevel as L, type NormalizedRequest as N, type RequestLog as R, type XrayConfig as X, type XrayEmitter as a, type Logger as b, type NormalizedResponse as c, type XrayContext as d, type CaptureConfig as e, type RedactionConfig as f, type RequestIdConfig as g, type ResolvedXrayConfig as h, type RouteConfig as i, type XrayRuntimeConfig as j, XrayConfigError as k, normalizeConfig as n };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import * as _opentelemetry_sdk_trace_base from '@opentelemetry/sdk-trace-base';
|
|
2
|
+
|
|
1
3
|
interface ExporterConfig {
|
|
2
|
-
|
|
3
|
-
endpointUrl?: string;
|
|
4
|
+
endpointUrl: string;
|
|
4
5
|
headers?: Record<string, string>;
|
|
5
6
|
timeoutMs: number;
|
|
6
7
|
spanProcessor: 'simple' | 'batch';
|
|
7
|
-
sampler: {
|
|
8
|
-
type: 'always_on' | 'always_off' | 'ratio';
|
|
9
|
-
ratio?: number;
|
|
10
|
-
};
|
|
11
8
|
}
|
|
12
9
|
interface CaptureConfig {
|
|
13
10
|
requestHeaders: boolean;
|
|
@@ -43,6 +40,11 @@ interface XrayConfig {
|
|
|
43
40
|
requestId?: Partial<RequestIdConfig>;
|
|
44
41
|
route?: Partial<RouteConfig>;
|
|
45
42
|
}
|
|
43
|
+
type XrayRuntimeConfig = Omit<XrayConfig, 'exporter'> & {
|
|
44
|
+
exporter?: Partial<ExporterConfig> & {
|
|
45
|
+
instance?: _opentelemetry_sdk_trace_base.SpanExporter;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
46
48
|
interface ResolvedXrayConfig {
|
|
47
49
|
serviceName: string;
|
|
48
50
|
environment?: string;
|
|
@@ -56,7 +58,7 @@ interface ResolvedXrayConfig {
|
|
|
56
58
|
route: RouteConfig;
|
|
57
59
|
}
|
|
58
60
|
declare class XrayConfigError extends Error {
|
|
59
|
-
code: 'INVALID_CONFIG' | '
|
|
61
|
+
code: 'INVALID_CONFIG' | 'INVALID_REDACTION';
|
|
60
62
|
constructor(code: XrayConfigError['code'], message: string);
|
|
61
63
|
}
|
|
62
64
|
declare function normalizeConfig(config: XrayConfig): ResolvedXrayConfig;
|
|
@@ -133,4 +135,4 @@ interface XrayEmitter {
|
|
|
133
135
|
shutdown(): Promise<void>;
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
export { type AttributeValue as A, type CapturedBody as C, type ExporterConfig as E, type LogLevel as L, type NormalizedRequest as N, type RequestLog as R, type XrayConfig as X, type XrayEmitter as a, type Logger as b, type NormalizedResponse as c, type XrayContext as d, type CaptureConfig as e, type RedactionConfig as f, type RequestIdConfig as g, type ResolvedXrayConfig as h, type RouteConfig as i,
|
|
138
|
+
export { type AttributeValue as A, type CapturedBody as C, type ExporterConfig as E, type LogLevel as L, type NormalizedRequest as N, type RequestLog as R, type XrayConfig as X, type XrayEmitter as a, type Logger as b, type NormalizedResponse as c, type XrayContext as d, type CaptureConfig as e, type RedactionConfig as f, type RequestIdConfig as g, type ResolvedXrayConfig as h, type RouteConfig as i, type XrayRuntimeConfig as j, XrayConfigError as k, normalizeConfig as n };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainlessdev/xray-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-branch.bg-rework-exporters.2fa33ac",
|
|
4
4
|
"description": "Core instrumentation for Stainless X-ray request logging",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@opentelemetry/api": "^1.9.0",
|
|
29
29
|
"@opentelemetry/core": "^2.2.0",
|
|
30
|
-
"@opentelemetry/otlp-transformer": "^0.208.0",
|
|
31
30
|
"@opentelemetry/resources": "^2.2.0",
|
|
32
31
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
33
32
|
"@opentelemetry/semantic-conventions": "^1.29.0",
|
|
@@ -40,7 +39,6 @@
|
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"@opentelemetry/api": "^1.9.0",
|
|
42
41
|
"@opentelemetry/core": "^2.2.0",
|
|
43
|
-
"@opentelemetry/otlp-transformer": "^0.208.0",
|
|
44
42
|
"@opentelemetry/resources": "^2.2.0",
|
|
45
43
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
46
44
|
"@opentelemetry/semantic-conventions": "^1.29.0"
|