def event_processor(self, event, hint, asgi_scope):
    request_info = event.get('request', {})
    ty = asgi_scope['type']
    if (ty in ('http', 'websocket')):
        request_info['method'] = asgi_scope.get('method')
        request_info['headers'] = headers = _filter_headers(self._get_headers(asgi_scope))
        request_info['query_string'] = self._get_query(asgi_scope)
        request_info['url'] = self._get_url(asgi_scope, ('http' if (ty == 'http') else 'ws'), headers.get('host'))
    client = asgi_scope.get('client')
    if (client and _should_send_default_pii()):
        request_info['env'] = {'REMOTE_ADDR': client[0]}
    if (event.get('transaction', _DEFAULT_TRANSACTION_NAME) == _DEFAULT_TRANSACTION_NAME):
        endpoint = asgi_scope.get('endpoint')
        if endpoint:
            event['transaction'] = transaction_from_function(endpoint)
    event['request'] = request_info
    return event
def event_processor(self, event, hint, asgi_scope):
    request_info = event.get('request', {})
    ty = asgi_scope['type']
    if (ty in ('http', 'websocket')):
        request_info['method'] = asgi_scope.get('method')
        request_info['headers'] = headers = _filter_headers(self._get_headers(asgi_scope))
        request_info['query_string'] = self._get_query(asgi_scope)
        request_info['url'] = self._get_url(asgi_scope, ('http' if (ty == 'http') else 'ws'), headers.get('host'))
    client = asgi_scope.get('client')
    if (client and _should_send_default_pii()):
        request_info['env'] = {'REMOTE_ADDR': client[0]}
    if (event.get('transaction', _DEFAULT_TRANSACTION_NAME) == _DEFAULT_TRANSACTION_NAME):
        endpoint = asgi_scope.get('endpoint')
        if endpoint:
            event['transaction'] = transaction_from_function(endpoint)
    event['request'] = request_info
    return event