Commit Graph

1779 Commits

Author SHA1 Message Date
Johannes Liebermann 47bafab91b OpenTracing Bridge - Initial implementation (#211)
Initial implementation, without baggage support.
2019-10-24 16:46:23 +02:00
Johannes Liebermann 49b63f95a1 Fix mypy errors (#229)
In particular, the following errors are fixed in this commit:

* Don't return False in __exit__

Returning a literal causes a mypy error when combined with the
`typing.Optional[bool]` type hint. Furthermore, exception handling is
the same when returning `False` and when returning `None` (the
exception is re-raised). Therefore, it's simpler to remove the return
statement and change the type hint to `None`.

* Correctly initialize nested tuple

Tuples of length 1 should be initialized with a trailing comma to be
properly interpreted.

* Pass correct type to use_context() in test

* Add type annotations for test helper functions

Since we have `disallow_untyped_calls = True` in our mypy config for
tests, we must add type annotations to any function that is called
from a test.


Addditionally, bump minimal mypy version to 0.740 to consistently reproduce these errors.
2019-10-21 17:27:32 +02:00
Mauricio Vásquez 050ede7173 Add Jaeger exporter (#174)
This adds a Jeager exporter for OpenTelemetry.  This exporter is based
on https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-jaeger.

The exporter uses thrift and can be configured to send data to the agent and
also to a remote collector.

There is a long discussion going on about how to include generated files
in the repo, so for now just put them here.
2019-10-08 12:24:23 +02:00
Reiley Yang d0bee00e1a Move example app to the examples folder (#172) 2019-09-25 12:46:41 -07:00
Reiley Yang 657c8fd39e Skeleton for azure monitor exporters (#151) 2019-09-24 20:12:56 -07:00
Christian Neumüller f6f8d55816 Ensure that type info is picked up from installed package. (#124)
* Ensure that type info is picked up from installed package.

This required moving all top-level modules to a sub-package, to not
create collisions with py.typed marker files.

See https://www.python.org/dev/peps/pep-0561/#packaging-type-information

* Add MANIFEST.in for SDK package.
2019-09-16 11:19:34 +02:00
Aliaksei Urbanski 6765f82ab0 Fix skipping tests for PyPy (#133) 2019-09-11 10:25:00 +02:00
Yusuke Tsutsumi 1e8e5dd923 Introducing an example app instrumented with opentelemetry (#129)
Creating an example app that showcases how an application integrates with opentelemetry.
2019-09-10 22:14:26 -07:00
Christian Neumüller 786430c16c Fix setup for ext packages. (#122)
* Fix setup for ext packages.

Previously the wheels would contain the metadata but not the actual
code.

* Check that all packages install properly in test.

* Document why we don't use -e.
2019-09-06 11:30:18 +02:00
Aliaksei Urbanski ef4d7840a6 Describe isort's multi_line_output setting (#109)
These changes follow up the "Fix and improve tests for Python != 3.7" PR.

The multi_line_output was already set to 3 in the
"Add initial black formatting" PR, so after rebasing to master
this commit contains only comment that describes a magic number
from the isort configuration file.

Corresponding PR:

 - https://github.com/open-telemetry/opentelemetry-python/pull/109

Related discussions:

 - https://github.com/open-telemetry/opentelemetry-python/pull/95#discussion_r315942697

 - https://github.com/open-telemetry/opentelemetry-python/pull/95#issuecomment-523566519
2019-09-05 08:57:30 +02:00
Mauricio Vásquez cf13bbb94a tox: add --diff to isort (#118)
Sometimes it complains and it is difficult to understand what exactly it wants.
The --diff option allows to know what is the format it expects.
2019-09-02 13:23:40 +02:00
Allan Feldman 5b00ddcaed Add initial black formatting (#104)
Closes: #88
2019-08-29 10:20:42 -07:00
Christian Neumüller 5480b0eee6 Fix running tox on Windows. (#111) 2019-08-27 09:51:21 -07:00
Aliaksei Urbanski 6a8f3eeee7 Relax the pylint rule for constants (#108)
These changes follow up the "Fix and improve tests for Python != 3.7" PR.
2019-08-27 09:49:39 -07:00
Christian Neumüller 009de09c20 Requests integration (#94)
Adds requests integration. Two commits that might be of special interest (see #94):

* c66af2faa100b0f41afafdb6e4de9f4de4cc62bc requests test: Use actual Response object.

Co-Authored-By: Allan Feldman <6374032+a-feld@users.noreply.github.com>

* 1b90a0ddc286c936f7256b14e14ef36fd3c6a24f More tests, rename to http-requests to work around pylint bug (?)

See previous CI failure for pylint issue:

************* Module ext/opentelemetry-ext-requests/src/__init__.py
ext/opentelemetry-ext-requests/src/__init__.py:1:0: F0001: No module named ext/opentelemetry-ext-requests/src/__init__.py (fatal)

It seems that pylint gets confused when there is more than one "requests" module??
2019-08-27 16:01:23 +02:00
Aliaksei Urbanski 94be2dcd04 Improve testing (#95)
I believe it would be nice to have
tests on CI not only for Python 3.7,
but for all supported Python versions.

These changes:

 - fix compatibility with Python 3.5 and 3.4

 - add tests for various Python versions on CI

 - allow running tests for any branches
2019-08-26 12:48:04 +02:00
Allan Feldman db9fdb8a16 Implement WSGI middleware integration. (#84) 2019-08-19 11:10:15 -07:00
Chris Kleinknecht ead2e6b192 Span creation in tracer SDK (#69) 2019-08-06 13:36:20 -07:00
Chris Kleinknecht b6b1bc9a71 Lint SDK package (#65) 2019-07-26 16:53:07 -07:00
Chris Kleinknecht c150fb8c17 Add stub tracer SDK (#55) 2019-07-17 16:05:59 -07:00
Chris Kleinknecht e908d0eafa Add flake8 and isort lint checks (#46) 2019-07-16 10:34:40 -07:00
Christian Neumüller 981681a5dd Lint more files, relax some type checks (#43) 2019-07-15 16:03:02 -07:00
Christian Neumüller c1ee8c7777 Add unittest based unit-tests. (#42) 2019-07-12 14:28:47 +02:00
Christian Neumüller ab563ee34f Misc build improvements (build docs & more) (#38)
* Build docs.

* Minor tox.ini improvements.

* .gitignore mypy

* Fix doc build.

* Tell travis to build docs (with 3.7).
2019-07-08 10:28:34 +02:00
Reiley Yang 6205cfc0b3 Improve package layout (#37) 2019-07-01 13:40:06 -07:00
Chris Kleinknecht ef890d67eb Add type check to travis (#31) 2019-06-27 09:38:05 -07:00
Chris Kleinknecht 6838c64c8a Set pylint's line length to 79 chars (#35) 2019-06-27 09:03:05 -07:00
Chris Kleinknecht cbf464cc99 Add tox and travis, run pylint on builds (#30) 2019-06-26 13:55:13 -07:00
Christian Neumüller 24604c3204 Add a .pylintrc & fix warnings (#24)
* Add .pylintrc based on OpenCensus (related #6).

* Fix/disable pylint warnings.

* pylint: Fix W0107: Unnecessary pass statement (unnecessary-pass)

I'm not sure I like this warning.
2019-06-25 08:52:03 +02:00