diff --git a/src/function.py b/src/function.py
index 937c1b6..b242aba 100644
--- a/src/function.py
+++ b/src/function.py
@@ -371,6 +371,12 @@ def _reconstruct_infra_data(context, entry, logEvents):
# NR Logging #
################
+def _get_custom_atrributes():
+ """
+ This functions get attribute key from env vars.
+ """
+ return os.getenv("CUSTOM_ATTRIBUTES", "{}")
+
def _logging_enabled():
"""
@@ -447,6 +453,7 @@ def _package_log_payload(data):
"logStream": entry["logStream"],
"logGroup": entry["logGroup"],
},
+ "custom": _get_custom_atrributes(),
}
},
"logs": log_messages,