import opentracing as ot
from instana import tracer, options
import logging
import os


def hook(module):
    """ Hook method to install the Instana middleware into Flask """
    if "INSTANA_DEV" in os.environ:
        level = logging.DEBUG
    else:
        level = logging.WARN
    opts = options.Options(log_level=level)
    ot.global_tracer = tracer.InstanaTracer(opts)

@@ -168,16 +168,75 @@
 ask %22%22%22%0A
+    if os.environ%5B%22AUTOWRAPT_BOOTSTRAP%22%5D == %22runtime%22:%0A    
     if %22
@@ -263,32 +263,36 @@
 nviron:%0A        
+ 
+   
 level = logging.
@@ -297,16 +297,20 @@
 g.DEBUG%0A
+    
     else
@@ -311,32 +311,36 @@
   else:%0A        
+   
+ 
 level = logging.
@@ -344,16 +344,20 @@
 ng.WARN%0A
+    
     opts
@@ -392,16 +392,20 @@
 =level)%0A
+    
     ot.g

Add check that we really want runtime only