Giter Site home page Giter Site logo

Comments (4)

eeliu avatar eeliu commented on June 10, 2024 1

Did you forget this line ?
use_thread_local_context

use_thread_local_context()
monkey_patch_for_pinpoint()
set_agent("cd.dev.test.django", "cd.dev.test.py",
'tcp:dev-collector:10000', -1, 0, logging.DEBUG)

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 10, 2024

Thanks report, we will check it

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 10, 2024

@pan889 @mayingping-Bella

If you have time, please help me check this.

pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.1

from pinpoint-c-agent.

HJinS avatar HJinS commented on June 10, 2024

@pan889 @mayingping-Bella

If you have time, please help me check this.

pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.1

@eeliu
Thanks, I have some problem with test version.
Please check this out

Setting

from pinpointPy import set_agent, monkey_patch_for_pinpoint
PINPOINT_AGENT_HOST = "Host ip"
MIDDLEWARE.insert(0, 'pinpointPy.Django.DjangoMiddleWare')

monkey_patch_for_pinpoint()
set_agent(app_id_str='server id', app_name_str='server name', collect_agent_host=f'tcp:{PINPOINT_AGENT_HOST}:9999')

Traceback

Traceback (most recent call last):
  File "/Users/jin_pc/.pyenv/versions/3.9.7/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/Users/jin_pc/.pyenv/versions/3.9.7/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
    self.check_migrations()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/core/management/base.py", line 486, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/migrations/loader.py", line 53, in __init__
    self.build_graph()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/migrations/loader.py", line 220, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
    if self.has_table():
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 55, in has_table
    with self.connection.cursor() as cursor:
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/base/base.py", line 202, in connect
    self.init_connection_state()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 223, in init_connection_state
    timezone_changed = self.ensure_timezone()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 216, in ensure_timezone
    cursor.execute(self.ops.set_time_zone_sql(), [timezone_name])
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/opentelemetry/instrumentation/psycopg2/__init__.py", line 249, in execute
    return _cursor_tracer.traced_execution(
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/opentelemetry/instrumentation/dbapi/__init__.py", line 460, in traced_execution
    return query_method(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/pinpointPy/Common.py", line 90, in pinpointTrace
    sampled, parentId, nArgs, nKwargs = self._isSample(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/pinpointPy/Common.py", line 76, in _isSample
    return cls.isSample(*args, **kwargs)
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/pinpointPy/Common.py", line 68, in isSample
    ret, parentId = get_trace_context().get_parent_id()
  File "/Users/jin_pc/.pyenv/versions/danbi3.2/lib/python3.9/site-packages/pinpointPy/TraceContext.py", line 30, in get_parent_id
    raise NotImplementedError("get_parent_id")
NotImplementedError: get_parent_id

Dependency Information

django-celery-beat==2.3.0
django-celery-results==2.2.0
django-redis==4.11.0
djangorestframework==3.13.1
django==3.2
psycopg2<=2.8.6

Amazon Linux
Amazon Linux 2023 AMI 2023.4.20240319.1 arm64 HVM kernel-6.1

from pinpoint-c-agent.

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.