getappmap / getappmap/appmap-python

AppMap, django-channel ASGI mode

未关闭
#146 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
104
派生
17
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用 Django 的 ASGI 模式和提供的 runserver 命令重现该问题。跟踪 SERVER_PROTOCOL 失败和 get_resolved_match 的解包错误,然后验证 AppMap 记录在 ASGI 下与应用程序和 datatables 一起正常工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
django, python
领域
backend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。