HTTP Header for the requestId for the request. Forward this id to make calls trackable throughout d.velop apps.
HTTP Header for the requestSignature. The requestSignature should be validated for every request when recieving calls from the d.velop cloud. Refer to the d.velop basics tenant header section for more information.
HTTP Header for the systemBaseUri for the tenant.
HTTP Header for the tenantId for the tenant.
HTTP Header used for W3C Trace Context specification.
Generates a corresponding traceparent-HTTP-Header for a TraceContext-object. See W3C Trace Context for more information.
import { buildTraceparentHeader } from "@dvelop-sdk/core"
const traceparentHeader: string = buildTraceparentHeader(traceContext);
console.log(traceparentHeader); // 00-00cbe959725ad2d75abd9d47017604d7-d84f4664cc5d1266-00
Generate a unique requestId.
import { generateRequestId } from "@dvelop-sdk/core"
const requestId: string = generateRequestId();
console.log(requestId); //ac25ae73-f4b6-477e-a5fa-877c8dea863d
Generates a new span-id and returns the string representation. See W3C Trace Context for more information.
import { generateSpanId } from "@dvelop-sdk/core";
const spanId: string = generateSpanId();
console.log(spanId); // cacc9b0efc059633
Generate a new TraceContext-object. See W3C Trace Context for more information.
import { TraceContext, generateTraceContext } from "@dvelop-sdk/core";
const traceContext: TraceContext = generateTraceContext();
console.log(traceContext); // { traceId: '14d3ce602b42d045776144889ac22065', parentId: undefined, spanId: '5afd7bd9caad89de', version: 0, sampled: false }
// can also be initialized with predefined values
const traceContext2: TraceContext = generateTraceContext("4ea7f85225da7d0acc52f7fce3db4a92", "cacc9b0efc059633");
console.log(traceContext2); //{ traceId: '4ea7f85225da7d0acc52f7fce3db4a92', parentId: 'cacc9b0efc059633', spanId: '7164846a72d30523', version: 0, sampled: false }
Generate a new trace-id in its string representation. See W3C Trace Context for more information.
import { generateTraceId } from "@dvelop-sdk/core";
const traceId: string = generateTraceId();
console.log(traceId); // 4ea7f85225da7d0acc52f7fce3db4a92
Generate a unique Version 4 UUID.
import { generateUuid } from "@dvelop-sdk/core"
const uuid: string = generateUuid();
console.log(uuid); //ac25ae73-f4b6-477e-a5fa-877c8dea863d
Parses the traceparent-HTTP-header into a TraceContext-object. See W3C Trace Context for more information.
import { parseTraceparentHeader } from "@dvelop-sdk/core";
const traceContext: TraceContext = parseTraceparentHeader("00-00cbe959725ad2d75abd9d47017604d7-d84f4664cc5d1266-00")
console.log(traceContext); // { traceId: '00cbe959725ad2d75abd9d47017604d7', spanId: '48743343d1130693', parentId: 'd84f4664cc5d1266', sampled: false, version: 0 }
Generated using TypeDoc
@dvelop-sdk/core
This package contains shared functionality for the @dvelop-sdk packages.
Explore the docs » Install via npm » Check us out on GitHub »