...
 
Commits (2)
......@@ -15,8 +15,11 @@ exports.get = async (name, parentSpan = undefined) => {
const span = tracer.startSpan('get.config', { childOf: parentSpan, tags: { 'span.kind': 'server' } });
span.setTag('config.name', name);
const configName = { name };
tracer.inject(span.context(), 'text_map', configName);
logger.info(`Retrieving config file "${name}"...`);
return configServer.send('config.get', name)
return configServer.send('config.get', configName)
.then((ret) => {
logger.info(`Retrieving config file "${name}"... SUCCESS`);
logger.debug(`${JSON.stringify(ret.data)}`);
......@@ -37,7 +40,12 @@ exports.get = async (name, parentSpan = undefined) => {
.catch((err) => {
logger.info(`Retrieving config file "${name}"... FAILED`);
logger.debug(`${JSON.stringify(err)}`);
span.setTag('success', false);
span.setTag('error', true);
span.log({
event: 'error',
message: err.message,
});
span.finish();
span.finish();
return Promise.reject(err);
});
......