Skip to content

Commit 80455ed

Browse files
authored
Componentize the remaining integration extensions (2nd part) (census-instrumentation#540)
* componentize the remaining exts * add ext packages to test script nox.py * revert rename of test_ext_utils.py * fix typo * update changelog * add wrapt dependency to opencensus-ext-requests
1 parent 772ac6e commit 80455ed

File tree

63 files changed

+524
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+524
-83
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
- Replace stackdriver `gke_container` resources, see the [GKE migration
1010
notes](https://cloud.google.com/monitoring/kubernetes-engine/migration#incompatible)
1111
for details
12+
- Componentize the package distribution. All [contrib
13+
packages](https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/)
14+
are now decoupled from the core library, and can be released separately.
1215

1316
## 0.2.0
1417
Released 2019-01-18

contrib/opencensus-ext-django/opencensus/ext/django/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
import logging
1717

1818
from opencensus.ext.django.config import (settings, convert_to_import)
19-
from opencensus.trace.ext import utils
2019
from opencensus.trace import attributes_helper
2120
from opencensus.trace import execution_context
2221
from opencensus.trace import span as span_module
2322
from opencensus.trace import tracer as tracer_module
23+
from opencensus.trace import utils
2424
from opencensus.trace.samplers import probability
2525

2626
try:

contrib/opencensus-ext-django/tests/test_django_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
from opencensus.common.transports import sync
2222
from opencensus.trace import execution_context
2323
from opencensus.trace import span as span_module
24+
from opencensus.trace import utils
2425
from opencensus.trace.exporters import print_exporter
2526
from opencensus.trace.exporters import zipkin_exporter
2627
from opencensus.trace.exporters import jaeger_exporter
2728
from opencensus.trace.exporters.ocagent import trace_exporter
28-
from opencensus.trace.ext import utils
2929
from opencensus.trace.propagation import google_cloud_format
3030
from opencensus.trace.samplers import always_on
3131
from opencensus.trace.samplers import probability

contrib/opencensus-ext-flask/opencensus/ext/flask/flask_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
from opencensus.trace import stack_trace
2727
from opencensus.trace import status
2828
from opencensus.trace import tracer as tracer_module
29+
from opencensus.trace import utils
2930
from opencensus.trace.exporters import print_exporter
30-
from opencensus.trace.ext import utils
3131
from opencensus.trace.propagation import google_cloud_format
3232
from opencensus.trace.samplers import always_on, probability
3333

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## Unreleased
4+
5+
- Initial version.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
OpenCensus Google Cloud Client Libraries Integration
2+
============================================================================
3+
4+
Installation
5+
------------
6+
7+
::
8+
9+
pip install opencensus-ext-google-cloud-clientlibs
10+
11+
Usage
12+
-----
13+
14+
.. code:: python
15+
16+
# TBD
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

opencensus/trace/ext/google_cloud_clientlibs/__init__.py renamed to contrib/opencensus-ext-google-cloud-clientlibs/opencensus/ext/google_cloud_clientlibs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from opencensus.trace.ext.google_cloud_clientlibs import trace
15+
from opencensus.ext.google_cloud_clientlibs import trace
1616

1717
__all__ = ['trace']

opencensus/trace/ext/google_cloud_clientlibs/trace.py renamed to contrib/opencensus-ext-google-cloud-clientlibs/opencensus/ext/google_cloud_clientlibs/trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
from google.api_core import grpc_helpers
2121

2222
from opencensus.trace import execution_context
23-
from opencensus.trace.ext.grpc.client_interceptor import (
23+
from opencensus.ext.grpc.client_interceptor import (
2424
OpenCensusClientInterceptor)
2525

26-
from opencensus.trace.ext.requests.trace import (
26+
from opencensus.ext.requests.trace import (
2727
trace_integration as trace_requests)
2828

2929
log = logging.getLogger(__name__)

0 commit comments

Comments
 (0)