github.com/instana/go-sensor@v1.62.2-0.20240520081010-4919868049e1/example/event/host/host_event.go (about)

     1  // (c) Copyright IBM Corp. 2021
     2  // (c) Copyright Instana Inc. 2017
     3  
     4  package main
     5  
     6  import (
     7  	"time"
     8  
     9  	instana "github.com/instana/go-sensor"
    10  )
    11  
    12  func main() {
    13  	go forever()
    14  	select {}
    15  }
    16  
    17  func forever() {
    18  	for {
    19  		instana.SendHostEvent(
    20  			"Go Host Event - Big party happening.", "♪┏(°.°)┛┗(°.°)┓┗(°.°)┛┏(°.°)┓ ♪", instana.SeverityChange, 1*time.Second)
    21  		time.Sleep(30000 * time.Millisecond)
    22  	}
    23  }