Skip to content

Conversation

@miDeb
Copy link
Member

@miDeb miDeb commented Jun 28, 2025

Log start/end/abort of sequences, as well as the sequence timer, to influx.

depends on #7 for convenience

@miDeb miDeb force-pushed the sequence-logging branch 3 times, most recently from a22e30d to 59f0e21 Compare July 2, 2025 21:50
@miDeb miDeb force-pushed the sequence-logging branch from 59f0e21 to 23a888b Compare July 3, 2025 14:12
@miDeb miDeb marked this pull request as ready for review July 3, 2025 15:10
@miDeb
Copy link
Member Author

miDeb commented Jul 3, 2025

Tested it on the server and it worked like this.

@miDeb
Copy link
Member Author

miDeb commented Jul 3, 2025

@raffael0 not sure why the github action does not find any tests to run?

@raffael0
Copy link
Member

raffael0 commented Jul 3, 2025

Sorry yeah I fucked that up. I pushed a fix to main

Comment on lines +92 to 100

#ifndef NO_INFLUX
logger.Init(config["/INFLUXDB/database_ip"],
config["/INFLUXDB/database_port"],
config["/INFLUXDB/database_name"],
config["/INFLUXDB/sequences_measurement"], MICROSECONDS,
config["/INFLUXDB/buffer_size"]);
#endif
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As much as I hate singletons, I feel like we are at a point of no return in this repo. Wouldn't it be better to use a single logger instance(by turning it into a singleton)?

This kind of splits up the config handling and I do not know if that's a smart thing to do. Feel free to disagree though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i think that would make sense at this point. I don't quite understand why there are so many singletons in the first place, like it surely would be possible to just create the instances in main() and pass them around if needed.

Anyway, we'll need to ensure it is thread-safe however because I think it can be used my multiple threads at the same time. Do you think I should do it in a new PR or here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move it to another PR, since we are already using this in production

Copy link
Member

@raffael0 raffael0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
We should merge this as soon as possible since we are already using it

@miDeb miDeb merged commit 30fffb4 into main Jul 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants