getappmap / getappmap/appmap-python

AppMap, django-channel ASGI mode

Open
#146 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
104
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hello,

I struggle to make it works with ASGI mode.

1/ i got a first error [key error SERVER_PROTOCOL], workaround like this

try:
    meta = request.META['SERVER_PROTOCOL']
except:
    meta = 'HTTP'
resolved = resolve(request.path_info)
params = request_params(request)
params.update(resolved.kwargs)
call_event = HttpServerRequestEvent(
    request_method=request.method,
    path_info=request.path_info,
    message_parameters=params,
    normalized_path_info=normalize_path_info(request.path_info, resolved),
    protocol=meta,
    headers=request.headers
)

But get another with datatables :

 regex, match = get_resolved_match(path_info, resolver)
TypeError: cannot unpack non-iterable NoneType object
``
Starting with  noasgi, recording works but not my app: 

./manage.py runserver --noasgi


Any idea or tips please ?

Thanks for all.

Regards

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Django's ASGI mode and the provided runserver commands. Trace the SERVER_PROTOCOL failure and the get_resolved_match unpacking error, then verify that AppMap recording works with the application and datatables under ASGI.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.