Skip to content

Instantly share code, notes, and snippets.

@cicorias
Last active February 18, 2022 20:43
Show Gist options
  • Save cicorias/932d1e620e6af6ed7abe2e770f924146 to your computer and use it in GitHub Desktop.
Save cicorias/932d1e620e6af6ed7abe2e770f924146 to your computer and use it in GitHub Desktop.
sending traceparent for opentelemetry in postman
const genRanHex = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
//let traceparent = "00-" + genRanHex(32) + "-00" + genRanHex(14) + "-01"
let traceparent = "00-" + genRanHex(32) + "-" + genRanHex(16) + "-01"
pm.environment.set("traceparent", traceparent)
console.warn("sent " + traceparent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment