Comments (6)
Consider using the GetMetricType
option to set a custom metric prefix, for example "custom.googleapis.com/my.org/...". I think this is a constraint on Stackdriver backend rather than the exporter.
from opencensus-go-exporter-stackdriver.
Consider using the
GetMetricType
option to set a custom metric prefix, for example "custom.googleapis.com/my.org/...". I think this is a constraint on Stackdriver backend rather than the exporter.
I'm using that. My use case is to write metrics to a Stackdriver provided metric, instead of a custom metric prefix. For example, appengine.googleapis.com/flex/cpu/reserved_cores
. The MetricDescriptor is already there.
from opencensus-go-exporter-stackdriver.
I see, the OC Stackdriver exporter is meant to be used to export application metrics mainly, but we should definitely allow exporting to built-in metrics. /cc @odeke-em @rghetia
from opencensus-go-exporter-stackdriver.
@rghetia Thanks for #77. I verified that it still doesn't work for built-in metrics. I spent some time to debug whether the cause is from my GetMonitoredResource
func or from the exporter.
The error is from equalMeasureAggTagKeys
func:
for _, k := range md.Labels {
if _, ok := labels[k.Key]; !ok {
return fmt.Errorf("stackdriver metric descriptor %q was not created with label %q", md.Type, k)
}
delete(labels, k.Key)
}
IIUC, GetMonitoredResource
returns a resource
with resource.type
and resource.labels
. It also returns a string map which should be filed as metric.labels
. For a timeSerie
, it must have all resource.labels
filled, but its metric.labels
are optional. The logic in the code mentioned above doesn't look right to me.
What's the reason to cache MetricDescriptor
and compare the tags/labels before sending CreateTimeSeries
request to Stackdriver?
If we indeed need to do the tags/labels comparison, I think we may change the logic to:
- Check all
view.tags
are inmetric.labels
orresource.labels
- Check all
resource.labels
are inview.tags
.
from opencensus-go-exporter-stackdriver.
@yanweiguo the reason for caching MD is that you don't have to send it over and over again.
Are you using resource label as view tags? can you provide concrete example with your view.tags and resource.labels?
from opencensus-go-exporter-stackdriver.
@yanweiguo the reason for caching MD is that you don't have to send it over and over again.
I found the caching MDs are only used in createMeasure
func. I wonder whether we need to call createMeasure
for built-in metrics since their MD are already there.
Are you using resource label as view tags? can you provide concrete example with your view.tags and resource.labels?
Here is our func for GetMonitoredResource
.
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.