I have some Kubernetes cronjob scheduled to run every 15 minutes. Each job generates some opencensus metrics that exported to stackdriver. The problem is that the ReportingInterval of the stackdriver exporter cannot be less than 60 seconds but my jobs are very fast (5 to 10 seconds) thus the metrics get lost.
What is the best way to collect metrics here?
Right now, 5-10 seconds for a running task currently isn’t long enough for stackdriver to collect and report metrics. If you’d like, you could file a feature request for more granular metric collection. You can create a feature request here: https://issuetracker.google.com/issues/new?component=187203&template=0 If you do, remember to change the issue type from ‘Bug’ to ‘Feature Request’