public static void generateInvocationIdIfNecessary ( final TraceeBackend backend ) { if ( backend != null && ! backend . containsKey ( TraceeConstants . INVOCATION_ID_KEY ) && backend . getConfiguration ( ) . shouldGenerateInvocationId ( ) ) { backend . put ( TraceeConstants . INVOCATION_ID_KEY , Utilities . createRandomAlphanumeric ( backend . getConfiguration ( ) . generatedInvocationIdLength ( ) ) ) ; } }
Generate invocation id if it doesn t exist in TraceeBackend and configuration asks for one