Installation steps

  1. nstall Atatus Go Agent and object storage module

    copy
    icon/buttons/copy
    go get go.atatus.com/agent
    go get go.atatus.com/agent/module/atazure
    
  2. Set up tracer and instrument the object storage client

    copy
    icon/buttons/copy
    import (
        "github.com/Azure/azure-storage-blob-go/azblob"
    
        "go.atatus.com/agent"
        "go.atatus.com/agent/module/atazure"
    )
    
    func main() {
    
      // Initialize Atatus tracer with values from environment
      tracer := atatus.DefaultTracer
      tracer.Service.LicenseKey = os.Getenv("ATATUS_LICENSE_KEY")
      tracer.Service.AppName = os.Getenv("ATATUS_APP_NAME")
      tracer.Service.Tracing = os.Getenv("ATATUS_TRACING")
      tracer.Service.Analytics = os.Getenv("ATATUS_ANALYTICS")
    
      p := azblob.NewPipeline(azblob.NewAnonymousCredential(), po)
      p = atazure.WrapPipeline(p)
      u, err := url.Parse("https://my-account.blob.core.windows.net")
      serviceURL := azblob.NewServiceURL(*u, p)
      containerURL := serviceURL.NewContainerURL("mycontainer")
      blobURL := containerURL.NewBlobURL("readme.txt")
      // Use the blobURL to interact with Blob Storage
      ...
    }
    
  3. Clean Up Dependencies

    copy
    icon/buttons/copy

    go mod tidy
    
  4. Run the Application

    copy
    icon/buttons/copy

    go run main.go