Skip to content

Commit

Permalink
Update references to acknowledge and use Contrib folder
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN committed Nov 4, 2020
1 parent e50b450 commit bda99f5
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ exclude =
docs/examples/opentelemetry-example-app/build/*
opentelemetry-proto/build/*
opentelemetry-proto/src/opentelemetry/proto/
opentelemetry-python-contrib/
opentelemetry-python-contrib/
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

instr = "../opentelemetry-python-contrib/instrumentation"
instr_dirs = [
os.path.abspath("/".join(["../opentelemetry-python-contrib/instrumentation", f, "src"]))
os.path.abspath(
"/".join(["../opentelemetry-python-contrib/instrumentation", f, "src"])
)
for f in listdir(instr)
if isdir(join(instr, f))
]
Expand Down
1 change: 0 additions & 1 deletion docs/examples/django/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.http import HttpResponse

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/opentelemetry-example-app/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ install_requires =
typing; python_version<'3.5'
opentelemetry-api == 0.16.dev0
opentelemetry-sdk == 0.16.dev0
opentelemetry-instrumentation-requests == 0.16.dev0
opentelemetry-instrumentation-flask == 0.16.dev0
opentelemetry-instrumentation-requests == 0.15.b0
opentelemetry-instrumentation-flask == 0.15.b0
flask
requests
protobuf~=3.11
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The above is a great example, but it's very manual. Within the telemetry space,
* Database calls

To help instrument common scenarios, opentelemetry also has the concept of "instrumentations": packages that are designed to interface
with a specific framework or library, such as Flask and psycopg2.
with a specific framework or library, such as Flask and psycopg2. A list of the currently curated extension packages can be found `at the Contrib repo <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/master/instrumentation>`.

We will now instrument a basic Flask application that uses the requests library to send HTTP requests. First, install the instrumentation packages themselves:

Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ In addition, there are several extension packages which can be installed separat
pip install opentelemetry-instrumentation-{instrumentation}

These are for exporter and instrumentation packages respectively.
Some packages can be found in :scm_web:`instrumentation <instrumentation/>` and :scm_web:`exporter <exporter/>`
directory of the repository. The remaining packages can be round at the Contrib repo directory for
`instrumentation <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/master/instrumentation>`
and `exporters <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/master/exporter`.

Extensions
----------
Expand Down
5 changes: 5 additions & 0 deletions docs/instrumentation/opentracing_shim/opentracing_shim.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OpenTracing Shim for OpenTelemetry
==================================

.. automodule:: opentelemetry.instrumentation.opentracing_shim
:no-show-inheritance:
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = '''
opentelemetry-proto/src/opentelemetry/proto/common|
opentelemetry-proto/src/opentelemetry/proto/metrics|
opentelemetry-proto/src/opentelemetry/proto/resource|
opentelemetry-proto/src/opentelemetry/proto/trace
opentelemetry-proto/src/opentelemetry/proto/trace|
opentelemetry-python-contrib
)/
)
Expand Down
17 changes: 13 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ envlist =
pypy3-test-core-getting-started

; opentelemetry-example-app
py3{5,6,7,8}-test-instrumentation-example-app
pypy3-test-instrumentation-example-app
py3{5,6,7,8}-test-core-example-app
pypy3-test-core-example-app

; opentelemetry-exporter-jaeger
py3{5,6,7,8}-test-exporter-jaeger
Expand Down Expand Up @@ -73,6 +73,7 @@ changedir =
test-core-sdk: opentelemetry-sdk/tests
test-core-proto: opentelemetry-proto/tests
test-core-instrumentation: opentelemetry-instrumentation/tests
test-core-example-app: docs/examples/opentelemetry-example-app/tests
test-core-getting-started: docs/getting_started/tests
test-core-opentracing-shim: instrumentation/opentelemetry-instrumentation-opentracing-shim/tests

Expand Down Expand Up @@ -134,7 +135,9 @@ commands =
basepython: python3.8
recreate = True
deps =
-e {toxinidir}/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-grpc
-c dev-requirements.txt
asgiref
pylint
flake8
isort
Expand Down Expand Up @@ -191,12 +194,18 @@ commands =
[testenv:docker-tests]
deps =
pytest
docker-compose >= 1.25.2

changedir =
tests/opentelemetry-docker-tests/tests

commands_pre =
pip install -e {toxinidir}/exporter/opentelemetry-exporter-opencensus
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-sdk \
-e {toxinidir}/tests/util \
-e {toxinidir}/exporter/opentelemetry-exporter-opencensus
docker-compose up -d
commands =
pytest {posargs}

commands_post =
docker-compose down -v

0 comments on commit bda99f5

Please sign in to comment.