2021-02-02 22:26:55 -08:00
|
|
|
import beeline from "honeycomb-beeline";
|
2020-08-16 23:28:41 -07:00
|
|
|
|
2020-09-01 01:13:03 -07:00
|
|
|
const beelinePlugin = {
|
2020-08-16 23:28:41 -07:00
|
|
|
requestDidStart() {
|
|
|
|
const trace = beeline.startTrace();
|
|
|
|
return {
|
|
|
|
didResolveOperation({ operationName }) {
|
2020-08-17 01:16:35 -07:00
|
|
|
beeline.addContext({
|
|
|
|
name: operationName,
|
|
|
|
operation_name: operationName,
|
|
|
|
});
|
2020-08-16 23:28:41 -07:00
|
|
|
},
|
|
|
|
willSendResponse() {
|
|
|
|
beeline.finishTrace(trace);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
};
|
2020-09-01 01:13:03 -07:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
beelinePlugin,
|
|
|
|
};
|