2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
2024-04-21 15:54:59 +00:00
|
|
|
, stdenv
|
2023-08-04 22:07:22 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, hatchling
|
|
|
|
, opentelemetry-api
|
|
|
|
, opentelemetry-instrumentation
|
|
|
|
, opentelemetry-sdk
|
|
|
|
, opentelemetry-semantic-conventions
|
|
|
|
, opentelemetry-test-utils
|
|
|
|
, wrapt
|
|
|
|
, pytestCheckHook
|
|
|
|
, grpcio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit (opentelemetry-instrumentation) version src;
|
|
|
|
pname = "opentelemetry-instrumentation-grpc";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-grpc";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-08-04 22:07:22 +00:00
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-08-04 22:07:22 +00:00
|
|
|
opentelemetry-api
|
|
|
|
opentelemetry-instrumentation
|
|
|
|
opentelemetry-sdk
|
|
|
|
opentelemetry-semantic-conventions
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
instruments = [ grpcio ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
opentelemetry-test-utils
|
|
|
|
grpcio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
# RuntimeError: Failed to bind to address
|
|
|
|
"TestOpenTelemetryServerInterceptorUnix"
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
pythonImportsCheck = [ "opentelemetry.instrumentation.grpc" ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = opentelemetry-instrumentation.meta // {
|
|
|
|
homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-grpc";
|
|
|
|
description = "OpenTelemetry Instrumentation for grpc";
|
|
|
|
};
|
|
|
|
}
|