From b7a34d289dfe4d0d1733afe57413a5b9dc49b25b Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 1 Aug 2024 15:55:14 +0200 Subject: [PATCH 1/2] python3Packages.opentelemetry-instrumentation-dbapi: init at 0.46b0 --- .../default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/opentelemetry-instrumentation-dbapi/default.nix diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-dbapi/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-dbapi/default.nix new file mode 100644 index 000000000000..286102d97e61 --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-dbapi/default.nix @@ -0,0 +1,40 @@ +{ + buildPythonPackage, + pythonOlder, + pytestCheckHook, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-semantic-conventions, + opentelemetry-test-utils, +}: + +buildPythonPackage { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-dbapi"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-dbapi"; + + build-system = [ hatchling ]; + + dependencies = [ + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-semantic-conventions + ]; + + nativeCheckInputs = [ + opentelemetry-test-utils + pytestCheckHook + ]; + + pythonImportsCheck = [ "opentelemetry.instrumentation.dbapi" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-dbapi"; + description = "OpenTelemetry Database API instrumentation"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b7cce422d313..44bd06e7dc0c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9486,6 +9486,8 @@ self: super: with self; { opentelemetry-instrumentation-asgi = callPackage ../development/python-modules/opentelemetry-instrumentation-asgi { }; + opentelemetry-instrumentation-dbapi = callPackage ../development/python-modules/opentelemetry-instrumentation-dbapi { }; + opentelemetry-instrumentation-django = callPackage ../development/python-modules/opentelemetry-instrumentation-django { }; opentelemetry-instrumentation-fastapi = callPackage ../development/python-modules/opentelemetry-instrumentation-fastapi { }; From 6b9c40ed3c18a6dc66e4ed272160dab01a809db2 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 1 Aug 2024 15:55:42 +0200 Subject: [PATCH 2/2] python3Packages.opentelemetry-instrumentation-psycopg2: init at 0.46b0 --- .../default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/opentelemetry-instrumentation-psycopg2/default.nix diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-psycopg2/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-psycopg2/default.nix new file mode 100644 index 000000000000..2035b07c939f --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-psycopg2/default.nix @@ -0,0 +1,42 @@ +{ + buildPythonPackage, + pythonOlder, + pytestCheckHook, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-instrumentation-dbapi, + opentelemetry-test-utils, + psycopg2, +}: + +buildPythonPackage { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-psycopg2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-psycopg2"; + + build-system = [ hatchling ]; + + dependencies = [ + psycopg2 + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-instrumentation-dbapi + ]; + + nativeCheckInputs = [ + opentelemetry-test-utils + pytestCheckHook + ]; + + pythonImportsCheck = [ "opentelemetry.instrumentation.psycopg2" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-psycopg2"; + description = "OpenTelemetry Psycopg Instrumentation"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 44bd06e7dc0c..251571df44b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9496,6 +9496,8 @@ self: super: with self; { opentelemetry-instrumentation-grpc = callPackage ../development/python-modules/opentelemetry-instrumentation-grpc { }; + opentelemetry-instrumentation-psycopg2 = callPackage ../development/python-modules/opentelemetry-instrumentation-psycopg2 { }; + opentelemetry-instrumentation-wsgi = callPackage ../development/python-modules/opentelemetry-instrumentation-wsgi { }; opentelemetry-proto = callPackage ../development/python-modules/opentelemetry-proto { };