-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pawel plesniak/drunc op mon #18
base: develop
Are you sure you want to change the base?
Conversation
sync with develop
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.
Some initial comments.
Also, we need 2 additional things:
- Documentation on how the API differ from the C++
- We need a test app.
class OpMonPublisher: | ||
def __init__( | ||
self, | ||
topic: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.
I would like this to be the default_topic
rather than just topic. The reason being that we envision the possibility of using multiple topics at some point so the algorithm that selects the topic given a metric at the moment is just returning the default, but it might not be the case for long
application = application, | ||
substructure = substructure | ||
) | ||
t = Timestamp() |
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.
The timestamp should be the first thing happening.
case fd.CPPTYPE_BOOL: | ||
formatted_OpMonValue.boolean_value = value | ||
case fd.CPPTYPE_STRING: | ||
formatted_OpMonValue.string_value = value |
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.
We need to handle the case in which the type is a message itself.
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.
The equivalent C++ is https://github.com/DUNE-DAQ/opmonlib/blob/721d3fcb21fe087cddf14cb877ff6da514ae26d2/src/Utils.cpp#L84-L90 The rest of the code has to be handled accordingly.
@@ -0,0 +1,17 @@ | |||
class OpMonFunction : |
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.
Is there a reason why this was extracted into a separate file?
Otherwise I would prefer to restore as it was. The reason being that the file was supposed to be unique to simplify the construction of the microservice: https://github.com/DUNE-DAQ/microservices/blob/5a8182e9459e7f451eff6aed4da4dd06ccdc2eb5/dockerfiles/microservices-dependencies.dockerfile#L44
def execute(self, e : entry.OpMonEntry ) : | ||
self.function(e) | ||
|
||
from kafkaopmon import OpMonFunction |
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.
See previous note on this extraction
Adds a python handle to convert messages into a OpMonEntry format.
Notes