Initialize the Agent

Initialize the agent by passing the configuration structure to InitSDK() in your main function.

If InitSDK() returns nil, the agent is initialized successfully. If an error returns, it is likely because the agent could not reach the Controller.

For example, to initialize the SDK:

if err := appd.InitSDK(&cfg); err != nil {
fmt.Printf("Error initializing the AppDynamics SDK\n")
} else {
fmt.Printf("Initialized AppDynamics SDK successfully\n")
}