-
Notifications
You must be signed in to change notification settings - Fork 78
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
Collector API redesign #383
Comments
See #382 (comment) for further discussion of the issue and some suggestions. |
A per #378 the To remedy these we are planning to rename the The aim here is to decouple the output path (either of a directory or file) from the call to retrieve the data. This allows supplying the output location earlier during execution which can avoid the need to save files to a temporary location and then copy them to the desired location at a later time. And to unify the output, class CollectorBase(object):
# ...
def set_output(self, path):
'''Takes a path that is collector dependant to configure it's output location.'''
# Perform validate and store internally
pass
def get_data(self):
'''Provides output into the previously configured location.
Return: List of `CollectorOutput` objects.'''
# Retrieve data into pre-defined location and create `CollectorOutput` object(s)
return []
# ... Does anyone has any thoughts/concerns/improvements? @douglas-raillard-arm @valschneider @qais-yousef |
Would that make sense to give the |
We did debate this, however we thought this would cause issues / still require copying, in the event that you don't know the directory at creation time. E.g. you want to add something like a timestamp or in WA as we want to instantiate the collectors at the beginning of a run and then determine the output directory depending on the job that is currently executing. |
Right, I was forgetting that the collector can be stopped and restarted also. In that case, the user might want to set the output to a new file, avoiding any copies. |
Ah ok that makes sense. Yea we thought that going for the separate call approach would hopefully be the most flexible solution allowing for different use cases. |
Sorry for the delayed response. I'm not an expert in the details but this looks good to me. Thanks! |
I had a look as well, no big concerns from my end. |
Implemented with #454 |
As discussed in the comments in PR #382, and elsewhere, the
TraceCollector
interface is not fit for purpose -- it is inconsistent, unintuitive, and undocumented. Additionally, as already raised in #378, the scope of what is being collected by the various implementations of this interface is not adequately captured by the term "trace".We need to conduct a review of existing implementations, and come up with modifications to the API to make it handle these implementations in more intuitive way. The updated API should be documented.
The text was updated successfully, but these errors were encountered: