github.com/mier85/go-sensor@v1.30.1-0.20220920111756-9bf41b3bc7e0/example/event/change_event/change_event_no_sensor.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/mier85/go-sensor"
    10  )
    11  
    12  func main() {
    13  	go forever()
    14  	select {}
    15  }
    16  
    17  func forever() {
    18  	for {
    19  		instana.SendServiceEvent("go-microservice-14c",
    20  			"Go Microservice Online", "♪┏(°.°)┛┗(°.°)┓┗(°.°)┛┏(°.°)┓ ♪", instana.SeverityChange, 3*time.Second)
    21  		time.Sleep(30 * time.Second)
    22  	}
    23  }