dd-trace-py
dd-trace-py copied to clipboard
app_key not passed to aiohttp_jinja2
When using aiohttp_admin the app_key value for the templating module differs from the default one.
This causes an error executing: https://github.com/DataDog/dd-trace-py/blob/ec191a4a71ae71017b70d26111bba4489e617ae5/ddtrace/contrib/aiohttp/template.py#L21
As far as I understand this would solve the problem.
env = aiohttp_jinja2.get_env(request.app, app_key=kwargs["app_key"])
@manuher your proposal makes sense. Could you start a PR that includes a test for supporting passing along the app_key
argument from render_template
to get_env
?