Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR (#1282)
This commit is contained in:
parent
8ab4cda97d
commit
7fb60a2ba6
|
|
@ -68,7 +68,7 @@ from opentelemetry.instrumentation.celery import utils
|
|||
from opentelemetry.instrumentation.celery.version import __version__
|
||||
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
||||
from opentelemetry.trace.propagation import get_current_span
|
||||
from opentelemetry.trace.status import Status, StatusCanonicalCode
|
||||
from opentelemetry.trace.status import Status, StatusCode
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ class CeleryInstrumentor(BaseInstrumentor):
|
|||
if span is None or not span.is_recording():
|
||||
return
|
||||
|
||||
status_kwargs = {"canonical_code": StatusCanonicalCode.UNKNOWN}
|
||||
status_kwargs = {"status_code": StatusCode.ERROR}
|
||||
|
||||
ex = kwargs.get("einfo")
|
||||
|
||||
|
|
@ -227,7 +227,6 @@ class CeleryInstrumentor(BaseInstrumentor):
|
|||
|
||||
if ex is not None:
|
||||
status_kwargs["description"] = str(ex)
|
||||
|
||||
span.set_status(Status(**status_kwargs))
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Reference in New Issue