code: def _before_request(self):
          
          # Do not trace if the url is blacklisted
          if utils.disable_tracing_url(flask.request.url, self.blacklist_paths):
              return
  
          try:
              span_context = self.propagator.from_headers(flask.request.headers)
  
              tracer = tracer_module.Tracer(
                  span_context=span_context,
                  sampler=self.sampler,
                  exporter=self.exporter,
                  propagator=self.propagator)
  
              span = tracer.start_span()
              span.span_kind = span_module.SpanKind.SERVER
              # Set the span name as the name of the current module name
              span.name = '[{}]{}'.format(
                  flask.request.method,
                  flask.request.url)
              tracer.add_attribute_to_current_span(
                  HTTP_METHOD, flask.request.method)
              tracer.add_attribute_to_current_span(
                  HTTP_URL, str(flask.request.url))
              execution_context.set_opencensus_attr(
                  'blacklist_hostnames',
                  self.blacklist_hostnames)
          except Exception:  # pragma: NO COVER
              log.error('Failed to trace request', exc_info=True)
docs: A function to be run before each request.
  
          See: http://flask.pocoo.org/docs/0.12/api/#flask.Flask.before_request