From ea495f966f222cd831b73227ca58f1a8aa11c92f Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 8 Oct 2024 08:15:51 +0000 Subject: [PATCH] python3Packages.opentelemetry-instrumentation-redis: init at 0.47b0 --- .../default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/opentelemetry-instrumentation-redis/default.nix diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-redis/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-redis/default.nix new file mode 100644 index 000000000000..7c86cb48876f --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-redis/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-semantic-conventions, + wrapt, + redis, + opentelemetry-test-utils, + pythonOlder, + pytestCheckHook, + fakeredis, +}: + +buildPythonPackage rec { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-redis"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-redis"; + + build-system = [ hatchling ]; + + dependencies = [ + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-semantic-conventions + wrapt + ]; + + nativeCheckInputs = [ + fakeredis + opentelemetry-test-utils + pytestCheckHook + ]; + + optional-dependencies = { + instruments = [ redis ]; + }; + + pythonImportsCheck = [ "opentelemetry.instrumentation.redis" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-redis"; + description = "Redis instrumentation for OpenTelemetry"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 644b110716ed..fc3b9b6c1121 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9401,6 +9401,8 @@ self: super: with self; { opentelemetry-instrumentation-requests = callPackage ../development/python-modules/opentelemetry-instrumentation-requests { }; + opentelemetry-instrumentation-redis = callPackage ../development/python-modules/opentelemetry-instrumentation-redis { }; + opentelemetry-instrumentation-wsgi = callPackage ../development/python-modules/opentelemetry-instrumentation-wsgi { }; opentelemetry-proto = callPackage ../development/python-modules/opentelemetry-proto { };