Skip to content

Commit

Permalink
Merge pull request #117 from NathanielRN/move-instrumentation-sqlalchemy
Browse files Browse the repository at this point in the history
Move instrumentation sqlalchemy
  • Loading branch information
alrex authored Nov 2, 2020
2 parents 3292468 + 1ea79d5 commit 096c492
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ package_dir=
=src
packages=find_namespace:
install_requires =
opentelemetry-api == 0.15.dev0
opentelemetry-instrumentation == 0.15.dev0
opentelemetry-api == 0.15b0
opentelemetry-instrumentation == 0.15b0
wrapt >= 1.11.2
sqlalchemy

[options.extras_require]
test =
opentelemetry-sdk == 0.15.dev0
opentelemetry-sdk == 0.15b0
pytest

[options.packages.find]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from opentelemetry import trace
from opentelemetry.instrumentation.sqlalchemy.version import __version__
from opentelemetry.trace.status import Status, StatusCanonicalCode
from opentelemetry.trace.status import Status, StatusCode

# Network attribute semantic convention here:
# https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes
Expand Down Expand Up @@ -112,10 +112,7 @@ def _handle_error(self, context):
try:
if self.current_span.is_recording():
self.current_span.set_status(
Status(
StatusCanonicalCode.UNKNOWN,
str(context.original_exception),
)
Status(StatusCode.ERROR, str(context.original_exception),)
)
finally:
self.current_span.end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.15.dev0"
__version__ = "0.15b0"

0 comments on commit 096c492

Please sign in to comment.