-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
22 lines (19 loc) · 734 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Span } from "@opencensus/core";
export enum CanonicalType {
HTTP = 'http',
}
export interface TypedSpan extends Span {
type: CanonicalType;
mandatoryAttributes: string[];
}
export interface HTTPClientTypedSpan extends TypedSpan {
setMethod(method: string): HTTPClientTypedSpan;
setHost(host: string): HTTPClientTypedSpan;
setPath(path: string): HTTPClientTypedSpan;
setStatusCode(statuscode: number): HTTPClientTypedSpan;
setRoute(route: string): HTTPClientTypedSpan;
setUserAgent(agent: string): HTTPClientTypedSpan;
setRequestParameters(parameters: string): HTTPClientTypedSpan;
setRequestHeaders(headers: string): HTTPClientTypedSpan;
setResponseHeaders(headers: string): HTTPClientTypedSpan;
}