@dvelop-sdk
    Preparing search index...

    Function generateTraceContext

    • 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 }

      Parameters

      • OptionaltraceId: string
      • OptionalparentId: string
      • OptionalspandId: string
      • Optionalsampled: boolean
      • Optionalversion: number

      Returns TraceContext