diff --git a/.gitmodules b/.gitmodules index 990472d7fc8..767f03b22a3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,3 +49,6 @@ [submodule "third_party/opencensus-proto"] path = third_party/opencensus-proto url = https://github.com/census-instrumentation/opencensus-proto.git +[submodule "third_party/opentelemetry"] + path = third_party/opentelemetry + url = https://github.com/open-telemetry/opentelemetry-proto.git diff --git a/third_party/opentelemetry b/third_party/opentelemetry new file mode 160000 index 00000000000..60fa8754d89 --- /dev/null +++ b/third_party/opentelemetry @@ -0,0 +1 @@ +Subproject commit 60fa8754d890b5c55949a8c68dcfd7ab5c2395df diff --git a/tools/distrib/python/.gitignore b/tools/distrib/python/.gitignore index 266a230198d..5cd990ac46b 100644 --- a/tools/distrib/python/.gitignore +++ b/tools/distrib/python/.gitignore @@ -7,3 +7,5 @@ validate/ google/ opencensus/ xds/ +build/ +opentelemetry/ diff --git a/tools/distrib/python/xds_protos/build.py b/tools/distrib/python/xds_protos/build.py index 215fb8e60c8..6434272bc77 100644 --- a/tools/distrib/python/xds_protos/build.py +++ b/tools/distrib/python/xds_protos/build.py @@ -36,6 +36,8 @@ GOOGLEAPIS_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'googleapis') VALIDATE_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'protoc-gen-validate') OPENCENSUS_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'opencensus-proto', 'src') +OPENTELEMETRY_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', + 'opentelemetry') WELL_KNOWN_PROTOS_INCLUDE = pkg_resources.resource_filename( 'grpc_tools', '_proto') OUTPUT_PATH = WORK_DIR @@ -68,6 +70,7 @@ COMPILE_PROTO_ONLY = [ '--proto_path={}'.format(VALIDATE_ROOT), '--proto_path={}'.format(WELL_KNOWN_PROTOS_INCLUDE), '--proto_path={}'.format(OPENCENSUS_PROTO_ROOT), + '--proto_path={}'.format(OPENTELEMETRY_PROTO_ROOT), '--python_out={}'.format(OUTPUT_PATH), ] COMPILE_BOTH = COMPILE_PROTO_ONLY + ['--grpc_python_out={}'.format(OUTPUT_PATH)] @@ -121,11 +124,13 @@ def main(): compile_protos(GOOGLEAPIS_ROOT, os.path.join('google', 'type')) compile_protos(VALIDATE_ROOT, 'validate') compile_protos(OPENCENSUS_PROTO_ROOT) + compile_protos(OPENTELEMETRY_PROTO_ROOT) # Generate __init__.py files for all modules create_init_file(WORK_DIR) for proto_root_module in [ - 'envoy', 'google', 'opencensus', 'udpa', 'validate', 'xds' + 'envoy', 'google', 'opencensus', 'udpa', 'validate', 'xds', + 'opentelemetry' ]: for root, _, _ in os.walk(os.path.join(WORK_DIR, proto_root_module)): package_path = os.path.relpath(root, WORK_DIR) diff --git a/tools/distrib/python/xds_protos/setup.py b/tools/distrib/python/xds_protos/setup.py index 5521348b942..3acb218aa10 100644 --- a/tools/distrib/python/xds_protos/setup.py +++ b/tools/distrib/python/xds_protos/setup.py @@ -38,7 +38,7 @@ INSTALL_REQUIRES = [ SETUP_REQUIRES = INSTALL_REQUIRES + ['grpcio-tools'] setuptools.setup( name='xds-protos', - version='0.0.10', + version='0.0.11', packages=PACKAGES, description='Generated Python code from envoyproxy/data-plane-api', long_description_content_type='text/x-rst', diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index a0ba3a6db02..fe2fb883c09 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -36,6 +36,7 @@ third_party/googleapis 82944da21578a53b74e547774cf62ed31a05b841 third_party/googletest c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/libuv 15ae750151ac9341e5945eb38f8982d59fb99201 third_party/opencensus-proto 4aa53e15cbf1a47bc9087e6cfdca214c1eea4e89 +third_party/opentelemetry 60fa8754d890b5c55949a8c68dcfd7ab5c2395df third_party/protobuf 436bd7880e458532901c58f4d9d1ea23fa7edd52 third_party/protoc-gen-validate 872b28c457822ed9c2a5405da3c33f386ac0e86f third_party/re2 aecba11114cf1fac5497aeb844b6966106de3eb6