Comments (6)
We are considering to implement census-instrumentation/opencensus-specs#162 to detect monitored resources and thinking about splitting resource detection into a different package.
The auto-detection will be at the new resource package.
import "contrib.go.opencensus.io/resource"
resource.Autodetect()
And GCP and AWS will have split packages for detection.
from opencensus-go-exporter-stackdriver.
I think the problem is Autodetect()
. Anyone who needs to use Autodetect()
will need to vendor both aws and gcp.
Otherwise I'd say:
- move type GCEInstance to a new package: monitoredresource/gcp (ditto for aws)
- keep
interface monitoredresource.Interface
where it is - user now imports pkgs
monitoredresource/gcp
andmonitoredresource
both.- ^ I don't think this will work when people use Autodetect().
Right now the list of aws pkgs that go into my binary (without using aws) are:
github.com/aws/aws-sdk-go/internal/sdkrand
github.com/aws/aws-sdk-go/internal/sdkuri
github.com/aws/aws-sdk-go/aws/awserr
github.com/aws/aws-sdk-go/internal/shareddefaults
github.com/aws/aws-sdk-go/aws/endpoints
github.com/aws/aws-sdk-go/aws/credentials
github.com/aws/aws-sdk-go/aws/awsutil
github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/request
github.com/aws/aws-sdk-go/aws/client
github.com/aws/aws-sdk-go/aws/corehandlers
github.com/aws/aws-sdk-go/private/protocol
github.com/aws/aws-sdk-go/private/protocol/rest
github.com/aws/aws-sdk-go/private/protocol/query/queryutil
github.com/aws/aws-sdk-go/aws/ec2metadata
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
github.com/aws/aws-sdk-go/aws/signer/v4
github.com/aws/aws-sdk-go/aws/csm
github.com/aws/aws-sdk-go/private/protocol/query
github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds
github.com/aws/aws-sdk-go/service/sts
github.com/aws/aws-sdk-go/aws/credentials/stscreds
github.com/aws/aws-sdk-go/aws/credentials/endpointcreds
github.com/aws/aws-sdk-go/aws/defaults
github.com/aws/aws-sdk-go/aws/session
from opencensus-go-exporter-stackdriver.
I think we should split packages as follow:
- separate packages for each cloud provider
- separate package for autodetect that imports all of the above
Then if you know which cloud provider you want to support, you only import the package you need and you can avoid importing the autodetect package (which will pull in all providers).
from opencensus-go-exporter-stackdriver.
/cc @rghetia
from opencensus-go-exporter-stackdriver.
once census-instrumentation/opencensus-go#878 is committed we can deprecate autodetect. ChainDetector() can replace autodetect.
from opencensus-go-exporter-stackdriver.
Duplicated of #144.
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.