static fromHeader(header) {
    if (typeof header !== 'string') {
      throw Error('header value must be a string')
    }

    const parts = header.trim().split('-')
    if (parts.length !== 4) {
      throw Error(`traceparent header should have 4 parts, found ${parts.length}`)
    }

    const [version, traceId, parentId, flags] = parts
    return new Traceparent({ version, traceId, parentId, flags })
  }
Constructs a new instance from a header value.

@param {string} header The traceparent header value to parse.

@throws {Error} if any part of the header is invalid