Giter Site home page Giter Site logo

Comments (6)

rakyll avatar rakyll commented on August 19, 2024 1

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.

ahmetb avatar ahmetb commented on August 19, 2024

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 and monitoredresource 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.

semistrict avatar semistrict commented on August 19, 2024

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.

semistrict avatar semistrict commented on August 19, 2024

/cc @rghetia

from opencensus-go-exporter-stackdriver.

rghetia avatar rghetia commented on August 19, 2024

once census-instrumentation/opencensus-go#878 is committed we can deprecate autodetect. ChainDetector() can replace autodetect.

from opencensus-go-exporter-stackdriver.

songy23 avatar songy23 commented on August 19, 2024

Duplicated of #144.

from opencensus-go-exporter-stackdriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.