Also add to observability tests

pull/37241/head
Xuan Wang 4 months ago
parent a19a12cefa
commit 00d8b3dee9
  1. 1
      src/python/grpcio_tests/tests/fork/BUILD.bazel
  2. 3
      src/python/grpcio_tests/tests/observability/BUILD.bazel
  3. 4
      src/python/grpcio_tests/tests/observability/_csm_observability_plugin_test.py
  4. 4
      src/python/grpcio_tests/tests/observability/_observability_plugin_test.py
  5. 4
      src/python/grpcio_tests/tests/observability/_open_telemetry_observability_test.py

@ -19,6 +19,7 @@ pyx_library(
deps = ["@com_google_absl//absl/debugging:failure_signal_handler"], deps = ["@com_google_absl//absl/debugging:failure_signal_handler"],
visibility = [ visibility = [
"//src/python/grpcio_tests/tests_py3_only/interop:__subpackages__", "//src/python/grpcio_tests/tests_py3_only/interop:__subpackages__",
"//src/python/grpcio_tests/tests/observability:__subpackages__",
], ],
) )

@ -42,6 +42,7 @@ py_test(
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_observability/grpc_observability:pyobservability", "//src/python/grpcio_observability/grpc_observability:pyobservability",
"//src/python/grpcio_tests/tests/testing", "//src/python/grpcio_tests/tests/testing",
"//src/python/grpcio_tests/tests/fork:native_debug",
requirement("opentelemetry-sdk"), requirement("opentelemetry-sdk"),
], ],
) )
@ -57,6 +58,7 @@ py_test(
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_observability/grpc_observability:pyobservability", "//src/python/grpcio_observability/grpc_observability:pyobservability",
"//src/python/grpcio_tests/tests/testing", "//src/python/grpcio_tests/tests/testing",
"//src/python/grpcio_tests/tests/fork:native_debug",
requirement("protobuf"), requirement("protobuf"),
requirement("opentelemetry-sdk"), requirement("opentelemetry-sdk"),
], ],
@ -73,6 +75,7 @@ py_test(
"//src/python/grpcio/grpc:grpcio", "//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_csm_observability/grpc_csm_observability:csm_observability", "//src/python/grpcio_csm_observability/grpc_csm_observability:csm_observability",
"//src/python/grpcio_tests/tests/testing", "//src/python/grpcio_tests/tests/testing",
"//src/python/grpcio_tests/tests/fork:native_debug",
requirement("protobuf"), requirement("protobuf"),
requirement("opentelemetry-sdk"), requirement("opentelemetry-sdk"),
], ],

@ -43,6 +43,10 @@ from opentelemetry.sdk.metrics.export import MetricsData
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.resources import Resource
from src.python.grpcio_tests.tests.fork import native_debug
native_debug.install_failure_signal_handler()
from tests.observability import _test_server from tests.observability import _test_server
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -33,6 +33,10 @@ from opentelemetry.sdk.metrics.export import MetricExporter
from opentelemetry.sdk.metrics.export import MetricsData from opentelemetry.sdk.metrics.export import MetricsData
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
from src.python.grpcio_tests.tests.fork import native_debug
native_debug.install_failure_signal_handler()
from tests.observability import _test_server from tests.observability import _test_server
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

@ -36,6 +36,10 @@ from opentelemetry.sdk.metrics.export import MetricExporter
from opentelemetry.sdk.metrics.export import MetricsData from opentelemetry.sdk.metrics.export import MetricsData
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
from src.python.grpcio_tests.tests.fork import native_debug
native_debug.install_failure_signal_handler()
from tests.observability import _test_server from tests.observability import _test_server
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

Loading…
Cancel
Save