Skip to content

Commit

Permalink
Merge pull request #50 from ritsec/staging
Browse files Browse the repository at this point in the history
Config Value for DataDog Tracer Config Values #44
  • Loading branch information
voxelvortex authored Sep 22, 2023
2 parents 1333a93 + 082c75d commit b69b0f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ var (

// MailGun is the mailgun configuration
MailGun structs.MailGunConfig

// ServiceName is the name of the application
ServiceName string

// Environment is the environment the application is running in
Environment string
)

func init() {
Expand Down Expand Up @@ -55,6 +61,8 @@ func UpdateConfigs() {
Token = viper.GetString("token")
AppID = viper.GetString("app_id")
GuildID = viper.GetString("guild_id")
ServiceName = viper.GetString("name")
Environment = viper.GetString("env")
Logging = logging()
Google = google()
Web = web()
Expand Down
4 changes: 3 additions & 1 deletion config_example.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name:
env:
app_id:
guild_id:
token:
logging:
level: Debug # DebugLow < Debug < Info < Warning < Error < Critical < Audit
audit_channel:
Expand All @@ -20,7 +23,6 @@ google:
web:
hostname:
port:
token:
commands:
angry_react:
emoji_id:
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"gitlab.ritsec.cloud/1nv8rZim/ops-bot-iii/bot"
"gitlab.ritsec.cloud/1nv8rZim/ops-bot-iii/commands"
"gitlab.ritsec.cloud/1nv8rZim/ops-bot-iii/config"
"gitlab.ritsec.cloud/1nv8rZim/ops-bot-iii/logging"
"gitlab.ritsec.cloud/1nv8rZim/ops-bot-iii/web"
)
Expand All @@ -19,8 +20,8 @@ func main() {

// start datadog tracer
tracer.Start(
tracer.WithService("OBIII"),
tracer.WithEnv("prod"),
tracer.WithService(config.ServiceName),
tracer.WithEnv(config.Environment),
)
defer tracer.Stop()

Expand Down

0 comments on commit b69b0f0

Please sign in to comment.