import { merge } from 'lodash' ; import { INDEXING_DELAY } from '../../constants' ; export const createTransactionMetric = ( override ) => { const now = Date . now ( ) ; const time = now - INDEXING_DELAY ; return merge ( { '@timestamp' : new Date ( time ) . toISOString ( ) , service : { name : 'opbeans-go' , } , event : { outcome : 'success' , } , transaction : { duration : { histogram : { values : [ 1000000 ] , counts : [ 1 ] , } , } , type : 'request' , } , processor : { event : 'metric' , } , observer : { version_major : 7 , } , } , override ) ; } ;