Repository: googleapis/python-bigquery

Issue:
google-cloud-bigquery[opentelemetry] un-installable together with opentelemetry-exporter-google-cloud
According to the instructions [Instrumenting With OpenTelemetry](https://github.com/googleapis/python-bigquery#instrumenting-with-opentelemetry) in the README the following packages needs to be installed to use OpenTelemtry tracing `google-cloud-bigquery[opentelemetry] opentelemetry-exporter-google-cloud`, but `google-cloud-bigquery[opentelemetry]` depends on `opentelemetry-api`, `opentelemetry-sdk`, and `opentelemetry-instrumentation` of version `0.9b0` [setup.py](https://github.com/googleapis/python-bigquery/blob/master/setup.py#L57-L61).

But there is no version of `opentelemetry-exporter-google-cloud` that can use that (old) version.

https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/master/opentelemetry-exporter-google-cloud

#### Environment details

  - OS type and version: macOS 10.15
  - Python version: 3.8.6
  - pip version: 20.3.3
  - `google-cloud-bigquery` version: 2.2.0

#### Steps to reproduce

```
$ pip3.8 install --user -r <(echo "google-cloud-bigquery[opentelemetry]==2.2.0
opentelemetry-exporter-google-cloud")

Requirement already satisfied: google-cloud-bigquery[opentelemetry]==2.2.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from -r /dev/fd/63 (line 1)) (2.2.0)
Requirement already satisfied: opentelemetry-exporter-google-cloud in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from -r /dev/fd/63 (line 2)) (0.11b0)
Requirement already satisfied: google-resumable-media<2.0dev,>=0.6.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.1.0)
Requirement already satisfied: proto-plus>=1.10.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.10.0)
Requirement already satisfied: google-api-core[grpc]<2.0.0dev,>=1.22.2 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.22.2)
Requirement already satisfied: protobuf>=3.12.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (3.13.0)
Requirement already satisfied: six<2.0.0dev,>=1.13.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.15.0)
Requirement already satisfied: google-cloud-core<2.0dev,>=1.4.1 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.4.3)
Collecting opentelemetry-sdk==0.9b0; extra == "opentelemetry"
  Using cached opentelemetry_sdk-0.9b0-py3-none-any.whl (33 kB)
Requirement already satisfied: opentelemetry-instrumentation==0.9b0; extra == "opentelemetry" in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (0.9b0)
Collecting opentelemetry-api==0.9b0; extra == "opentelemetry"
  Using cached opentelemetry_api-0.9b0-py3-none-any.whl (43 kB)
Requirement already satisfied: google-cloud-monitoring in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from opentelemetry-exporter-google-cloud->-r /dev/fd/63 (line 2)) (1.1.0)
Requirement already satisfied: google-cloud-trace in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from opentelemetry-exporter-google-cloud->-r /dev/fd/63 (line 2)) (0.24.0)
Requirement already satisfied: google-crc32c<2.0dev,>=1.0; python_version >= "3.5" in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.0.0)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.52.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (2.24.0)
Requirement already satisfied: google-auth<2.0dev,>=1.21.1 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.22.0)
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.8/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (50.3.0)
Requirement already satisfied: pytz in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (2020.1)
Requirement already satisfied: grpcio<2.0dev,>=1.29.0; extra == "grpc" in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.32.0)
Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from opentelemetry-instrumentation==0.9b0; extra == "opentelemetry"->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.12.1)
Requirement already satisfied: idna<3,>=2.5 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.25.10)
Requirement already satisfied: certifi>=2017.4.17 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (3.0.4)
Requirement already satisfied: aiohttp<4.0.0dev,>=3.6.2; python_version >= "3.6" in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (3.6.2)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (4.6)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (4.1.1)
Requirement already satisfied: async-timeout<4.0,>=3.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from aiohttp<4.0.0dev,>=3.6.2; python_version >= "3.6"->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (3.0.1)
Requirement already satisfied: multidict<5.0,>=4.5 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from aiohttp<4.0.0dev,>=3.6.2; python_version >= "3.6"->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (4.7.6)
Requirement already satisfied: yarl<2.0,>=1.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from aiohttp<4.0.0dev,>=3.6.2; python_version >= "3.6"->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (1.6.0)
Requirement already satisfied: attrs>=17.3.0 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from aiohttp<4.0.0dev,>=3.6.2; python_version >= "3.6"->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (20.2.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /Users/rvonessen/Library/Python/3.8/lib/python/site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-bigquery[opentelemetry]==2.2.0->-r /dev/fd/63 (line 1)) (0.4.8)
Installing collected packages: opentelemetry-api, opentelemetry-sdk
  Attempting uninstall: opentelemetry-api
    Found existing installation: opentelemetry-api 0.11b0
    Uninstalling opentelemetry-api-0.11b0:
      Successfully uninstalled opentelemetry-api-0.11b0
  Attempting uninstall: opentelemetry-sdk
    Found existing installation: opentelemetry-sdk 0.11b0
    Uninstalling opentelemetry-sdk-0.11b0:
      Successfully uninstalled opentelemetry-sdk-0.11b0
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

opentelemetry-exporter-google-cloud 0.11b0 requires opentelemetry-api==0.11b0, but you'll have opentelemetry-api 0.9b0 which is incompatible.
opentelemetry-exporter-google-cloud 0.11b0 requires opentelemetry-sdk==0.11b0, but you'll have opentelemetry-sdk 0.9b0 which is incompatible.
```
(The result is the same using the `2020-resolver`.)



Discussion:
Do you know if there are changes required to work with `opentelemetry-sdk` 0.11b0? PRs welcome to update the requirements in `setup.py`.
I don't know, but maybe I have some time to look into it soon. Let's see. 

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -55,9 +55,9 @@
     ],
     "tqdm": ["tqdm >= 4.7.4, <5.0.0dev"],
     "opentelemetry": [
-        "opentelemetry-api==0.9b0",
-        "opentelemetry-sdk==0.9b0",
-        "opentelemetry-instrumentation==0.9b0 ",
+        "opentelemetry-api==0.11b0",
+        "opentelemetry-sdk==0.11b0",
+        "opentelemetry-instrumentation==0.11b0",
     ],
 }
 


Test patch: