From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../semconv/attributes/error_attributes.py | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/opentelemetry/semconv/attributes/error_attributes.py (limited to '.venv/lib/python3.12/site-packages/opentelemetry/semconv/attributes/error_attributes.py') diff --git a/.venv/lib/python3.12/site-packages/opentelemetry/semconv/attributes/error_attributes.py b/.venv/lib/python3.12/site-packages/opentelemetry/semconv/attributes/error_attributes.py new file mode 100644 index 00000000..6ffd2b9b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/opentelemetry/semconv/attributes/error_attributes.py @@ -0,0 +1,45 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from enum import Enum +from typing import Final + +ERROR_TYPE: Final = "error.type" +""" +Describes a class of error the operation ended with. +Note: The `error.type` SHOULD be predictable, and SHOULD have low cardinality. + +When `error.type` is set to a type (e.g., an exception type), its +canonical class name identifying the type within the artifact SHOULD be used. + +Instrumentations SHOULD document the list of errors they report. + +The cardinality of `error.type` within one instrumentation library SHOULD be low. +Telemetry consumers that aggregate data from multiple instrumentation libraries and applications +should be prepared for `error.type` to have high cardinality at query time when no +additional filters are applied. + +If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. + +If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), +it's RECOMMENDED to: + +- Use a domain-specific attribute +- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. +""" + + +class ErrorTypeValues(Enum): + OTHER = "_OTHER" + """A fallback error value to be used when the instrumentation doesn't define a custom value.""" -- cgit v1.2.3