When would someone use a Manual Reader? #4311
-
I'm looking to add some telemetry to some internal cobra-cli tooling. First iteration is to start to track how often certain commands are called so that we can prioritize what commands to prioritize our improvements on. I've successfully figured out how to create a small proof of concept off of the example files within the repo, but I'm intrigued by the However, compared to the Periodic Reader you can't pass an exporter to the Manual Reader, so something like I have seen from my testing, though, that the Periodic Reader will push the metrics at the end of the command line invocation, provided that it has been shut down properly. Are there any exceptions to this? Would that be appropriate for all command-line invocation use-cases? So, I guess my actual question is - what's the purpose of the Manual Reader and when would you use it, or - better yet - how would you use it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think you should be fine using a Periodic Reader.
Maybe there are other use cases but these are the ones that initially come to my mind. EDIT: Do you think it would be worth to document it here? |
Beta Was this translation helpful? Give feedback.
I think you should be fine using a Periodic Reader.
metric.Reader
interface and also use it under the hood. See https://github.com/open-telemetry/opentelemetry-go/blob/m…