-
Notifications
You must be signed in to change notification settings - Fork 25
Add pilot logging #550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add pilot logging #550
Conversation
5218531
to
9d7e6b1
Compare
87ffdf6
to
50e9ff3
Compare
50e9ff3
to
e3b1128
Compare
e3b1128
to
d3632e1
Compare
To review this code, this is a summary of what's new compared to the pilot authentification:
|
7dc9b17
to
86e715d
Compare
I'm wondering why you removed the original line number from the |
As timestamps are generated from the pilot itself (as logs are printed out), if we sort logs by timestamps, we could add the right numbering without losing space? Sorting by timestamp would actually give logs in order they were caught by a pilot, which is what we want? If for whatever reason numbering is broken, we could have shuffled logs, whereas with timestamps we are assured order is kept. |
To get the numberring it would be sufficient to define a class variable in the extended logger in the pilot and increment it every time a log statement is called. |
|
||
|
||
class LogMessage(BaseModel): | ||
pilot_stamp: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need that ? Because now the token already includes the stamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, as long as you can get back a correct pilot from PilotAgentsDB
, then the stamp is superfluous.
index_prefix = "pilot_logs" | ||
|
||
def index_name(self, vo: str, doc_id: int) -> str: | ||
# TODO decide how to define the index name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify to use same splitting idea as jobs: pilot_logs_..._m
2f03c17
to
e409e43
Compare
lines.append( | ||
{ | ||
"message": line, | ||
"timestamp": "2022-02-26 13:48:35.123456", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering how you can get those 2 lines back in the right order if the timestamp is identical.?
e409e43
to
06d7583
Compare
06d7583
to
9089ca1
Compare
9089ca1
to
16e6b30
Compare
Updates to #511 , rebased and linked to #421