constructor({ version = Traceparent.W3C_TRACEPARENT_VERSION, traceId, parentId, flags }) {
    if (version !== Traceparent.W3C_TRACEPARENT_VERSION || version.toLowerCase() === 'ff') {
      throw Error(`only w3c version ${Traceparent.W3C_TRACEPARENT_VERSION} is supported, found ${version}`)
    }
    if (this.#isValidTraceId(traceId) === false) {
      throw Error(`received invalid trace id: ${traceId}`)
    }
    if (this.#isValidParentId(parentId) === false) {
      throw Error(`received invalid parent id: ${parentId}`)
    }
    if (this.#isValidFlags(flags) === false) {
      throw Error(`received invalid flags: ${flags}`)
    }

    Object.defineProperties(this, {
      version: {
        enumerable: true,
        value: version
      },
      traceId: {
        enumerable: true,
        value: traceId
      },
      parentId: {
        enumerable: true,
        value: parentId
      },
      flags: {
        enumerable: true,
        value: flags
      }
    })

    this.#flagBits = parseInt(flags, 16)
  }
Parses a W3C traceparent header into an object representation.

@link https://www.w3.org/TR/trace-context/#traceparent-header

@property {string} version Traceparent spec version parsed from the header.
@property {string} traceId Trace identifier from the header.
@property {string} parentId Span identifier from the header.
@property {string} flags Flags as parsed from the header.