Skip to content

Commit

Permalink
Merge pull request #88 from nyaruka/use-cloudwatch
Browse files Browse the repository at this point in the history
Rename to use DeploymentID
rowanseymour authored Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 775ee9f + c59d04f commit 63e54b1
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/rp-indexer/main.go
Original file line number Diff line number Diff line change
@@ -75,8 +75,8 @@ func main() {
logger.Error("unable to connect to database")
}

if rt.Config.Deployment != "dev" {
rt.CW, err = cwatch.NewService(rt.Config.AWSAccessKeyID, rt.Config.AWSSecretAccessKey, rt.Config.AWSRegion, rt.Config.CloudwatchNamespace, rt.Config.Deployment)
if rt.Config.DeploymentID != "dev" {
rt.CW, err = cwatch.NewService(rt.Config.AWSAccessKeyID, rt.Config.AWSSecretAccessKey, rt.Config.AWSRegion, rt.Config.CloudwatchNamespace, rt.Config.DeploymentID)
if err != nil {
logger.Error("unable to create cloudwatch service")
}

Check warning on line 82 in cmd/rp-indexer/main.go

Codecov / codecov/patch

cmd/rp-indexer/main.go#L78-L82

Added lines #L78 - L82 were not covered by tests
4 changes: 2 additions & 2 deletions runtime/config.go
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ type Config struct {
AWSRegion string `help:"region to use for AWS services, e.g. us-east-1"`

CloudwatchNamespace string `help:"the namespace to use for cloudwatch metrics"`
Deployment string `help:"the deployment identifier to use for metrics"`
DeploymentID string `help:"the deployment identifier to use for metrics"`

LibratoUsername string `help:"the username that will be used to authenticate to Librato"`
LibratoToken string `help:"the token that will be used to authenticate to Librato"`
@@ -43,7 +43,7 @@ func NewDefaultConfig() *Config {
AWSRegion: "us-east-1",

CloudwatchNamespace: "Temba",
Deployment: "dev",
DeploymentID: "dev",

InstanceName: hostname,

0 comments on commit 63e54b1

Please sign in to comment.