From 3603abfe52ffc2e7533144072544076c67312ae6 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Fri, 5 Apr 2024 10:34:46 -0700 Subject: [PATCH] Revert "Add record.requestId and record.awsRequestId" This reverts commit aed49fd30fca2b7bdb81caeed72e789139786648. --- .../src/opentelemetry/instrumentation/logging/__init__.py | 2 -- .../src/opentelemetry/instrumentation/logging/constants.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/__init__.py b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/__init__.py index 0a8084a9ac..ce332d0113 100644 --- a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/__init__.py @@ -95,8 +95,6 @@ def record_factory(*args, **kwargs): record.otelSpanID = "0" record.otelTraceID = "0" record.otelTraceSampled = False - record.awsRequestId = getattr(record, "aws_request_id", None) - record.requestId = getattr(record, "requestId", None) nonlocal service_name if service_name is None: diff --git a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py index 4bbf8c546d..2b57c2b698 100644 --- a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py +++ b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -DEFAULT_LOGGING_FORMAT = "%(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] [awsRequestId=%(awsRequestId)s] [requestId=%(requestId)s] [trace_id=%(otelTraceID)s span_id=%(otelSpanID)s resource.service.name=%(otelServiceName)s trace_sampled=%(otelTraceSampled)s] - %(message)s" +DEFAULT_LOGGING_FORMAT = "%(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] [requestId=%(requestId)s] [trace_id=%(otelTraceID)s span_id=%(otelSpanID)s resource.service.name=%(otelServiceName)s trace_sampled=%(otelTraceSampled)s] - %(message)s" _MODULE_DOC = """