Skip to content

Commit

Permalink
disable some labels because some loki can limit the number of labels
Browse files Browse the repository at this point in the history
  • Loading branch information
wguanicedew committed Sep 25, 2024
1 parent 62361b1 commit 2729a51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pilot/util/lokirealtimelogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,22 @@ def format(self, record: logging.LogRecord) -> dict:

formatted = {
"timestamp": record.created,
"process": record.process,
"thread": record.thread,
# "process": record.process,
# "thread": record.thread,
"function": record.funcName,
"module": record.module,
"name": record.name,
"level": record.levelname,
}

"""
# Not send all information, some loki services have limitations on number of labels.
record_keys = set(record.__dict__.keys())
for key in record_keys:
if key not in formatted and key not in ['msg']:
formatted[key] = getattr(record, key)
"""

message = record.msg
try:
Expand Down

0 comments on commit 2729a51

Please sign in to comment.