question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tracing database dependancies in django

See original GitHub issue

How can one trace a django database dependancy to Azure Insights? For instance, if I have a basic call to Model.objects.all() how this might be traced? And what data can be traced?

Does it make sense to use a opencensus-ext-mysql in order to send traces to Azure Insights? Are there any examples for this?

p.s unfortunately, there are no any READMEs for those sql-related plugins.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
victoraugustollscommented, Sep 14, 2019

@reyang I have a local version that I use with this behavior. Will adapt it and add tests so I can open a PR.

1reaction
tpyocommented, Aug 31, 2019

Yes, you can use the Django integration with the MySQL integration to get query tracing in <= Django 1.11 (provided you’re using mysql-connector).

You would only need to load the MySQL integration with config_integration.trace_integrations(['mysql']), as long as the tracer is initialised by the Django middleware it should work as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrations - Django documentation
Migrations¶. Migrations are Django's way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database...
Read more >
Digging Deeper Into Django Migrations - Real Python
How Django keeps track of migrations; How migrations know which database operations to perform; How dependencies between migrations are defined.
Read more >
Django OpenTelemetry Instrumentation - SigNoz
Steps to auto-instrument Django app for traces​ · Create a virtual environment. python3 -m venv instrumentation_env · Install the OpenTelemetry dependencies. pip ...
Read more >
Dependency installation for Python (Django) project
Note that searching your exact title would have put you on the right track. So would the Django tutorial, which links to a...
Read more >
Track dependencies with OpenCensus Python - Microsoft Learn
Dependency data is collected using OpenCensus Python and its ... Track your outgoing Django requests with the OpenCensus django integration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found