2021-01-03 18:15:44 +05:30
|
|
|
package constants
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"os"
|
2022-01-26 21:40:44 +05:30
|
|
|
"strconv"
|
2021-01-03 18:15:44 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const HTTPHostPort = "0.0.0.0:8080"
|
|
|
|
|
|
|
|
|
|
var DruidClientUrl = os.Getenv("DruidClientUrl")
|
|
|
|
|
var DruidDatasource = os.Getenv("DruidDatasource")
|
2022-01-26 21:40:44 +05:30
|
|
|
var DEFAULT_TELEMETRY_ANONYMOUS = false
|
|
|
|
|
|
|
|
|
|
func IsTelemetryEnabled() bool {
|
|
|
|
|
isTelemetryEnabledStr := os.Getenv("TELEMETRY_ENABLED")
|
|
|
|
|
isTelemetryEnabledBool, err := strconv.ParseBool(isTelemetryEnabledStr)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
return isTelemetryEnabledBool
|
|
|
|
|
}
|
2021-10-20 13:18:19 +05:30
|
|
|
|
|
|
|
|
const TraceTTL = "traces"
|
|
|
|
|
const MetricsTTL = "metrics"
|
2021-11-22 16:15:58 +05:30
|
|
|
|
2022-02-09 22:05:27 +01:00
|
|
|
func GetAlertManagerApiPrefix() string {
|
|
|
|
|
if os.Getenv("ALERTMANAGER_API_PREFIX") != "" {
|
|
|
|
|
return os.Getenv("ALERTMANAGER_API_PREFIX")
|
|
|
|
|
}
|
|
|
|
|
return "http://alertmanager:9093/api/"
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-26 21:40:44 +05:30
|
|
|
const RELATIONAL_DATASOURCE_PATH = "/var/lib/signoz/signoz.db"
|
2022-01-28 22:56:54 +05:30
|
|
|
|
|
|
|
|
const (
|
2022-02-08 17:45:40 +05:30
|
|
|
ServiceName = "serviceName"
|
|
|
|
|
HttpRoute = "httpRoute"
|
|
|
|
|
HttpCode = "httpCode"
|
|
|
|
|
HttpHost = "httpHost"
|
|
|
|
|
HttpUrl = "httpUrl"
|
|
|
|
|
HttpMethod = "httpMethod"
|
|
|
|
|
Component = "component"
|
|
|
|
|
OperationDB = "name"
|
|
|
|
|
OperationRequest = "operation"
|
2022-01-28 22:56:54 +05:30
|
|
|
)
|