Add support for the aiopg
, asyncpg
, mysql
(from the mysql-connector-python
package), mysqlclient
, and pymysql
database adapters.
To enable AppSignal to instrument queries performed using these packages, follow the instructions in our PostgreSQL and MySQL documentation pages.
See the Python package 1.3.2 changelog for more information.
Add support for SQLAlchemy, SQLite and version 3 of the psycopg
PostgreSQL adapter.
To enable AppSignal to instrument queries performed using these packages, follow the instructions in our SQLAlchemy, SQLite and PostgreSQL documentation pages.
See the Python package 1.3.1 changelog for more information.
Heartbeats are currently only available to beta testers. If you are interested in trying it out, send an email to support@appsignal.com!
Add heartbeats support. You can use the heartbeat
function to send heartbeats directly from your code, to track the execution of certain processes:
from appsignal import heartbeat def send_invoices(): # ... your code here ... heartbeat("send_invoices")
It is also possible to pass a defined function as an argument to the heartbeat
function:
def send_invoices(): # ... your code here ... heartbeat("send_invoices", send_invoices)
If an exception is raised within the function, the finish event will not be reported to AppSignal, triggering a notification about the missing heartbeat. The exception will be raised outside of the heartbeat function.
See the Python package 1.3.0 changelog for more information.
When Flask apps received requests that didn't match with any app routes, those 404s were instrumented. This made the actions panel to show tons of actions corresponding to bots requests and the like, giving no meaningful information. This has been fixed and 404s will only be reported if they are part of your Flask app.
Add a minutely probes system. This can be used, alongside our metric helpers, to report metrics to AppSignal once per minute.
from appsignal import probes, set_gauge def new_carts(previous_carts=None): current_carts = Cart.objects.all().count() if previous_carts is not None: set_gauge("new_carts", current_carts - previous_carts) return current_carts probes.register("new_carts", new_carts)
The minutely probes system starts by default, but no probes are automatically registered. You can use the enable_minutely_probes
configuration option to disable it.
Implement CPU count configuration option. Use it to override the auto-detected, cgroups-provided number of CPUs that is used to calculate CPU usage percentages.
To set it, use the the cpu_count
configuration option or the APPSIGNAL_CPU_COUNT
environment variable.
Fix ASGI events, from Python ASGI applications that have been instrumented with AppSignal, mistakenly showing up in the "Slow API requests" panel.
Add distribution value custom metric helper. This can be used to add values to distributions in the same way as in our other integrations:
# Import the AppSignal metric helper from appsignal import add_distribution_value # The first argument is a string, the second argument a number (int/float) # add_distribution_value(metric_name, value) add_distribution_value("memory_usage", 100) add_distribution_value("memory_usage", 110) # Will create a metric "memory_usage" with the mean field value 105 # Will create a metric "memory_usage" with the count field value 2
See the Python package 1.1.1 changelog for more information.
See the Python package 1.1.0 changelog for more information.
df --local
command fails.See the Python package 1.0.4 changelog for more information.
route
tag from HTTP server spans. Since the span will already have the route attribute as part of its name, the tag is redundant./etc/hostname
, /etc/hosts
, /etc/resolv.conf
, /snap/
or /proc/
is ignored.method
tag extracted from an incoming HTTP request span would be overriden with the method used for an outgoing HTTP request span.df
) on Alpine Linux. This host metric would report an error on Alpine Linux.See the Python package 1.0.3 changelog for more information.
See the Python package 1.0.2 changelog for more information.
Report the agent's architecture and platform in the diagnose report as the "Agent architecture" field. This helps debug if the installed package version matches the host architecture and platform. If they do not match, the package for the wrong architecture is installed.
Report the package install path in the diagnose report as the "Package install path" field. This field will help us debug issues related to paths in the diagnose report viewer.
Report whether the app is running in a container in the diagnose report as the "Running in container" field. This field will help notify us about the environment in which the app is running, as containers have different behavior from more standard Virtual Machines.
Bump agent to b604345.
running_in_container
to agent diagnose report, to be used primarily by the Python package as a way to detect if an app's host is a container or not.See the Python package 1.0.1 changelog for more information.
Release AppSignal for Python package version 1.0!
Read our Python package version 1.0 announcement blog post!
This release marks the 1.0 release of our Python integration and contains the following features:
Please see our Python package documentation and guides for more information. Reach out to us on support@appsignal.com if you need any help 👋
ValueError
to DemoError
to better communicate this is an example error and should not be treated as a real error from the app.appsignal.log
file, was not found, the diagnose CLI would exit with an error when trying to read from the file. It will now no longer try to read a non-existing file and no longer error.See the Python package 1.0.0 changelog for more information.
Add the --environment
CLI option to the demo CLI tool. This allow you to configure to which app environment the demo samples should be sent. It would default to development (and only be configurable via the APPSIGNAL_APP_ENV
environment variable), but now it's configurable through the CLI options as well.
python -m appsignal demo --environment=production
Add the set_sql_body
tracing helper to set the body attribute on a span that contains a SQL query. When using this helper the given SQL query will be sanitized, reducing the chances of sending sensitive data to AppSignal.
from appsignal import set_sql_body # Must be used in an instrumented context -- e.g. a Django or Flask handler def index(): set_sql_body("SELECT * FROM users WHERE 'password' = 'secret'") # Will be stored as: set_sql_body("SELECT * FROM users WHERE 'password' = ?")
When the set_body
helper is also used, the set_sql_body
overwrites the set_body
attribute.
More information about our tracing helpers can be found in our documentation.
When the __appsignal__.py
file is found in the directory in which the demo and diagnose CLIs are run (python -m appsignal demo
or python -m appsignal diagnose
), AppSignal will now load the __appsignal__.py
file's configuration. When this file is loaded, the demo and diagnose CLI will use the configuration declared in that file to send the demo data and compile a diagnose report. In this scenario, it will no longer prompt you to enter the application configuration manually.
Bump agent to 8260fa1
Add appsignal.sql_body
magic span attribute for OpenTelemetry spans. When this attribute is detected, we store the value as the span/event body. This span is sanitized beforehand so it doesn't contain any sensitive data and helps to group events in our backend. When used in combination with the appsignal.body
attribute, the new appsignal.sql_body
attribute is leading.
More information on AppSignal OpenTelemetry span attributes can be found in our docs.
python -m appsignal diagnose
). The agent diagnose report would always contain an error, because it did not pick up the AppSignal configuration properly.See the Python package 0.3.2 changelog for more information.
memory_in_percentages
and swap_in_percentages
host metrics that represents metrics in percentages./snap/
disk mountpoints.See the Python package 0.3.1 changelog for more information.
Support OpenTelemetry metrics through its metrics exporter. We enable the metrics exporter by default so it can be used to collect data from instrumentations and manually by using an OpenTelemetry metrics meter. Not all metric types are supported at this time, only counters (sums) and gauges.
Add error helpers. These helpers simplify reporting errors to AppSignal that are not handled automatically by your framework, alongside the current instrumented context or separately. For example, to report an error from an except
clause as a separate sample:
from appsignal import send_error def index(): cookies = put_hand_in_cookie_jar() except HandStuckError as error: send_error(error)
More information about error helpers is available in our documentation.
Add sample data helpers. These helpers simplify adding properties to OpenTelemetry spans that display specific data in the AppSignal sample UI. For example, to add custom data to the current sample:
from appsignal import set_custom_data # Must be used in an instrumented context -- e.g. a Flask handler @app.get("/") def index(): set_custom_data({"hello": "there"})
The full list of sample data helpers is available in our documentation as part of the tagging and sample data guides and namespace guide.
Add helper for reporting counter metrics to AppSignal using OpenTelemetry. Use these helpers to simplify sending counter metrics as supported by AppSignal.
from appsignal import increment_counter # Report a counter increasing increment_counter("counter_name", 1) # Report a counter decreasing increment_counter("counter_name", -1) # Add tags to counter increment_counter("counter_with_tags", 1, {"tag1": "value1"})
Consult our documentation for more information about AppSignal's custom metrics.
Add helper for reporting gauge metrics to AppSignal using OpenTelemetry. Use these helpers to simplify sending gauge metrics as supported by AppSignal.
from appsignal import set_gauge # Report a gauge value set_gauge("gauge_name", 10) # Add tags to metrics set_gauge("gauge_with_tags", 10, {"tag1": "value1"})
Consult our documentation for more information about AppSignal's custom metrics.
disk_inode_usage
metric name format to not be interpreted as a JSON object.role
option to host_role
so it's consistent with the integrations naming.See the Python package 0.3.0 changelog for more information.
python -m appsignal
. It would error with a ModuleNotFoundError
.See the Python package 0.2.3 changelog for more information.
statsd_port
config option to change the StatsD UDP server port of the appsignal-agent process. By default the port is set to 8125.host_role
config option. This config option can be set per host to generate some metrics automatically per host and possibly do things like grouping in the future.opentelemetry_port
) to configure on which port the appsignal-agent
server process will listen for OpenTelemetry data from the HTTP exporter. This can be used to configure two apps on the same machine to use different ports so it's possible to run two AppSignal apps on the same machine. See our Running multiple applications on one host docs page for more information.See the Python package 0.2.2 changelog for more information.
Warn if the appsignal-beta
package is present in the dependencies list to nudge people into switching to the new appsignal
package. If you have appsignal-beta
as a dependency in your project, please update it to say appsignal
instead.
See the Python package 0.2.1 changelog for more information.
In this release we've renamed the AppSignal for Python package to appsignal
(previously appsignal-beta
)! Please update your dependencies (for example, in requirements.txt
) accordingly.
RENDER_GIT_COMMIT
environment variable as revision if no revision is specified.bind_address
config option. This is by default set to 127.0.0.1
, which only makes it accessible from the same host. If you want it to be accessible from other machines, use 0.0.0.0
or a specific IP address.state
tag value on the cpu
metric called total_usage
, which reports the VM's total CPU usage in percentages.appsignal-beta
to appsignal
. Please update your dependencies (for example, in requirements.txt
) accordingly.sql_lexer
to v0.9.5. It adds sanitization support for the THEN
and ELSE
logical operators.See the Python package 0.2.0 changelog for more information.
Add support for ASGI-based frameworks such as FastAPI and Starlette.
See the changelog for more information.
AppSignal offers a 30-day free trial, no credit card is required. All features are available in all plans. Start monitoring your application in just a few clicks!