@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
112 lines (111 loc) • 5.02 kB
TypeScript
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import { Configuration } from "../../datadog-api-client-common/configuration";
import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http";
import { PrunedTraceResponse } from "../models/PrunedTraceResponse";
import { TraceResponse } from "../models/TraceResponse";
export declare class APMTraceApiRequestFactory extends BaseAPIRequestFactory {
getPrunedTraceByID(traceId: string, expandSpanId?: number, timeHint?: number, forceSource?: string, includePath?: Array<string>, tagInclude?: Array<string>, tagExclude?: Array<string>, onlyServiceEntrySpans?: boolean, _options?: Configuration): Promise<RequestContext>;
getTraceByID(traceId: string, includeFields?: Array<string>, _options?: Configuration): Promise<RequestContext>;
}
export declare class APMTraceApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getPrunedTraceByID
* @throws ApiException if the response code was not in [200, 299]
*/
getPrunedTraceByID(response: ResponseContext): Promise<PrunedTraceResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getTraceByID
* @throws ApiException if the response code was not in [200, 299]
*/
getTraceByID(response: ResponseContext): Promise<TraceResponse>;
}
export interface APMTraceApiGetPrunedTraceByIDRequest {
/**
* The trace ID. Accepts either a 32-character hexadecimal string (128-bit trace ID)
* or a decimal string of up to 39 digits.
* @type string
*/
traceId: string;
/**
* Span ID to expand and preserve in the pruned tree even when its branch would
* normally be summarized.
* @type number
*/
expandSpanId?: number;
/**
* Optional Unix time hint, in seconds, used to optimize the lookup of the trace
* in long-term storage.
* @type number
*/
timeHint?: number;
/**
* Force the trace to be loaded from a specific source. When unset, the API picks
* the source automatically.
* @type string
*/
forceSource?: string;
/**
* Restrict the pruned tree to spans matching the given `key:value` pairs.
* Values may be passed as repeated query parameters.
* @type Array<string>
*/
includePath?: Array<string>;
/**
* Regex patterns of tag keys whose values must be included in the pruned spans.
* Values may be passed as repeated query parameters.
* @type Array<string>
*/
tagInclude?: Array<string>;
/**
* Regex patterns of tag keys whose values must be excluded from the pruned spans.
* Values may be passed as repeated query parameters.
* @type Array<string>
*/
tagExclude?: Array<string>;
/**
* When set to `true`, only service entry spans are included in the pruned tree.
* @type boolean
*/
onlyServiceEntrySpans?: boolean;
}
export interface APMTraceApiGetTraceByIDRequest {
/**
* The trace ID. Accepts either a 32-character hexadecimal string (128-bit trace ID)
* or a decimal string of up to 39 digits.
* @type string
*/
traceId: string;
/**
* List of span fields to include in the response. When omitted, every available field is returned.
* Values may be passed as repeated query parameters or as a single comma-separated value.
* @type Array<string>
*/
includeFields?: Array<string>;
}
export declare class APMTraceApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: APMTraceApiRequestFactory, responseProcessor?: APMTraceApiResponseProcessor);
/**
* Retrieve a pruned, hierarchical view of an APM trace by its trace ID.
* The trace is summarized as a tree of spans rooted at the trace root and reduced in size
* to keep rendering large traces in the UI practical.
* This endpoint is rate limited to `60` requests per minute per organization.
* @param param The request object
*/
getPrunedTraceByID(param: APMTraceApiGetPrunedTraceByIDRequest, options?: Configuration): Promise<PrunedTraceResponse>;
/**
* Retrieve a full APM trace by its trace ID, including every span in the trace.
* Traces are returned from live storage when available and fall back to longer-term storage.
* This endpoint is rate limited to `60` requests per minute per organization.
* @param param The request object
*/
getTraceByID(param: APMTraceApiGetTraceByIDRequest, options?: Configuration): Promise<TraceResponse>;
}