@latitude-data/telemetry 0.0.4 → 1.0.1
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/LICENSE.md +21 -0
- package/README.md +52 -0
- package/dist/index.cjs +1989 -423
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +319 -132
- package/dist/index.js +1971 -424
- package/dist/index.js.map +1 -1
- package/package.json +59 -50
- package/LICENSE +0 -157
package/dist/index.d.ts
CHANGED
|
@@ -1,152 +1,339 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import * as otel from '@opentelemetry/api';
|
|
2
|
+
import { TextMapPropagator } from '@opentelemetry/api';
|
|
3
|
+
import { SpanProcessor, ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
4
|
+
import * as latitude from '@latitude-data/sdk';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
6
7
|
import * as anthropic from '@anthropic-ai/sdk';
|
|
7
|
-
import * as azure from '@azure/openai';
|
|
8
|
-
import * as cohere from 'cohere-ai';
|
|
9
8
|
import * as bedrock from '@aws-sdk/client-bedrock-runtime';
|
|
9
|
+
import * as azure from '@azure/openai';
|
|
10
10
|
import * as aiplatform from '@google-cloud/aiplatform';
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
11
|
+
import * as vertexai from '@google-cloud/vertexai';
|
|
12
|
+
import * as langchain_runnables from '@langchain/core/runnables';
|
|
13
|
+
import * as langchain_vectorstores from '@langchain/core/vectorstores';
|
|
14
|
+
import * as cohere from 'cohere-ai';
|
|
15
|
+
import * as langchain_agents from 'langchain/agents';
|
|
16
|
+
import * as langchain_chains from 'langchain/chains';
|
|
17
|
+
import * as langchain_tools from 'langchain/tools';
|
|
18
18
|
import * as llamaindex from 'llamaindex';
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
19
|
+
import * as openai from 'openai';
|
|
20
|
+
import * as togetherai from 'together-ai';
|
|
21
21
|
|
|
22
|
-
interface
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
interface RedactSpanProcessorOptions {
|
|
23
|
+
attributes: (string | RegExp)[];
|
|
24
|
+
mask?: (attribute: string, value: any) => string;
|
|
25
25
|
}
|
|
26
|
-
declare class
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
declare class RedactSpanProcessor implements SpanProcessor {
|
|
27
|
+
private options;
|
|
28
|
+
constructor(options: RedactSpanProcessorOptions);
|
|
29
|
+
onStart(_span: ReadableSpan, _context: otel.Context): void;
|
|
30
|
+
onEnd(span: ReadableSpan): void;
|
|
31
|
+
forceFlush(): Promise<void>;
|
|
31
32
|
shutdown(): Promise<void>;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
send(spans: ReadableSpan[], onSuccess: () => void, onError: (error: Error) => void): Promise<void>;
|
|
35
|
-
convert(spans: ReadableSpan[]): {
|
|
36
|
-
resourceSpans: {
|
|
37
|
-
resource: {
|
|
38
|
-
attributes: {
|
|
39
|
-
key: string;
|
|
40
|
-
value: {
|
|
41
|
-
stringValue?: string;
|
|
42
|
-
intValue?: number;
|
|
43
|
-
boolValue?: boolean;
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
47
|
-
scopeSpans: {
|
|
48
|
-
spans: {
|
|
49
|
-
traceId: string;
|
|
50
|
-
spanId: string;
|
|
51
|
-
parentSpanId: string | undefined;
|
|
52
|
-
name: string;
|
|
53
|
-
kind: _opentelemetry_api.SpanKind;
|
|
54
|
-
startTimeUnixNano: string;
|
|
55
|
-
endTimeUnixNano: string | undefined;
|
|
56
|
-
attributes: {
|
|
57
|
-
key: string;
|
|
58
|
-
value: {
|
|
59
|
-
stringValue?: string;
|
|
60
|
-
intValue?: number;
|
|
61
|
-
boolValue?: boolean;
|
|
62
|
-
};
|
|
63
|
-
}[];
|
|
64
|
-
status: {
|
|
65
|
-
code: _opentelemetry_api.SpanStatusCode;
|
|
66
|
-
message: string | undefined;
|
|
67
|
-
};
|
|
68
|
-
events: {
|
|
69
|
-
timeUnixNano: string;
|
|
70
|
-
name: string;
|
|
71
|
-
attributes: {
|
|
72
|
-
key: string;
|
|
73
|
-
value: {
|
|
74
|
-
stringValue?: string;
|
|
75
|
-
intValue?: number;
|
|
76
|
-
boolValue?: boolean;
|
|
77
|
-
};
|
|
78
|
-
}[];
|
|
79
|
-
}[];
|
|
80
|
-
links: {
|
|
81
|
-
traceId: string;
|
|
82
|
-
spanId: string;
|
|
83
|
-
attributes: {
|
|
84
|
-
key: string;
|
|
85
|
-
value: {
|
|
86
|
-
stringValue?: string;
|
|
87
|
-
intValue?: number;
|
|
88
|
-
boolValue?: boolean;
|
|
89
|
-
};
|
|
90
|
-
}[];
|
|
91
|
-
}[];
|
|
92
|
-
}[];
|
|
93
|
-
}[];
|
|
94
|
-
}[];
|
|
95
|
-
};
|
|
96
|
-
getDefaultUrl(config: any): string;
|
|
97
|
-
private get __defaultUrl();
|
|
98
|
-
private convertAttributes;
|
|
99
|
-
private convertAttributeValue;
|
|
33
|
+
private shouldRedact;
|
|
34
|
+
private redactAttributes;
|
|
100
35
|
}
|
|
36
|
+
declare const DEFAULT_REDACT_SPAN_PROCESSOR: () => RedactSpanProcessor;
|
|
101
37
|
|
|
102
|
-
declare
|
|
103
|
-
|
|
38
|
+
declare const traceContextSchema: z.ZodObject<{
|
|
39
|
+
traceparent: z.ZodString;
|
|
40
|
+
tracestate: z.ZodOptional<z.ZodString>;
|
|
41
|
+
baggage: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
traceparent: string;
|
|
44
|
+
tracestate?: string | undefined;
|
|
45
|
+
baggage?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
traceparent: string;
|
|
48
|
+
tracestate?: string | undefined;
|
|
49
|
+
baggage?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
type TraceContext = z.infer<typeof traceContextSchema>;
|
|
52
|
+
type TraceBaggage = {
|
|
53
|
+
segment: Pick<SegmentBaggage, 'id' | 'parentId'>;
|
|
54
|
+
segments: (SegmentBaggage & Pick<TraceContext, 'traceparent' | 'tracestate'> & {
|
|
55
|
+
paused?: boolean;
|
|
56
|
+
})[];
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare enum SegmentSource {
|
|
60
|
+
API = "api",
|
|
61
|
+
Playground = "playground",
|
|
62
|
+
Evaluation = "evaluation",// Note: from prompts of llm evaluations
|
|
63
|
+
Experiment = "experiment",
|
|
64
|
+
User = "user",
|
|
65
|
+
SharedPrompt = "shared_prompt",
|
|
66
|
+
AgentAsTool = "agent_as_tool",// TODO(tracing): deprecated, use SegmentType.Document with DocumentType.Agent instead
|
|
67
|
+
EmailTrigger = "email_trigger",
|
|
68
|
+
ScheduledTrigger = "scheduled_trigger"
|
|
104
69
|
}
|
|
105
|
-
declare
|
|
106
|
-
|
|
70
|
+
declare enum SegmentType {
|
|
71
|
+
Document = "document",
|
|
72
|
+
Step = "step"
|
|
107
73
|
}
|
|
74
|
+
declare const segmentBaggageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
77
|
+
source: z.ZodNativeEnum<typeof SegmentSource>;
|
|
78
|
+
}, {
|
|
79
|
+
type: z.ZodLiteral<SegmentType.Document>;
|
|
80
|
+
data: z.ZodObject<{
|
|
81
|
+
logUuid: z.ZodOptional<z.ZodString>;
|
|
82
|
+
commitUuid: z.ZodString;
|
|
83
|
+
documentUuid: z.ZodString;
|
|
84
|
+
experimentUuid: z.ZodOptional<z.ZodString>;
|
|
85
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
commitUuid: string;
|
|
88
|
+
documentUuid: string;
|
|
89
|
+
logUuid?: string | undefined;
|
|
90
|
+
experimentUuid?: string | undefined;
|
|
91
|
+
externalId?: string | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
commitUuid: string;
|
|
94
|
+
documentUuid: string;
|
|
95
|
+
logUuid?: string | undefined;
|
|
96
|
+
experimentUuid?: string | undefined;
|
|
97
|
+
externalId?: string | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
}>, "strip", z.ZodTypeAny, {
|
|
100
|
+
id: string;
|
|
101
|
+
type: SegmentType.Document;
|
|
102
|
+
data: {
|
|
103
|
+
commitUuid: string;
|
|
104
|
+
documentUuid: string;
|
|
105
|
+
logUuid?: string | undefined;
|
|
106
|
+
experimentUuid?: string | undefined;
|
|
107
|
+
externalId?: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
source: SegmentSource;
|
|
110
|
+
parentId?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
id: string;
|
|
113
|
+
type: SegmentType.Document;
|
|
114
|
+
data: {
|
|
115
|
+
commitUuid: string;
|
|
116
|
+
documentUuid: string;
|
|
117
|
+
logUuid?: string | undefined;
|
|
118
|
+
experimentUuid?: string | undefined;
|
|
119
|
+
externalId?: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
source: SegmentSource;
|
|
122
|
+
parentId?: string | undefined;
|
|
123
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
126
|
+
source: z.ZodNativeEnum<typeof SegmentSource>;
|
|
127
|
+
}, {
|
|
128
|
+
type: z.ZodLiteral<SegmentType.Step>;
|
|
129
|
+
data: z.ZodOptional<z.ZodUndefined>;
|
|
130
|
+
}>, "strip", z.ZodTypeAny, {
|
|
131
|
+
id: string;
|
|
132
|
+
type: SegmentType.Step;
|
|
133
|
+
source: SegmentSource;
|
|
134
|
+
data?: undefined;
|
|
135
|
+
parentId?: string | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
id: string;
|
|
138
|
+
type: SegmentType.Step;
|
|
139
|
+
source: SegmentSource;
|
|
140
|
+
data?: undefined;
|
|
141
|
+
parentId?: string | undefined;
|
|
142
|
+
}>]>;
|
|
143
|
+
type SegmentBaggage<T extends SegmentType = SegmentType> = Extract<z.infer<typeof segmentBaggageSchema>, {
|
|
144
|
+
type: T;
|
|
145
|
+
}>;
|
|
108
146
|
|
|
109
|
-
type
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
azureOpenAI?: typeof azure;
|
|
113
|
-
cohere?: typeof cohere;
|
|
114
|
-
bedrock?: typeof bedrock;
|
|
115
|
-
google_vertexai?: typeof vertexAI;
|
|
116
|
-
google_aiplatform?: typeof aiplatform;
|
|
117
|
-
pinecone?: typeof pinecone;
|
|
118
|
-
langchain?: {
|
|
119
|
-
chainsModule?: typeof ChainsModule;
|
|
120
|
-
agentsModule?: typeof AgentsModule;
|
|
121
|
-
toolsModule?: typeof ToolsModule;
|
|
122
|
-
runnablesModule?: typeof RunnableModule;
|
|
123
|
-
vectorStoreModule?: typeof VectorStoreModule;
|
|
124
|
-
};
|
|
125
|
-
llamaIndex?: typeof llamaindex;
|
|
126
|
-
chromadb?: typeof chromadb;
|
|
127
|
-
qdrant?: typeof qdrant;
|
|
147
|
+
type LatitudeInstrumentationOptions = {
|
|
148
|
+
module: typeof latitude.Latitude;
|
|
149
|
+
completions?: boolean;
|
|
128
150
|
};
|
|
129
|
-
|
|
151
|
+
|
|
152
|
+
type StartSpanOptions = {
|
|
130
153
|
name?: string;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
154
|
+
attributes?: otel.Attributes;
|
|
155
|
+
};
|
|
156
|
+
type EndSpanOptions = {
|
|
157
|
+
attributes?: otel.Attributes;
|
|
158
|
+
};
|
|
159
|
+
type ErrorOptions = {
|
|
160
|
+
attributes?: otel.Attributes;
|
|
161
|
+
};
|
|
162
|
+
type StartToolSpanOptions = StartSpanOptions & {
|
|
163
|
+
name: string;
|
|
164
|
+
call: {
|
|
165
|
+
id: string;
|
|
166
|
+
arguments: Record<string, unknown>;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
type EndToolSpanOptions = EndSpanOptions & {
|
|
170
|
+
result: {
|
|
171
|
+
value: unknown;
|
|
172
|
+
isError: boolean;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
type StartCompletionSpanOptions = StartSpanOptions & {
|
|
176
|
+
provider: string;
|
|
177
|
+
model: string;
|
|
178
|
+
configuration: Record<string, unknown>;
|
|
179
|
+
input: Record<string, unknown>[];
|
|
180
|
+
};
|
|
181
|
+
type EndCompletionSpanOptions = EndSpanOptions & {
|
|
182
|
+
output: Record<string, unknown>[];
|
|
183
|
+
tokens: {
|
|
184
|
+
prompt: number;
|
|
185
|
+
cached: number;
|
|
186
|
+
reasoning: number;
|
|
187
|
+
completion: number;
|
|
136
188
|
};
|
|
137
|
-
|
|
189
|
+
finishReason: string;
|
|
138
190
|
};
|
|
139
|
-
type
|
|
140
|
-
|
|
141
|
-
|
|
191
|
+
type StartHttpSpanOptions = StartSpanOptions & {
|
|
192
|
+
request: {
|
|
193
|
+
method: string;
|
|
194
|
+
url: string;
|
|
195
|
+
headers: Record<string, string>;
|
|
196
|
+
body: string | Record<string, unknown>;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
type EndHttpSpanOptions = EndSpanOptions & {
|
|
200
|
+
response: {
|
|
201
|
+
status: number;
|
|
202
|
+
headers: Record<string, string>;
|
|
203
|
+
body: string | Record<string, unknown>;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
type SegmentOptions = {
|
|
207
|
+
attributes?: otel.Attributes;
|
|
208
|
+
baggage?: Record<string, otel.BaggageEntry>;
|
|
209
|
+
_internal?: {
|
|
210
|
+
id?: string;
|
|
211
|
+
source?: SegmentSource;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
type PromptSegmentOptions = SegmentOptions & {
|
|
215
|
+
logUuid?: string;
|
|
216
|
+
versionUuid?: string;
|
|
217
|
+
promptUuid: string;
|
|
218
|
+
experimentUuid?: string;
|
|
219
|
+
externalId?: string;
|
|
220
|
+
template: string;
|
|
221
|
+
parameters?: Record<string, unknown>;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
type TelemetryContext = otel.Context;
|
|
225
|
+
declare const BACKGROUND: () => otel.Context;
|
|
226
|
+
declare class ScopedTracerProvider implements otel.TracerProvider {
|
|
227
|
+
private readonly scope;
|
|
228
|
+
private readonly version;
|
|
229
|
+
private readonly provider;
|
|
230
|
+
constructor(scope: string, version: string, provider: otel.TracerProvider);
|
|
231
|
+
getTracer(_name: string, _version?: string, options?: otel.TracerOptions): otel.Tracer;
|
|
232
|
+
}
|
|
233
|
+
declare const DEFAULT_SPAN_EXPORTER: (apiKey: string) => OTLPTraceExporter;
|
|
234
|
+
declare enum Instrumentation {
|
|
235
|
+
Latitude = "latitude",
|
|
236
|
+
OpenAI = "openai",
|
|
237
|
+
Anthropic = "anthropic",
|
|
238
|
+
AzureOpenAI = "azure",
|
|
239
|
+
VercelAI = "vercelai",
|
|
240
|
+
VertexAI = "vertexai",
|
|
241
|
+
AIPlatform = "aiplatform",
|
|
242
|
+
Bedrock = "bedrock",
|
|
243
|
+
TogetherAI = "togetherai",
|
|
244
|
+
Cohere = "cohere",
|
|
245
|
+
Langchain = "langchain",
|
|
246
|
+
LlamaIndex = "llamaindex"
|
|
247
|
+
}
|
|
248
|
+
type TelemetryOptions = {
|
|
249
|
+
instrumentations?: {
|
|
250
|
+
[Instrumentation.Latitude]?: typeof latitude.Latitude | LatitudeInstrumentationOptions;
|
|
251
|
+
[Instrumentation.OpenAI]?: typeof openai.OpenAI;
|
|
252
|
+
[Instrumentation.Anthropic]?: typeof anthropic;
|
|
253
|
+
[Instrumentation.AzureOpenAI]?: typeof azure;
|
|
254
|
+
[Instrumentation.VercelAI]?: 'manual';
|
|
255
|
+
[Instrumentation.VertexAI]?: typeof vertexai;
|
|
256
|
+
[Instrumentation.AIPlatform]?: typeof aiplatform;
|
|
257
|
+
[Instrumentation.Bedrock]?: typeof bedrock;
|
|
258
|
+
[Instrumentation.TogetherAI]?: typeof togetherai.Together;
|
|
259
|
+
[Instrumentation.Cohere]?: typeof cohere;
|
|
260
|
+
[Instrumentation.Langchain]?: {
|
|
261
|
+
chainsModule: typeof langchain_chains;
|
|
262
|
+
agentsModule: typeof langchain_agents;
|
|
263
|
+
toolsModule: typeof langchain_tools;
|
|
264
|
+
vectorStoreModule: typeof langchain_vectorstores;
|
|
265
|
+
runnablesModule: typeof langchain_runnables;
|
|
266
|
+
};
|
|
267
|
+
[Instrumentation.LlamaIndex]?: typeof llamaindex;
|
|
268
|
+
};
|
|
142
269
|
disableBatch?: boolean;
|
|
143
|
-
|
|
270
|
+
exporter?: SpanExporter;
|
|
271
|
+
processors?: SpanProcessor[];
|
|
272
|
+
propagators?: TextMapPropagator[];
|
|
144
273
|
};
|
|
145
|
-
declare class
|
|
146
|
-
private
|
|
147
|
-
|
|
148
|
-
private
|
|
149
|
-
|
|
274
|
+
declare class LatitudeTelemetry {
|
|
275
|
+
private options;
|
|
276
|
+
private provider;
|
|
277
|
+
private telemetry;
|
|
278
|
+
private instrumentations;
|
|
279
|
+
constructor(apiKey: string, options?: TelemetryOptions);
|
|
280
|
+
flush(): Promise<void>;
|
|
281
|
+
shutdown(): Promise<void>;
|
|
282
|
+
tracerProvider(instrumentation: Instrumentation): ScopedTracerProvider;
|
|
283
|
+
tracer(instrumentation: Instrumentation): otel.Tracer;
|
|
284
|
+
private initInstrumentations;
|
|
285
|
+
instrument(): void;
|
|
286
|
+
uninstrument(): void;
|
|
287
|
+
baggage(ctx: otel.Context | TraceContext): TraceBaggage | undefined;
|
|
288
|
+
pause(ctx: otel.Context): {
|
|
289
|
+
traceparent: string;
|
|
290
|
+
tracestate?: string | undefined;
|
|
291
|
+
baggage?: string | undefined;
|
|
292
|
+
};
|
|
293
|
+
resume(ctx: TraceContext): otel.Context;
|
|
294
|
+
restored(ctx: otel.Context): boolean;
|
|
295
|
+
restore(ctx: otel.Context): otel.Context;
|
|
296
|
+
tool(ctx: otel.Context, options: StartToolSpanOptions): {
|
|
297
|
+
context: otel.Context;
|
|
298
|
+
end: (options: EndToolSpanOptions) => void;
|
|
299
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
300
|
+
};
|
|
301
|
+
completion(ctx: otel.Context, options: StartCompletionSpanOptions): {
|
|
302
|
+
context: otel.Context;
|
|
303
|
+
end: (options: EndCompletionSpanOptions) => void;
|
|
304
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
305
|
+
};
|
|
306
|
+
embedding(ctx: otel.Context, options?: StartSpanOptions): {
|
|
307
|
+
context: otel.Context;
|
|
308
|
+
end: (_options?: EndSpanOptions) => void;
|
|
309
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
310
|
+
};
|
|
311
|
+
retrieval(ctx: otel.Context, options?: StartSpanOptions): {
|
|
312
|
+
context: otel.Context;
|
|
313
|
+
end: (_options?: EndSpanOptions) => void;
|
|
314
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
315
|
+
};
|
|
316
|
+
reranking(ctx: otel.Context, options?: StartSpanOptions): {
|
|
317
|
+
context: otel.Context;
|
|
318
|
+
end: (_options?: EndSpanOptions) => void;
|
|
319
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
320
|
+
};
|
|
321
|
+
http(ctx: otel.Context, options: StartHttpSpanOptions): {
|
|
322
|
+
context: otel.Context;
|
|
323
|
+
end: (options: EndHttpSpanOptions) => void;
|
|
324
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
325
|
+
};
|
|
326
|
+
prompt(ctx: otel.Context, options: PromptSegmentOptions): {
|
|
327
|
+
context: otel.Context;
|
|
328
|
+
end: (_options?: EndSpanOptions) => void;
|
|
329
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
330
|
+
};
|
|
331
|
+
step(ctx: otel.Context, options?: SegmentOptions): {
|
|
332
|
+
context: otel.Context;
|
|
333
|
+
end: (_options?: EndSpanOptions) => void;
|
|
334
|
+
fail: (_error: Error, _options?: ErrorOptions) => void;
|
|
335
|
+
};
|
|
150
336
|
}
|
|
151
337
|
|
|
152
|
-
export {
|
|
338
|
+
export { BACKGROUND, DEFAULT_REDACT_SPAN_PROCESSOR, DEFAULT_SPAN_EXPORTER, Instrumentation, LatitudeTelemetry, RedactSpanProcessor };
|
|
339
|
+
export type { EndCompletionSpanOptions, EndHttpSpanOptions, EndSpanOptions, EndToolSpanOptions, ErrorOptions, PromptSegmentOptions, RedactSpanProcessorOptions, SegmentOptions, StartCompletionSpanOptions, StartHttpSpanOptions, StartSpanOptions, StartToolSpanOptions, TelemetryContext, TelemetryOptions };
|