Installation steps
nstall Atatus Go Agent and object storage module
copygo get go.atatus.com/agent go get go.atatus.com/agent/module/atazure
Set up tracer and instrument the object storage client
copyimport ( "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 ... }
Clean Up Dependencies
copygo mod tidy
Run the Application
copygo run main.go