Giter Site home page Giter Site logo

Add Peewee integration about dd-trace-py HOT 3 CLOSED

datadog avatar datadog commented on August 25, 2024 3
Add Peewee integration

from dd-trace-py.

Comments (3)

brettlangdon avatar brettlangdon commented on August 25, 2024

From talking with @jontonsoup, they are using PostgreSQL/psycopg2, and have used patch_all, which should have patched psycopg2.connect, but that didn't seem to work.

It appears that peewee is using psycopg2.connect, which should have been patched:

https://github.com/coleifer/peewee/blob/master/peewee.py#L4043

from dd-trace-py.

jontonsoup avatar jontonsoup commented on August 25, 2024

@brettlangdon apologies -- The trace is working, but pinning does not work.

conn = DB.get_conn()
pin = Pin.override(conn, service="user-db")

WARNING:ddtrace.pin:can't pin onto object. skipping
Traceback (most recent call last):
File "/Users/jonathan/src/lib/python3.5/site-packages/ddtrace/pin.py", line 96, in
onto
return setattr(obj, '_datadog_pin', self)
AttributeError: 'psycopg2.extensions.connection' object has no attribute '_datadog_pin'

from dd-trace-py.

brettlangdon avatar brettlangdon commented on August 25, 2024

We have recorded better PeeWee support as a feature request internally, and will plan work to make psycopg more configurable without using a Pin.

from dd-trace-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.