Merge pull request #117 from NathanielRN/move-instrumentation-sqlalchemy
Move instrumentation sqlalchemy
This commit is contained in:
commit
096c49292f
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from sqlalchemy.event import listen
|
|||
|
||||
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
|
||||
|
|
@ -112,10 +112,7 @@ class EngineTracer:
|
|||
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()
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue