diff --git a/instrumentation/opentelemetry-instrumentation-falcon/setup.cfg b/instrumentation/opentelemetry-instrumentation-falcon/setup.cfg index 57849f558..025728224 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/setup.cfg +++ b/instrumentation/opentelemetry-instrumentation-falcon/setup.cfg @@ -41,14 +41,14 @@ package_dir= packages=find_namespace: install_requires = falcon ~= 2.0 - opentelemetry-instrumentation-wsgi == 0.15.dev0 - opentelemetry-instrumentation == 0.15.dev0 - opentelemetry-api == 0.15.dev0 + opentelemetry-instrumentation-wsgi == 0.15b0 + opentelemetry-instrumentation == 0.15b0 + opentelemetry-api == 0.15b0 [options.extras_require] test = falcon ~= 2.0 - opentelemetry-test == 0.15.dev0 + opentelemetry-test == 0.15b0 parameterized == 0.7.4 [options.packages.find] diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py index 0a93fe013..55f8e98dc 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py @@ -55,7 +55,7 @@ from opentelemetry.instrumentation.falcon.version import __version__ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor from opentelemetry.instrumentation.utils import ( extract_attributes_from_object, - http_status_to_canonical_code, + http_status_to_status_code, ) from opentelemetry.trace.status import Status from opentelemetry.util import ExcludeList, time_ns @@ -115,7 +115,7 @@ class _InstrumentedFalconAPI(falcon.API): start_time = time_ns() token = context.attach( - propagators.extract(otel_wsgi.get_header_from_environ, env) + propagators.extract(otel_wsgi.carrier_getter, env) ) span = self._tracer.start_span( otel_wsgi.get_default_span_name(env), @@ -216,7 +216,7 @@ class _TraceMiddleware: span.set_attribute("http.status_code", status_code) span.set_status( Status( - canonical_code=http_status_to_canonical_code(status_code), + status_code=http_status_to_status_code(status_code), description=reason, ) ) diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py index e7b342d64..ff494d225 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py @@ -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" diff --git a/instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py b/instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py index d64154a77..fe33a2f2d 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py @@ -18,7 +18,7 @@ from falcon import testing from opentelemetry.instrumentation.falcon import FalconInstrumentor from opentelemetry.test.test_base import TestBase -from opentelemetry.trace.status import StatusCanonicalCode +from opentelemetry.trace.status import StatusCode from opentelemetry.util import ExcludeList from .app import make_app @@ -64,7 +64,7 @@ class TestFalconInstrumentation(TestBase): self.assertEqual( span.name, "HelloWorldResource.on_{0}".format(method.lower()) ) - self.assertEqual(span.status.canonical_code, StatusCanonicalCode.OK) + self.assertEqual(span.status.status_code, StatusCode.UNSET) self.assert_span_has_attributes( span, { @@ -91,9 +91,7 @@ class TestFalconInstrumentation(TestBase): self.assertEqual(len(spans), 1) span = spans[0] self.assertEqual(span.name, "HTTP GET") - self.assertEqual( - span.status.canonical_code, StatusCanonicalCode.NOT_FOUND - ) + self.assertEqual(span.status.status_code, StatusCode.ERROR) self.assert_span_has_attributes( span, { @@ -122,9 +120,7 @@ class TestFalconInstrumentation(TestBase): span = spans[0] self.assertEqual(span.name, "ErrorResource.on_get") self.assertFalse(span.status.is_ok) - self.assertEqual( - span.status.canonical_code, StatusCanonicalCode.INTERNAL - ) + self.assertEqual(span.status.status_code, StatusCode.ERROR) self.assertEqual( span.status.description, "NameError: name 'non_existent_var' is not defined",