You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the expected behavior?
The AwsLambdaInstrumentor should allow manual instrumentation without causing circular imports, ensuring the proper functioning of the project.
What is the actual behavior?
Circular import is triggered
Additional context
{
"errorMessage": "partially initialized module 'test' has no attribute 'lambda_handler' (most likely due to a circular import)",
"errorType": "AttributeError",
"requestId": "",
"stackTrace": [
" File \"/var/lang/lib/python3.11/importlib/init.py\", line 126, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n",
" File \"<frozen importlib._bootstrap>\", line 1204, in _gcd_import\n",
" File \"<frozen importlib._bootstrap>\", line 1176, in _find_and_load\n",
" File \"<frozen importlib._bootstrap>\", line 1147, in _find_and_load_unlocked\n",
" File \"<frozen importlib._bootstrap>\", line 690, in _load_unlocked\n",
" File \"<frozen importlib._bootstrap_external>\", line 940, in exec_module\n",
" File \"<frozen importlib._bootstrap>\", line 241, in _call_with_frames_removed\n",
" File \"/var/task/test.py\", line 3, in <module>\n AwsLambdaInstrumentor().instrument()\n",
" File \"/opt/python/opentelemetry/instrumentation/instrumentor.py\", line 108, in instrument\n result = self._instrument( # pylint: disable=assignment-from-no-return\n",
" File \"/opt/python/opentelemetry/instrumentation/aws_lambda/init.py\", line 462, in _instrument\n _instrument(\n",
" File \"/opt/python/opentelemetry/instrumentation/aws_lambda/init.py\", line 403, in _instrument\n wrap_function_wrapper(\n",
" File \"/opt/python/wrapt/wrappers.py\", line 895, in wrap_function_wrapper\n return wrap_object(module, name, FunctionWrapper, (wrapper,))\n",
" File \"/opt/python/wrapt/wrappers.py\", line 841, in wrap_object\n (parent, attribute, original) = resolve_path(module, name)\n",
" File \"/opt/python/wrapt/wrappers.py\", line 829, in resolve_path\n original = lookup_attribute(parent, attribute)\n",
" File \"/opt/python/wrapt/wrappers.py\", line 827, in lookup_attribute\n return getattr(parent, attribute)\n"
]
}
The text was updated successfully, but these errors were encountered:
Hi
There is a problem with the docs. The line of code that instruments the code should be placed below the function. This is because you cannot instrument code that does not exist yet.
Here’s an example:
Hi There is a problem with the docs. The line of code that instruments the code should be placed below the function. This is because you cannot instrument code that does not exist yet. Here’s an example:
Environment:
Steps to reproduce
What is the expected behavior?
The
AwsLambdaInstrumentor
should allow manual instrumentation without causing circular imports, ensuring the proper functioning of the project.What is the actual behavior?
Circular import is triggered
Additional context
The text was updated successfully, but these errors were encountered: