code: def _structlog_default_keys_processor(logger_class, log_method, event):
      ''' Add unique id, type and hostname '''
      global HOSTNAME
  
      if 'id' not in event:
          event['id'] = '%s_%s' % (
              datetime.utcnow().strftime('%Y%m%dT%H%M%S'),
              uuid.uuid1().hex
          )
  
      if 'type' not in event:
          event['type'] = 'log'
  
      event['host'] = HOSTNAME
  
      return evenf _structlog_default_keys_processor(logger_class, log_method, event):
      ''' Add unique id, type and hostname '''
      global HOSTNAME
  
      if 'id' not in event:
          event['id'] = '%s_%s' % (
              datetime.utcnow().strftime('%Y%m%dT%H%M%S'),
              uuid.uuid1().hex
          )
  
      if 'type' not in event:
          event['type'] = 'log'
  
      event['host'] = HOSTNAME
  
      return event
docs: Add unique id, type and hostname