Official Python agent for the Elastic APM

Overview

elastic-apm -- Elastic APM agent for Python

Build Status Latest Version Supported Python versions

This is the official Python module for Elastic APM.

It provides full out-of-the-box support for many of the popular frameworks, including Django, and Flask. Elastic APM is also easy to adapt for most WSGI-compatible web applications via custom integrations.

Your application doesn't live on the web? No problem! Elastic APM is easy to use in any Python application.

Read the documentation, including instructions on running the tests locally.

If you're interested in contributing, start here!

License

BSD-3-Clause

Made with ♥️ and ☕️ by Elastic and our community.

Comments
  • v4.1.0 Introduces `http.client.RemoteDisconnected` error

    v4.1.0 Introduces `http.client.RemoteDisconnected` error

    Describe the bug: ... Events getting reported to APM-Server are randomly getting rejected. It appears that every so often the event getting reported is being met with a RemoteDisconnected exception.

    To Reproduce

    1. Setup a django project as per directions
    2. Hit the homepage of the project
    3. Wait for several events to hit the APM server
    4. One will eventually cause the exception

    Expected behavior: ... No Exception

    Environment (please complete the following information)

    • OS: Mojave but running under python:3 docker container
    • Python version: 3.7.2
    • Framework and version: Django version 2.1.5
    • APM Server version: apm-server version 6.6.0 (amd64), libbeat 6.6.0
    • Agent version: 4.1.0

    Additional context

    downgrading to 4.0.3 remedies the issue.

    Directly related: https://discuss.elastic.co/t/unable-to-reach-apm-server-connection-aborted-remotedisconnected-remote-end-closed-connection-without-response/166500

    • Agent config options

      Click to expand
      ELASTIC_APM = {
          'SERVICE_NAME': 'web-backend',
          'SECRET_TOKEN': '8149e743-2524-2524-2524-94aadd3fcde7',
          'SERVER_URL': 'http://192.168.16.100:8200',
          'DEBUG': True,
      }
      
      
    • requirements.txt:

      Click to expand
      django-allauth
      django-guardian
      django-qr-code
      django-icons
      django-phonenumber-field
      django-crispy-forms
      django-autocomplete-light
      django-money
      django-anymail
      django-debug-toolbar
      django-extensions
      django-countries
      djangorestframework
      psycopg2-binary
      stripe
      geoip2
      redis
      celery
      sentry-sdk
      googlemaps
      django
      pillow
      phonenumbers
      gunicorn
      whitenoise
      elastic-apm
      
    web_1      | Failed to submit message: "Unable to reach APM Server: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) (url: http://192.168.16.100:8200/intake/v2/events)"
    web_1      | Traceback (most recent call last):
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    web_1      |     chunked=chunked)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    web_1      |     six.raise_from(e, None)
    web_1      |   File "<string>", line 2, in raise_from
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    web_1      |     httplib_response = conn.getresponse()
    web_1      |   File "/usr/local/lib/python3.7/site-packages/sentry_sdk/integrations/stdlib.py", line 48, in getresponse
    web_1      |     rv = real_getresponse(self, *args, **kwargs)
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse
    web_1      |     response.begin()
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 296, in begin
    web_1      |     version, status, reason = self._read_status()
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 265, in _read_status
    web_1      |     raise RemoteDisconnected("Remote end closed connection without"
    web_1      | http.client.RemoteDisconnected: Remote end closed connection without response
    web_1      | 
    web_1      | During handling of the above exception, another exception occurred:
    web_1      | 
    web_1      | Traceback (most recent call last):
    web_1      |   File "/usr/local/lib/python3.7/site-packages/elasticapm/transport/http.py", line 40, in send
    web_1      |     "POST", url, body=data, headers=self._headers, timeout=self._timeout, preload_content=False
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 323, in urlopen
    web_1      |     response = conn.urlopen(method, u.request_uri, **kw)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/elasticapm/instrumentation/packages/base.py", line 106, in call_if_sampling
    web_1      |     return wrapped(*args, **kwargs)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/elasticapm/instrumentation/packages/base.py", line 106, in call_if_sampling
    web_1      |     return wrapped(*args, **kwargs)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    web_1      |     _stacktrace=sys.exc_info()[2])
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment
    web_1      |     raise six.reraise(type(error), error, _stacktrace)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
    web_1      |     raise value.with_traceback(tb)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    web_1      |     chunked=chunked)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    web_1      |     six.raise_from(e, None)
    web_1      |   File "<string>", line 2, in raise_from
    web_1      |   File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    web_1      |     httplib_response = conn.getresponse()
    web_1      |   File "/usr/local/lib/python3.7/site-packages/sentry_sdk/integrations/stdlib.py", line 48, in getresponse
    web_1      |     rv = real_getresponse(self, *args, **kwargs)
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse
    web_1      |     response.begin()
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 296, in begin
    web_1      |     version, status, reason = self._read_status()
    web_1      |   File "/usr/local/lib/python3.7/http/client.py", line 265, in _read_status
    web_1      |     raise RemoteDisconnected("Remote end closed connection without"
    web_1      | urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    web_1      | 
    web_1      | During handling of the above exception, another exception occurred:
    web_1      | 
    web_1      | Traceback (most recent call last):
    web_1      |   File "/usr/local/lib/python3.7/site-packages/elasticapm/transport/base.py", line 184, in send_sync
    web_1      |     self.sync_transport.send(self, data)
    web_1      |   File "/usr/local/lib/python3.7/site-packages/elasticapm/transport/http.py", line 53, in send
    web_1      |     raise TransportException(message, data, print_trace=print_trace)
    web_1      | elasticapm.transport.base.TransportException: Unable to reach APM Server: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) (url: http://192.168.16.100:8200/intake/v2/events)
    
    
    bug 
    opened by jensenbox 53
  • GIT-521: add support for sanic framework

    GIT-521: add support for sanic framework

    What does this pull request do?

    Replacement for https://github.com/elastic/apm-agent-python/pull/522

    Related issues

    closes elastic/apm-agent-python#521

    Todo

    • [x] Unit Tests
    • [x] Minor Refactoring
    • [x] Documentation
    agent-python community 
    opened by harshanarayana 28
  • Add asyncpg instrumentation in Elastic APM

    Add asyncpg instrumentation in Elastic APM

    What does this pull request do?

    Adds support for the asyncpg database interface library for Python and PostgreSQL by implementing corresponding instrumentation in the APM agent.

    Related issues

    https://github.com/elastic/apm-agent-python/issues/755

    Closes issues

    https://github.com/elastic/apm-agent-python/issues/755

    opened by odimko 25
  • APM agent crashes in Celery at random times during the day

    APM agent crashes in Celery at random times during the day

    I'm not sure how to reproduce but I've had this issue in production for several months. The crash happens randomly during the day, 20-50 times (we run 400k+ tasks per day)

    The crash is:

    TransportException: HTTP 400: {"accepted":0,"errors":[{"message":"gzip: invalid header"}]}
    
      File "elasticapm/transport/base.py", line 208, in _flush
        self.send(data)
      File "elasticapm/transport/http.py", line 102, in send
        raise TransportException(message, data, print_trace=print_trace)
    

    Environment (please complete the following information)

    • OS: Ubuntu 18.04
    • Python version: 3.6
    • Framework and version: Django 2.2 Celery 4.4.2
    • APM Server version: 7.6.0
    • Agent version: 5.3.2
    opened by lfrodrigues 21
  • Config sanitize field names

    Config sanitize field names

    What does this pull request do?

    Makes SANITIZE_FIELD_NAMES a configurable option such that users can specify custom fields they want masked.

    From the testing code, it looks like the base sanitize code already handles some wildcard-like features (i.e, passing some- as a field to be sanitized would mask fields that match *some-*).

    Example usage:

    ELASTIC_APM = {
        'APP_NAME': '<APP-NAME>',
        'SECRET_TOKEN': '<SECRET-TOKEN>',
        'PROCESSORS': (
            'path.to.my_processor',
            'elasticapm.processors.sanitize_stacktrace_locals',
            'elasticapm.processors.sanitize_http_request_cookies',
            'elasticapm.processors.sanitize_http_headers',
            'elasticapm.processors.sanitize_http_wsgi_env',
            'elasticapm.processors.sanitize_http_request_querystring',
            'elasticapm.processors.sanitize_http_request_body',
        ),
       'SANITIZE_FIELD_NAMES': (
            'some-sensitive-field-1',
            'should-be-hidden'
        ),
    }
    

    I wanted to get a review before updating the docs. I had some time and was peeking around the code and decided to take a crack at this and see if it would work out. Please do let me know if this approach is overly simplistic or if I'm missing some other context.

    Related issues

    closes #841

    opened by AumitLeon 18
  • Feature/git 521 sanic apm contrib

    Feature/git 521 sanic apm contrib

    What does this pull request do?

    Is a cleanup of @harshanarayana PR (https://github.com/elastic/apm-agent-python/pull/1056) to add compat with Sanic v21.9

    Related issues

    closes #521

    agent-python community triage 
    opened by ahopkins 16
  • Documents are not clear on testing mechanisms

    Documents are not clear on testing mechanisms

    Describe the bug: ...

    CONTRIBUTING.md contains the following:

    To run the full test suite, you need to install several databases (Elasticsearch, PostgreSQL, MySQL, Cassandra, Redis). This can be quite a hassle, so we recommend to use our dockerized test setup. See Running tests for detailed instructions.

    README.md also points to Running tests

    Running tests contains the following:

    To run tests locally you can make use of the docker images also used when running the whole test suite with Jenkins. Running the full test suite first does some linting and then runs the actual tests with different versions of Python and different web frameworks. For a full overview of the test matrix and supported versions have a look at Jenkins Configuration.

    That document does not however detail how to build/start the docker images. It includes instructions on running ./tests/scripts/docker/run_tests.sh, but as near as I can tell this is all run entirely on a host machine, not using a docker container. It also requires Python and several pip installs locally.

    I would expect something in one of the docs of the form:

    docker compose build...
    docker build -t ...  && docker run ...
    etc
    

    Otherwise locally a clearer picture of exactly what resources I need to start up and how to configure them instead of simply "This can be quite a hassle".

    Also, CONTRIBUTING.md contains the following:

    However, for running local unit tests, you can install the relevant requirements files and then run py.test from the project root.

    The root of the project does not contain a py.test file, nor does the test directory or the test/scripts directory.

    Basically I'm trying to put together a pull request, and I'm really not sure how to build/test this repo.

    opened by gatos-cc 16
  • Make OT binding support explicit timestamps.

    Make OT binding support explicit timestamps.

    What does this pull request do?

    OpenTracing API allows to explicitly set start and end timestamps of spans but the implementation in this project does not allow that. That patch fixes it.

    Closes #1126

    opened by AndreiPashkin 16
  • 110353 add windows testing to python agent

    110353 add windows testing to python agent

    What does this pull request do?

    Adds additional tests for windows on different versions of python

    Why is it important?

    Resolves potential flakiness from Appveyor tests by deprecating them

    Related issues

    closes

    opened by ElWPenn 16
  • trace.id is not available in fastapi exception handler

    trace.id is not available in fastapi exception handler

    Describe the bug: We have fastapi framework, and we add apm_client for starlette to the application, we want to generate trace.id to correlate logs when an exception happens. I have structlog package for the logging and import elasticapm.handlers.structlog.structlog_processor. We set exception handlers in fastapi application for our excpected handlers and also one for Exception class to capture the ones that we do not expect. I can get trace.id in child exceptions but not in the exception handler that is comparing to root.

    My goal was to have log Exception types and have log correlation in them.

    I am not sure if it is bug or feature request🤷‍♂️ To Reproduce

    1. create apm agent and fastapi app, add the apm agent to application
    from fastapi import FastAPI
    from elasticapm.contrib.starlette import make_apm_client
    from elasticapm.contrib.starlette import ElasticAPM
    apm = make_apm_client(config=config)
    app = FastAPI()
    app.add_middleware(ElasticAPM, client=apm)
    
    1. configure structlog
    import structlog
    from elasticapm.handlers.structlog import structlog_processor
    def processor(logger, level, log_dict):
        return json.dumps(log_dict)
    
    structlog.configure(processors=[structlog_processor, processor])
    
    
    1. create an child exceptions and root and child exception
    class AuthException(Exception):
        def __ini__(self):
            super().__init__()
    
    
    @app.exception_handler(Exception)
    async def fallback_handler(request , exc: Exception):
        getLogger().info("Uncaught exception during request handling happend")
        return JSONResponse({"detail": "ROOT EXCEPTION"}, status_code=500)
    
    @app.exception_handler(AuthException)
    async def validation_exception_handler(request, exc: AuthException):
        getLogger().info(f"Request Validation exception happend{sys.exc_info()}")
        return JSONResponse({"detail": "CHILD EXCEPTION"}, status_code=404)
    
    1. create an endpoint to send request to see if logging formatter/processor works or not
    @app.post("/")
    async def post(body: Any = Body(...)):
        if body == 1: raise AuthException("child exception")
        if body == 2: raise ZeroDivisionError("root exception")
        return JSONResponse({"Response": "test SUCCESS"}, status_code=200)
    

    Environment (please complete the following information)

    • OS: Win and Linux
    • Python version: 3.7
    • Framework and version [e.g. Django 2.1]: fastapi 0.63
    • APM Server version: _
    • Agent version: 6.*
    bug agent-python community 
    opened by realabja 15
  • Doesn= 10000">

    Doesn"t cut request body with size >= 10000

    What does this pull request do?

    b4edea3ca7885f5cbbad202a8f12325d131225ce has errors, if body size has more than 10000 bytes, it writes 10000 bytes message to elastic and call await self.app(scope, receive, wrapped_send) with same receive and invalid body,

    Comment:

    I separate receivers and now, if request has body more than 10000 bytes -> it will send to elastic only 10000 bytes and continue handle as normal request without cutting

    agent-python community triage 
    opened by mukhamux 14
  • Add http.client.HTTPConnection instrumentation

    Add http.client.HTTPConnection instrumentation

    Is your feature request related to a problem? Please describe.

    Duo's client isn't instrumented because they use http.client.HTTPConnection.

    Describe the solution you'd like

    Add instrumentation for http.client.HTTPConnection.

    Describe alternatives you've considered

    Manually creating spans around Duo client calls, which is cumbersome and easy to forget.

    Additional context

    The urllib3 instrumentation almost works for http.client.HTTPConnection. It successfully instrumented Duo's client when I made these changes:

    diff --git a/elasticapm/instrumentation/packages/urllib3.py b/elasticapm/instrumentation/packages/urllib3.py
    index cce2c17c..65eba2b4 100644
    --- a/elasticapm/instrumentation/packages/urllib3.py
    +++ b/elasticapm/instrumentation/packages/urllib3.py
    @@ -85,6 +85,7 @@ class Urllib3Instrumentation(AbstractInstrumentedModule):
             # packages that vendor or vendored urllib3 in the past
             ("requests.packages.urllib3.connectionpool", "HTTPConnectionPool.urlopen"),
             ("botocore.vendored.requests.packages.urllib3.connectionpool", "HTTPConnectionPool.urlopen"),
    +        ("http.client", "HTTPConnection.request"),
         ]
     
         def call(self, module, method, wrapped, instance, args, kwargs):
    @@ -95,8 +96,8 @@ class Urllib3Instrumentation(AbstractInstrumentedModule):
     
             host = instance.host
     
    -        if instance.port != default_ports.get(instance.scheme):
    -            host += ":" + str(instance.port)
    +        # if instance.port != default_ports.get(instance.scheme):
    +        #     host += ":" + str(instance.port)
     
             if "url" in kwargs:
                 url = kwargs["url"]
    @@ -105,8 +106,8 @@ class Urllib3Instrumentation(AbstractInstrumentedModule):
     
             signature = method.upper() + " " + host
     
    -        if url.startswith("/"):
    -            url = "%s://%s%s" % (instance.scheme, host, url)
    +        # if url.startswith("/"):
    +        #     url = "%s://%s%s" % (instance.scheme, host, url)
     
             transaction = execution_context.get_transaction()
    

    Note how the instance.scheme stuff is commented out. There isn't a scheme attribute on http.client.HTTPConnection.

    agent-python community triage 
    opened by goodoldneon 1
  • Broken aioredis(python3.11): TypeError: duplicate base class TimeoutError

    Broken aioredis(python3.11): TypeError: duplicate base class TimeoutError

    Describe the bug: ... In python 3.11, aioredis is broken, may we should use redis-py which include aioredis code instead of aioredis To Reproduce Just import this package and config APM middleware:

    app.add_middleware(ElasticAPM, client=apm_client)
    

    Error:

    ...
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/elasticapm/contrib/starlette/__init__.py", line 121, in __init__
        elasticapm.instrumentation.control.instrument()
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/elasticapm/instrumentation/control.py", line 45, in instrument
        obj.instrument()
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/elasticapm/instrumentation/packages/base.py", line 144, in instrument
        parent, attribute, original = wrapt.resolve_path(module, method)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/wrapt/wrappers.py", line 773, in resolve_path
        __import__(module)
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/aioredis/__init__.py", line 1, in <module>
        from aioredis.client import Redis, StrictRedis
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/aioredis/client.py", line 32, in <module>
        from aioredis.connection import (
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/aioredis/connection.py", line 33, in <module>
        from .exceptions import (
      File "/root/.cache/pypoetry/virtualenvs/app-iZOiGJ6Y-py3.11/lib/python3.11/site-packages/aioredis/exceptions.py", line 14, in <module>
        class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
    TypeError: duplicate base class TimeoutError
    

    Environment (please complete the following information)

    • OS: [e.g. Linux] linux
    • Python version: 3.11
    • Framework and version [e.g. Django 2.1]:
    • APM Server version: None
    • Agent version: 6.13.2

    Additional context

    Add any other context about the problem here.

    https://github.com/aio-libs/aioredis-py/issues/1443

    • Agent config options

      Click to expand
      replace this line with your agent config options
      remember to mask any sensitive fields like tokens
      
    • requirements.txt:

      Click to expand
      replace this line with your `requirements.txt`
      
    bug agent-python community 8.8-candidate 
    opened by strongbugman 1
  • [WIP] Wrapper script

    [WIP] Wrapper script

    What does this pull request do?

    Adds the wrapper script to automate instrumentation without code changes

    I expect I'll add at least Flask support and some docs labeled "experimental" before I actually merge this, but I wanted to open a PR for feedback.

    Related issues

    Closes #1019

    agent-python 
    opened by basepi 2
  • ElasticAPM is hanging lambda function after processing all events in an SQS queue

    ElasticAPM is hanging lambda function after processing all events in an SQS queue

    I believe ElasticAPM will hang the lambda function when no more events exist in the SQS queue.

    To Reproduce

    • Setup a lambda function to process events from an SQS queue
    • Send events to an SQS queue
    • Set ELASTIC_APM_LOG_LEVEL: debug

    Environment (please complete the following information)

    • OS: debian:bullseye-slim (python:3.9-slim container image) x86
    • Python version: 3.9
    • Framework and version [e.g. Django 2.1]:
    • APM Server version: 8.4.2
    • Agent version: 6.13.2

    Additional context Cloudwatch logs (can dive deeper if needed) after execution is completed image

    agent-python community triage 
    opened by brett-fitz 8
Releases(v6.13.2)
  • v6.13.2(Nov 17, 2022)

    Bug fixes

    • Fix error in Elasticsearch instrumentation when spans are dropped [#1690]
    • Lower log level for errors in APM Server version fetching [#1692]
    • Fix for missing parent.id when logging from a DroppedSpan under a leaf span [#1695]

    New Contributors

    • @kalemas made their first contribution in https://github.com/elastic/apm-agent-python/pull/1695

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.13.1...v6.13.2

    Source code(tar.gz)
    Source code(zip)
  • v6.13.1(Nov 3, 2022)

    Bug fixes

    • Fix elasticsearch instrumentation for track_total_hits=False [#1687]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.13.0...v6.13.1

    Source code(tar.gz)
    Source code(zip)
  • v6.13.0(Oct 26, 2022)

    Features

    • Add support for Python 3.11
    • Add backend granularity data to SQL backends as well as Cassandra and pymongo #1585, #1639
    • Add support for instrumenting the Elasticsearch 8 Python client #1642
    • Add *principal* to default sanitize_field_names configuration #1664
    • Add docs and better support for custom metrics, including in AWS Lambda #1643
    • Add support for capturing span links from AWS SQS in AWS Lambda #1662

    Bug fixes

    • Fix Django's manage.py check when agent is disabled #1632
    • Fix an issue with long body truncation for Starlette #1635
    • Fix an issue with transaction outcomes in Flask for uncaught exceptions #1637
    • Fix Starlette instrumentation to make sure transaction information is still present during exception handling #1674

    New Contributors

    • @francoisfreitag made their first contribution in https://github.com/elastic/apm-agent-python/pull/1632
    • @mukhamux made their first contribution in https://github.com/elastic/apm-agent-python/pull/1635
    • @LucaWintergerst made their first contribution in https://github.com/elastic/apm-agent-python/pull/1637
    • @nuno407 made their first contribution in https://github.com/elastic/apm-agent-python/pull/1640
    • @marcoffee made their first contribution in https://github.com/elastic/apm-agent-python/pull/1655

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.12.0...v6.13.0

    Source code(tar.gz)
    Source code(zip)
  • v6.12.0(Sep 8, 2022)

    Features

    • Add redis query to context data for redis instrumentation (#1406)
    • Add AWS request ID to all botocore spans (at span.context.http.request.id) (#1625)

    Bug fixes

    • Differentiate Lambda URLs from API Gateway in AWS Lambda integration (#1609)
    • Restrict the size of Django request bodies to prevent APM Server rejection (#1610)
    • Restrict length of exception.message for exceptions captured by the agent (#1619)
    • Restrict length of Starlette request bodies (#1549)
    • Fix error when using elasticsearch(sniff_on_start=True) (#1618)
    • Improve handling of ignored URLs and capture_body=off for Starlette (#1549)
    • Fix possible error in the transport flush for Lambda functions (#1628)

    New Contributors

    • @frnkvieira made their first contribution in https://github.com/elastic/apm-agent-python/pull/1549

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.11.0...v6.12.0

    Source code(tar.gz)
    Source code(zip)
  • v6.11.0(Aug 9, 2022)

    Features

    • Added lambda support for ELB triggers [#1605]

    New Contributors

    • @tonyman19 made their first contribution in https://github.com/elastic/apm-agent-python/pull/1605

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.10.2...v6.11.0

    Source code(tar.gz)
    Source code(zip)
  • v6.10.2(Aug 4, 2022)

    Bug fixes

    • Fixed an issue with non-integer ports in Django [#1590]
    • Fixed an issue with non-integer ports in Redis [#1591]
    • Fixed a performance issue for local variable shortening via varmap() [#1593]
    • Fixed elasticapm.label() when a Client object is not available [#1596]

    New Contributors

    • @dennis-wey made their first contribution in https://github.com/elastic/apm-agent-python/pull/1596

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.10.1...v6.10.2

    Source code(tar.gz)
    Source code(zip)
  • v6.10.1(Jun 30, 2022)

    Bug fixes

    • Fix an issue with Kafka instrumentation and unsampled transactions [#1579]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.10.0...v6.10.1

    Source code(tar.gz)
    Source code(zip)
  • v6.10.0(Jun 22, 2022)

    Features

    • Add instrumentation for aiobotocore [#1520]
    • Add instrumentation for kafka-python [#1555]
    • Add API for span links, and implement span link support for OpenTelemetry bridge [#1562]
    • Add span links to SQS ReceiveMessage call [#1575]
    • Add specific instrumentation for SQS delete/batch-delete [#1567]
    • Add trace_continuation_strategy setting [#1564]

    Bug fixes

    • Fix return for opentelemetry.Span.is_recording() [#1530]
    • Fix error logging for bad SERVICE_NAME config [#1546]
    • Do not instrument old versions of Tornado < 6.0 due to incompatibility [#1566]
    • Fix transaction names for class based views in Django 4.0+ [#1571]
    • Fix a problem with our logging handler failing to report internal errors in its emitter [#1568]

    New Contributors

    • @ckoehn made their first contribution in https://github.com/elastic/apm-agent-python/pull/1536
    • @amannocci made their first contribution in https://github.com/elastic/apm-agent-python/pull/1554
    • @silici0 made their first contribution in https://github.com/elastic/apm-agent-python/pull/1558
    • @dhalenok made their first contribution in https://github.com/elastic/apm-agent-python/pull/1571

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.9.1...v6.10.0

    Source code(tar.gz)
    Source code(zip)
  • v6.9.1(Mar 30, 2022)

    Bug fixes

    • Fix otel_attributes-related regression with older versions of APM Server (<7.16) [#1510]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.9.0...v6.9.1

    Source code(tar.gz)
    Source code(zip)
  • v6.9.0(Mar 30, 2022)

    Features

    • Add OpenTelemetry API bridge [#1411]
    • Change default for sanitize_field_names to sanitize *auth* instead of authorization [#1494]
    • Add span_stack_trace_min_duration to replace deprecated span_frames_min_duration [#1498]
    • Enable exact_match span compression by default [#1504]
    • Allow parent celery tasks to specify the downstream parent_span_id in celery headers [#1500]

    Bug fixes

    • Fix Sanic integration to properly respect the capture_body config [#1485]
    • Lambda fixes to align with the cross-agent spec [#1489]
    • Lambda fix for custom service_name [#1493]
    • Change default for stack_trace_limit from 500 to 50 [#1492]
    • Switch all duration handling to use datetime.timedelta objects [#1488]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.8.1...v6.9.0

    Source code(tar.gz)
    Source code(zip)
  • v6.8.1(Mar 9, 2022)

    Bug fixes

    • Fix exit_span_min_duration and disable by default [#1483]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.8.0...v6.8.1

    Source code(tar.gz)
    Source code(zip)
  • v6.8.0(Mar 1, 2022)

    Features

    • use "unknown-python-service" as default service name if no service name is configured (#1438)
    • add transaction name to error objects (#1441)
    • don't send unsampled transactions to APM Server 8.0+ (#1442)
    • implement snapshotting of certain configuration during transaction lifetime (#1431)
    • propagate traceparent IDs via Celery (#1371)
    • removed Python 2 compatibility shims (#1463) Note: Python 2 support was already removed with version 6.0 of the agent, this now removes unused compatibilit shims.

    Bug fixes

    • fix span compression for redis, mongodb, cassandra and memcached (#1444)
    • fix recording of status_code for starlette (#1466)
    • fix aioredis span context handling (#1462)
    Source code(tar.gz)
    Source code(zip)
  • v6.7.2(Dec 7, 2021)

    Bugfixes

    • fix AttributeError in sync instrumentation of httpx (#1423)
    • add setting to disable span compression, default to disabled (#1429)
    Source code(tar.gz)
    Source code(zip)
  • v6.7.1(Nov 30, 2021)

  • v6.7.0(Nov 30, 2021)

    Features

    • Add support for Sanic framework (#1390)

    Bugfixes

    • fix compatibility issues with httpx 0.21 (#1403)
    • fix span_compression_exact_match_max_duration default value (#1407)
    Source code(tar.gz)
    Source code(zip)
  • v6.6.2(Nov 10, 2021)

    Bug fixes

    • Fix an issue where compressed spans would count against transaction_max_spans [#1377]
    • Make sure HTTP connections are not re-used after a process fork [#1374]
    • Fix an issue with psycopg2 instrumentation when multiple hosts are defined [#1386]
    • Update the User-Agent header to the new spec [#1378]
    • Improve status_code handling in AWS Lambda integration [#1382]
    • Fix aiohttp exception handling to allow for non-500 responses including HTTPOk [#1384]
    • Force transaction names to strings [#1389]

    Other

    • Remove unused http.request.socket.encrypted context field [#1332]
    • Remove unused transaction metrics (APM Server handles these metrics instead) [#1388]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.6.1...v6.6.2

    Source code(tar.gz)
    Source code(zip)
  • v6.6.1(Nov 2, 2021)

    Bug fixes

    • Fix some context fields and metadata handling in AWS Lambda support [#1368]

    Full Changelog: https://github.com/elastic/apm-agent-python/compare/v6.6.0...v6.6.1

    Source code(tar.gz)
    Source code(zip)
  • v6.6.0(Oct 18, 2021)

    Features

    • Add experimental support for AWS lambda instrumentation [#1193]
    • Add support for span compression [#1321]
    • Auto-infer destination resources for easier instrumentation of new resources [#1359]
    • Add support for dropped span statistics [#1327]

    Bug fixes

    • Ensure that Prometheus histograms are encoded correctly for APM Server [#1354]
    • Remove problematic (and duplicate) event.dataset from logging integrations [#1365]
    • Fix for memcache instrumentation when configured with a unix socket [#1357]
    Source code(tar.gz)
    Source code(zip)
  • v6.5.0(Oct 4, 2021)

    Features

    • Add instrumentation for Azure Storage (blob/table/fileshare) and Azure Queue [#1316]

    Bug fixes

    • Improve span coverage for asyncpg [#1328]
    • aiohttp: Correctly pass custom client to tracing middleware [#1345]
    • Fixed an issue with httpx instrumentation [#1337]
    • Fixed an issue with Django 4.0 removing a private method [#1347]
    Source code(tar.gz)
    Source code(zip)
  • v6.4.0(Sep 3, 2021)

    Features

    • Rename the experimental log_ecs_formatting config to log_ecs_reformatting #1300
    • Add support for Prometheus histograms #1165

    Bug fixes

    • Fixed cookie sanitization when Cookie is capitalized #1301
    • Fix a bug with exception capturing for bad UUIDs #1304
    • Fix potential errors in json serialization #1203
    • Fix an issue with certain aioredis commands #1308
    Source code(tar.gz)
    Source code(zip)
  • v6.3.3(Jul 14, 2021)

  • v6.3.2(Jul 7, 2021)

  • v6.3.1(Jul 7, 2021)

  • v6.3.0(Jul 6, 2021)

    Features

    • Add additional context information about elasticsearch client requests [#1108]
    • Add use_certifi config option to allow users to disable certifi [#1163]

    Bug fixes

    • Fix for Starlette 0.15.0 error collection [#1174]
    • Fix for Starlette static files [#1137]
    Source code(tar.gz)
    Source code(zip)
  • v6.2.3(Jul 6, 2021)

    Bugfixes

    • suppress the default_app_config attribute in Django 3.2+ [#1155]
    • bump log level for multiple set_client calls to WARNING [#1164]
    • fix issue with adding disttracing to SQS messages when dropping spans [#1170]
    Source code(tar.gz)
    Source code(zip)
  • v6.2.2(Jun 8, 2021)

  • v6.2.1(Jun 8, 2021)

  • v6.2.0(Jun 8, 2021)

    Features

    • Added support for aioredis 1.x (#1082)
    • Added support for aiomysql (#1107)
    • Added Redis pub/sub instrumentation (#1129)
    • Added specific instrumentation for AWS SQS (#1123)

    Bug fixes

    • ensure metrics are flushed before agent shutdown (#1139)
    • added safeguard for exceptions in processors (#1138)
    • ensure sockets are closed which were opened for cloud environment detection (#1134)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.3(Apr 28, 2021)

    Bug fixes

    • added destination information to asyncpg instrumentation (#1115)
    • fixed issue with collecting request meta data with Django REST Framework (#1117)
    • fixed httpx instrumentation for newly released httpx 0.18.0 (#1118)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.2(Apr 14, 2021)

    Bug fixes

    • fixed issue with empty transaction name for the root route with Django (#1095)
    • fixed on-the-fly initialisation of Flask apps (#1099)
    Source code(tar.gz)
    Source code(zip)
Django And React Notes App

Django & React Notes App Cloning the repository -- Clone the repository using the command below : git clone https://github.com/divanov11/Django-React

Dennis Ivy 136 Dec 27, 2022
Django based webapp pulling in crypto news and price data via api

Deploy Django in Production FTA project implementing containerization of Django Web Framework into Docker to be placed into Azure Container Services a

0 Sep 21, 2022
Fully reponsive Chat Application built with django, javascript, materialUi, bootstrap4, html and css.

Chat app (Full Stack Frameworks with Django Project) Fully reponsive Chat Application built with django, javascript, materialUi, bootstrap4, html and

1 Jan 19, 2022
based official code from django channels, replace frontend with reactjs

django_channels_chat_official_tutorial demo project for django channels tutorial code from tutorial page: https://channels.readthedocs.io/en/stable/tu

lightsong 1 Oct 22, 2021
A pickled object field for Django

django-picklefield About django-picklefield provides an implementation of a pickled object field. Such fields can contain any picklable objects. The i

Gintautas Miliauskas 167 Oct 18, 2022
A Django/Python web app that functions as a digital diary

My Django Diary Full-stack web application that functions as a digital diary using Django, Python, SQLite, HTML & CSS. Things I learned during this pr

1 Sep 30, 2022
A quick way to add React components to your Django templates.

Django-React-Templatetags This django library allows you to add React (16+) components into your django templates. Features Include react components u

Fröjd Agency 408 Jan 08, 2023
Django-Docker - Django Installation Guide on Docker

Guía de instalación del Framework Django en Docker Introducción: Con esta guía p

Victor manuel torres 3 Dec 02, 2022
Phoenix LiveView but for Django

Reactor, a LiveView library for Django Reactor enables you to do something similar to Phoenix framework LiveView using Django Channels. What's in the

Eddy Ernesto del Valle Pino 526 Jan 02, 2023
GameStop clone with Django

GameStop clone with Django This is my side project with GameStop clone Author: HackerApe GitHub Profile: View Profile LinkedIn Profile: View Profile

Dmitriy Shin 2 Dec 26, 2021
An API was build with Django to store and retrieve information about various musical instruments.

The project is meant to be a starting point, an experimentation or a basic example of a way to develop an API with Django. It is an exercise on using Django and various python technologies and design

Kostas Ziovas 2 Dec 25, 2021
Neighbourhood - A python-django web app to help the residence of a given neighborhood know their surrounding better

Neighbourhood A python-django web app to help the residence of a given neighborh

Levy Omolo 4 Aug 25, 2022
A real-time photo feed using Django and Pusher

BUILD A PHOTO FEED USING DJANGO Here, we will learn about building a photo feed using Django. This is similar to instagram, but a stripped off version

samuel ogundipe 4 Jan 01, 2020
a little task queue for python

a lightweight alternative. huey is: a task queue (2019-04-01: version 2.0 released) written in python (2.7+, 3.4+) clean and simple API redis, sqlite,

Charles Leifer 4.3k Dec 29, 2022
Django API without Django REST framework.

Django API without DRF This is a API project made with Django, and without Django REST framework. This project was done with: Python 3.9.8 Django 3.2.

Regis Santos 3 Jan 19, 2022
Django channels basic chat

Django channels basic chat

Dennis Ivy 41 Dec 24, 2022
Notes-Django: an advanced project to save notes in Django. where users are able to Create, Read, Update and Delete their notes.

An advanced software to keep you notes. It allows users to perform CRUD operations on theirs Notes. Was implemented Authorization and Authentication

Edilson Pateguana 1 Feb 05, 2022
simple project management tool for educational purposes

Taskcamp This software is used for educational and demonstrative purposes. It's a simple project management tool powered by Django Framework Install B

Ilia Dmitriev 6 Nov 08, 2022
django-reversion is an extension to the Django web framework that provides version control for model instances.

django-reversion django-reversion is an extension to the Django web framework that provides version control for model instances. Requirements Python 3

Dave Hall 2.8k Jan 02, 2023
PEP-484 type hints bindings for the Django web framework

mypy-django Type stubs to use the mypy static type-checker with your Django projects This project includes the PEP-484 compatible "type stubs" for Dja

Machinalis 223 Jun 17, 2022