Created
July 23, 2019 20:19
-
-
Save eyeezzi/0a97395a6ce547aa58892df3985cddae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* user-simulator */ | |
async function whereami() => { | |
const span = tracer.startSpan('whereami-request') | |
const location = await axios.get(`${process.env.API_SERVER_ADDRESS}/whereami`, { | |
headers: getCarrier(span, tracer) | |
}) | |
span.finish() | |
}) | |
function getCarrier(span, tracer) { | |
const carrier = {} | |
tracer.inject(span.context(), opentracing.FORMAT_HTTP_HEADERS, carrier) | |
return carrier | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment