dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

app_key not passed to aiohttp_jinja2

Open manuher opened this issue 5 years ago • 1 comments

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 avatar Oct 11 '19 09:10 manuher

@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?

majorgreys avatar Nov 01 '19 16:11 majorgreys