-
Notifications
You must be signed in to change notification settings - Fork 33
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
Redirect data to Google Cloud Monitoring #73
Comments
Hello! @marceloclp . Are you referring to the metric data or the tracing data? The metric based data currently leverages OpenCensus! The tracing data currently leverages OpenTracing. ValueStream's main.go entry point currently is hardcoded to use the OpenCensus prometheus exporter but it should be trivial to update it to switch on a CLI flag or envvar to initialize the Stackdriver metric exporter. https://github.com/ImpactInsights/valuestream/blob/master/main.go#L165 Instead of initializing the prometheus exporter directly like below:
we could have a generic exporter, which takes the CLI flags and the current router and returns an exporter interface and an error object: exporter, err := initializeExporter(ctx, c, r)
if err != nil {
return fmt.Errorf("failed to initialze metric exporter: %v", err)
} And initializeExporter could like like:
The function could return a closer since the different exporters may need to flush and stop. For example the stackdriver looks like it needs to both flush and stop:
|
Wow, thanks for the detailed explanation @dm03514 ! Yes, this is exactly what I was looking for and it really simplifies my original plan! Is there a plan to officially support different exporters? |
Is there a way to redirect the data to another service such as Google Cloud Monitoring?
I was thinking of using OpenCensus to transform the data to the correct format, but I am unsure how to pipe the data to another service.
The text was updated successfully, but these errors were encountered: