diff --git a/.changesets/add-support-for-pika.md b/.changesets/add-support-for-pika.md new file mode 100644 index 0000000..48911b1 --- /dev/null +++ b/.changesets/add-support-for-pika.md @@ -0,0 +1,6 @@ +--- +bump: patch +type: add +--- + +Add support for Pika diff --git a/src/appsignal/config.py b/src/appsignal/config.py index 709a772..f45c8cc 100644 --- a/src/appsignal/config.py +++ b/src/appsignal/config.py @@ -104,6 +104,7 @@ class Config: "opentelemetry.instrumentation.jinja2", "opentelemetry.instrumentation.mysql", "opentelemetry.instrumentation.mysqlclient", + "opentelemetry.instrumentation.pika", "opentelemetry.instrumentation.psycopg", "opentelemetry.instrumentation.psycopg2", "opentelemetry.instrumentation.pymysql", diff --git a/src/appsignal/opentelemetry.py b/src/appsignal/opentelemetry.py index 9b953f8..b8522d2 100644 --- a/src/appsignal/opentelemetry.py +++ b/src/appsignal/opentelemetry.py @@ -103,6 +103,12 @@ def add_mysqlclient_instrumentation() -> None: MySQLClientInstrumentor().instrument() +def add_pika_instrumentation() -> None: + from opentelemetry.instrumentation.pika import PikaInstrumentor + + PikaInstrumentor().instrument() + + def add_psycopg2_instrumentation() -> None: from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor @@ -158,6 +164,7 @@ def add_sqlite3_instrumentation() -> None: "opentelemetry.instrumentation.jinja2": add_jinja2_instrumentation, "opentelemetry.instrumentation.mysql": add_mysql_instrumentation, "opentelemetry.instrumentation.mysqlclient": add_mysqlclient_instrumentation, + "opentelemetry.instrumentation.pika": add_pika_instrumentation, "opentelemetry.instrumentation.psycopg2": add_psycopg2_instrumentation, "opentelemetry.instrumentation.psycopg": add_psycopg_instrumentation, "opentelemetry.instrumentation.pymysql": add_pymysql_instrumentation,