newrelic-python-agent
newrelic-python-agent copied to clipboard
NR cannot instrument tracing with python agent on non-web application
Description NOTE: # ( Describe the problem you're encountering. )
Hello! We've setup a python agent in our kubernetes container that runs a worker which polls from a queue.
The dockerfile entrypoint looks something like this -
CMD ["python3", "/app/workerservice"]
We get logs but we do not receive distributed traces.
We have NEW_RELIC_DISTRIBUTED_TRACING_ENABLED set to true in the environment variables.
New relic is injected via our main.py, looking something like this.
import newrelic.agent
newrelic.agent.initialize()
@newrelic.agent.background_task()
async def main():
insert-some-components-here
if __name__ == '__main__':
asyncio.run(main())
Here's our permalink. permalink: https://onenr.io/0EjOoDd18j6
python agent, newrelic==9.1.2 on python,
we ran the CLI diagnostic, but to no avail.
this is also a non-web-app worker we are looking to monitor - there are no frameworks used, just plain python. [TIP]: # ( Do NOT share sensitive information, whether personal, proprietary, or otherwise! )
Expected Behavior NOTE: # ( Tell us what you expected to happen. )
our goal is to instrument the agent to send distributed traces to the traces directory. we have a lot of dependencies to our worker services that we'd like to monitor.
Troubleshooting or NR Diag results NOTE: # ( Provide any other relevant log data. ) [TIP]: # ( Scrub logs and diagnostic information for sensitive information )
Steps to Reproduce NOTE: # ( Please be as specific as possible. ) [TIP]: # ( Link a sample application that demonstrates the issue. )
- provided in permalink, but screenshot attached.
Your Environment [TIP]: # ( Include as many relevant details about your environment as possible including the running version of New Relic software and any relevant configurations. )
- added in the permalink Additional context [TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. )