Tags: appsignal/appsignal-python
Tags
## Changed - Update span recognition following the OpenTelemetry Semantic Conventions 1.30 database specification. We now also sanitize SQL queries in the `db.query.text` attribute and Redis queries in the `db.operation.name` attribute. - Update bundled trusted root certificates ## Removed - Remove the OpenTelemetry beta feature in favor of the new [AppSignal collector](https://docs.appsignal.com/collector). If you are using the AppSignal agent to send OpenTelemetry data in our public beta through the `/enriched` endpoint on the agent's HTTP server, please migrate to the collector to continue using the beta. The collector has a much better implementation of this feature for the beta. ## Fixed - Fix an issue where calling `appsignal.stop()` after sending check-in events would leave a dangling thread, stopping the application from shutting down correctly.
## Added - Set the app revision config option for Scalingo deploys automatically. If the `CONTAINER_VERSION` system environment variable is present, it will use used to set the `revision` config option automatically. Overwrite it's value by configuring the `revision` config option for your application. ## Fixed - Fix a performance issue when sanitising `INSERT INTO ... VALUES` queries.
## Added - Add support for heartbeat check-ins. Use the `appsignal.check_in.heartbeat` function to send a single heartbeat check-in event from your application. This can be used, for example, in your application's main loop: ```python from appsignal.check_in import heartbeat while True: heartbeat("job_processor") process_job() ``` Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the `.heartbeat` function is called, at most one heartbeat with the same identifier will be sent every ten seconds. Pass `continuous=True` as the second argument to send heartbeats continuously during the entire lifetime of the current process. This can be used, for example, after your application has finished its boot process: ```python def main(): start_app() heartbeat("my_app", continuous=True) ``` ## Changed - Change the primary download mirror for integrations. - Send check-ins concurrently. When calling `appsignal.check_in.cron`, instead of blocking the current thread while the check-in events are sent, schedule them to be sent in a separate thread.
## Added - Add helper to manually stop the agent process for this AppSignal instance. Some contexts, like serverless functions, exit before AppSignal can ensure all data is sent to our servers. To ensure the data is sent, the new `appsignal.stop()` method can be called to gracefully stop the AppSignal agent process.
## Changed - Rename heartbeats to cron check-ins. Calls to `appsignal.heartbeat` and `appsignal.Heartbeat` should be replaced with calls to `appsignal.check_in.cron` and `appsignal.check_in.Cron`, for example: ```python # Before from appsignal import heartbeat def do_something(): pass heartbeat("do_something", do_something) # After from appsignal.check_in import cron def do_something(): pass cron("do_something", do_something) ``` ## Deprecated - Calls to `appsignal.heartbeat` and to the `appsignal.Heartbeat` constructor will emit a deprecation warning.
PreviousNext