github.com/safedep/dry@v0.0.0-20241016050132-a15651f0548b/obs/env.go (about)

     1  package obs
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/safedep/dry/utils"
     7  )
     8  
     9  func AppServiceName(d string) string {
    10  	n := os.Getenv(tracerServiceNameEnvKey)
    11  	if utils.IsEmptyString(n) {
    12  		n = d
    13  	}
    14  
    15  	return n
    16  }
    17  
    18  func AppServiceEnv(d string) string {
    19  	n := os.Getenv(tracerServiceEnvEnvKey)
    20  	if utils.IsEmptyString(n) {
    21  		n = d
    22  	}
    23  
    24  	return n
    25  }