From ab4d1a7319c2ca9396b36fe8d3777efb0b5e8c3e Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Mon, 13 Sep 2021 09:55:23 -0600 Subject: [PATCH] Remove .log suffix from event_dataset in logging See https://github.com/elastic/apm/pull/498 --- elasticapm/handlers/logging.py | 2 +- elasticapm/handlers/structlog.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticapm/handlers/logging.py b/elasticapm/handlers/logging.py index 68672981f..84a7b4991 100644 --- a/elasticapm/handlers/logging.py +++ b/elasticapm/handlers/logging.py @@ -231,7 +231,7 @@ def _add_attributes_to_log_record(record): client = get_client() service_name = client.config.service_name if client else None record.elasticapm_service_name = service_name - event_dataset = f"{client.config.service_name}.log" if client else None + event_dataset = f"{client.config.service_name}" if client else None record.elasticapm_event_dataset = event_dataset record.elasticapm_labels = { diff --git a/elasticapm/handlers/structlog.py b/elasticapm/handlers/structlog.py index 46893db79..57b69c7d4 100644 --- a/elasticapm/handlers/structlog.py +++ b/elasticapm/handlers/structlog.py @@ -57,7 +57,7 @@ def structlog_processor(logger, method_name, event_dict): client = get_client() if client: event_dict["service.name"] = client.config.service_name - event_dict["event.dataset"] = f"{client.config.service_name}.log" + event_dict["event.dataset"] = f"{client.config.service_name}" if transaction and transaction.trace_parent: event_dict["trace.id"] = transaction.trace_parent.trace_id span = execution_context.get_span()