Add opentelemetry as a submodule for latest xDS API (#26850)

* Add opentelemetry

* Python changes for opentelemetry

* Add opentelemetry to check submodules
pull/26848/head^2
Lidi Zheng 3 years ago committed by GitHub
parent 931f91b745
commit eb4b65ae5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .gitmodules
  2. 1
      third_party/opentelemetry
  3. 2
      tools/distrib/python/.gitignore
  4. 7
      tools/distrib/python/xds_protos/build.py
  5. 2
      tools/distrib/python/xds_protos/setup.py
  6. 1
      tools/run_tests/sanity/check_submodules.sh

3
.gitmodules vendored

@ -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

@ -0,0 +1 @@
Subproject commit 60fa8754d890b5c55949a8c68dcfd7ab5c2395df

@ -7,3 +7,5 @@ validate/
google/
opencensus/
xds/
build/
opentelemetry/

@ -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)

@ -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',

@ -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

Loading…
Cancel
Save