From 70495ce19e88964e9801770d615dc5b40837a751 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 7 Oct 2024 09:11:17 +0000 Subject: [PATCH] python3Packages.opentelemetry-instrumentation-requests: init at 0.47b0 --- .../default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/opentelemetry-instrumentation-requests/default.nix diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-requests/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-requests/default.nix new file mode 100644 index 0000000000000..fb01247ccfe07 --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-requests/default.nix @@ -0,0 +1,46 @@ +{ + buildPythonPackage, + requests, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-semantic-conventions, + opentelemetry-util-http, + httpretty, + opentelemetry-test-utils, + pytestCheckHook, + pythonOlder, +}: + +buildPythonPackage rec { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-requests"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-requests"; + + build-system = [ hatchling ]; + + dependencies = [ + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-semantic-conventions + opentelemetry-util-http + requests + ]; + + nativeCheckInputs = [ + httpretty + opentelemetry-test-utils + pytestCheckHook + ]; + + pythonImportsCheck = [ "opentelemetry.instrumentation.requests" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-requests"; + description = "Requests instrumentation for OpenTelemetry"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7b7ed5e1154f3..cf7e80d6a6414 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9387,6 +9387,8 @@ self: super: with self; { opentelemetry-instrumentation-psycopg2 = callPackage ../development/python-modules/opentelemetry-instrumentation-psycopg2 { }; + opentelemetry-instrumentation-requests = callPackage ../development/python-modules/opentelemetry-instrumentation-requests { }; + opentelemetry-instrumentation-wsgi = callPackage ../development/python-modules/opentelemetry-instrumentation-wsgi { }; opentelemetry-proto = callPackage ../development/python-modules/opentelemetry-proto { };