Skip to content

Commit

Permalink
changing var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed Apr 29, 2024
1 parent 6f2689f commit 5109add
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/common/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

const SleepDuration = 5 * time.Second

const TracesPort = "4316/v1/traces"
const MetricPort = "4316/v1/metrics"
const TracesEndpoint = "4316/v1/traces"
const MetricEndpoint = "4316/v1/metrics"

// StartSendingMetrics will generate metrics load based on the receiver (e.g 5000 statsd metrics per minute)
func StartSendingMetrics(receiver string, duration, sendingInterval time.Duration, metricPerInterval int, metricLogGroup, metricNamespace string) (err error) {
Expand Down Expand Up @@ -97,7 +97,7 @@ func processTraceFile(filePath string, startTime int64, traceID string) error {
modifiedData := strings.ReplaceAll(string(data), "START_TIME", fmt.Sprintf("%d", startTime))
modifiedData = strings.ReplaceAll(modifiedData, "TRACE_ID", traceID)

url := "http://127.0.0.1:" + TracesPort
url := "http://127.0.0.1:" + TracesEndpoint
_, err = http.Post(url, "application/json", bytes.NewBufferString(modifiedData))
if err != nil {
return err
Expand Down Expand Up @@ -213,7 +213,7 @@ func processFile(filePath string, startTime int64) error {
modifiedData := strings.ReplaceAll(string(data), "START_TIME", fmt.Sprintf("%d", startTime))

//curl command
url := "http://127.0.0.1:" + MetricPort
url := "http://127.0.0.1:" + MetricEndpoint
_, err = http.Post(url, "application/json", bytes.NewBufferString(modifiedData))

_, err = http.Post(url, "application/json", bytes.NewBufferString(modifiedData))
Expand Down

0 comments on commit 5109add

Please sign in to comment.