Comments (14)
Totally possible I'm trying to record time the wrong way. Is that the case? (related: census-instrumentation/opencensus-specs#44)
from opencensus-go-exporter-stackdriver.
from opencensus-go-exporter-stackdriver.
@jadekler please firstly change this line https://gist.github.com/jadekler/5636acc62eb0048cad15206ef5587650#file-dupe_oc-go-L61
to
view.SetReportingPeriod(62 * time.Second)
to firstly rule out any hasty time series recordings as per #36 and census-instrumentation/opencensus-go#909
from opencensus-go-exporter-stackdriver.
@jadekler the problem is likely that you have no buckets in the distribution specified in the view.
from opencensus-go-exporter-stackdriver.
@Ramonza What is a bucket? How do I get a bucket? Perhaps there's documentation that I'm lacking - if so, please feel free to link and close.
from opencensus-go-exporter-stackdriver.
@jadekler The documentation is here: https://godoc.org/go.opencensus.io/stats/view#Distribution. The problem is although OpenCensus allows Distribution
with no bucket bounds, Stackdriver doesn't support it.
Can you try modifying your view to something like:
func distView(m *stats.Int64Measure) *view.View {
return &view.View{
Name: m.Name(),
Description: m.Description(),
TagKeys: []tag.Key{subscriptionKey},
Measure: m,
Aggregation: view.Distribution(0), // Should have at least one bucket bound.
}
}
from opencensus-go-exporter-stackdriver.
@songy23 Thanks for the pointers, I'll try this tomorrow or Monday. re:
The problem is although OpenCensus allows Distribution with no bucket bounds, Stackdriver doesn't support it.
Is it unreasonable to expect the stackdriver exporter to somehow raise an error, or panic, if that's the case?
from opencensus-go-exporter-stackdriver.
Actually, we ended up going with a view with Aggregation: view.Sum()
. I'll leave this open while we discuss the remaining question I had above.
from opencensus-go-exporter-stackdriver.
@jadekler to be fair, it did log an error, although I think we could certainly improve the error message by doing some basic validation client-side.
from opencensus-go-exporter-stackdriver.
@Ramonza Actually, that's my fmt.Println heh. Is there a way to make opencensus verbosely log?
from opencensus-go-exporter-stackdriver.
The default if no OnError is provided should be to log the error, is this not happening? If not, could you send a PR with your changes to add the logging?
from opencensus-go-exporter-stackdriver.
Ah, I was unaware of OnError. I'll leave y'all to decide if you want this issue as a placeholder for better docs, or if you'd like to just close it that's solid for me too.
from opencensus-go-exporter-stackdriver.
I think this could be handled by the same mechanism contemplated here: #19
from opencensus-go-exporter-stackdriver.
SGTM
from opencensus-go-exporter-stackdriver.
Related Issues (20)
- make travis-ci fails with goimports error in test.pb.go
- PushTraceSpans should return dropped spans instead of good spans
- Go exporter should detect GKE resource labels automatically HOT 10
- Stackdriver fails to export metrics after living long enough HOT 3
- "panic: assignment to entry in nil map" error HOT 4
- The start time must be before the end time for the non-gauge metric HOT 6
- Can't see any metrics after running example code HOT 2
- Unexpectedly large custom metric ingest volume generated HOT 3
- Rebrand to Cloud Monitoring
- Use Zap library for logging to support JSON
- Add an option `OnExport` to exporter
- MetricDescriptor should be created as soon as the view is registered HOT 3
- Traces don't respect X-Cloud-Trace-Context
- 0.13.5 was tagged, but not yet released? HOT 1
- Stop assuming zonal cluster deployment HOT 1
- [Question] Why does this work without calling `view.RegisterExporter` from the OpenCensus library? HOT 2
- go: warning: github.com/prometheus/[email protected]+incompatible: retracted by module author HOT 1
- Security Policy violation SECURITY.md HOT 5
- GetMetricDisplayName option does not work HOT 1
- Error while updating imports: cannot find module providing package github.com/prometheus/prometheus/model/value HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencensus-go-exporter-stackdriver.