MF - 1758 - Sync With Benchmark Testing (#1912)
* feat(docker): add trace ration and max conn This adds a new environment variable `MF_JAEGER_TRACE_RATIO` to the `docker/.env` file. The variable is used to set the ratio of requests traced. Additionally, this commit also adds a new environment variable `MF_POSTGRES_MAX_CONNECTIONS` for configuring the maximum number of connections for the Postgres database. These changes are made to enhance the configuration and scalability of the core services. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * Remove comment to trace ratio Signed-off-by: rodneyosodo <blackd0t@protonmail.com> * Reduce postgres max connection to 100 Signed-off-by: rodneyosodo <blackd0t@protonmail.com> --------- Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
This commit is contained in:
parent
43a263d7da
commit
8b185d205b
|
@ -53,16 +53,17 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_AUTH_LOG_LEVEL" envDefault:"info"`
|
||||
SecretKey string `env:"MF_AUTH_SECRET_KEY" envDefault:"secret"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_AUTH_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
AccessDuration string `env:"MF_AUTH_ACCESS_TOKEN_DURATION" envDefault:"30m"`
|
||||
RefreshDuration string `env:"MF_AUTH_REFRESH_TOKEN_DURATION" envDefault:"24h"`
|
||||
SpicedbHost string `env:"MF_SPICEDB_HOST" envDefault:"localhost"`
|
||||
SpicedbPort string `env:"MF_SPICEDB_PORT" envDefault:"50051"`
|
||||
SpicedbSchemaFile string `env:"MF_SPICEDB_SCHEMA_FILE" envDefault:"./docker/spicedb/schema.zed"`
|
||||
LogLevel string `env:"MF_AUTH_LOG_LEVEL" envDefault:"info"`
|
||||
SecretKey string `env:"MF_AUTH_SECRET_KEY" envDefault:"secret"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_AUTH_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
AccessDuration string `env:"MF_AUTH_ACCESS_TOKEN_DURATION" envDefault:"30m"`
|
||||
RefreshDuration string `env:"MF_AUTH_REFRESH_TOKEN_DURATION" envDefault:"24h"`
|
||||
SpicedbHost string `env:"MF_SPICEDB_HOST" envDefault:"localhost"`
|
||||
SpicedbPort string `env:"MF_SPICEDB_PORT" envDefault:"50051"`
|
||||
SpicedbSchemaFile string `env:"MF_SPICEDB_SCHEMA_FILE" envDefault:"./docker/spicedb/schema.zed"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -102,7 +103,7 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -46,14 +46,15 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_BOOTSTRAP_LOG_LEVEL" envDefault:"info"`
|
||||
EncKey string `env:"MF_BOOTSTRAP_ENCRYPT_KEY" envDefault:"12345678910111213141516171819202"`
|
||||
ESConsumerName string `env:"MF_BOOTSTRAP_EVENT_CONSUMER" envDefault:"bootstrap"`
|
||||
ThingsURL string `env:"MF_THINGS_URL" envDefault:"http://localhost:9000"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_BOOTSTRAP_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_BOOTSTRAP_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
LogLevel string `env:"MF_BOOTSTRAP_LOG_LEVEL" envDefault:"info"`
|
||||
EncKey string `env:"MF_BOOTSTRAP_ENCRYPT_KEY" envDefault:"12345678910111213141516171819202"`
|
||||
ESConsumerName string `env:"MF_BOOTSTRAP_EVENT_CONSUMER" envDefault:"bootstrap"`
|
||||
ThingsURL string `env:"MF_THINGS_URL" envDefault:"http://localhost:9000"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_BOOTSTRAP_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_BOOTSTRAP_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -104,7 +105,7 @@ func main() {
|
|||
defer authHandler.Close()
|
||||
logger.Info("Successfully connected to auth grpc server " + authHandler.Secure())
|
||||
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -38,12 +38,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_CASSANDRA_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_CASSANDRA_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_CASSANDRA_WRITER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_CASSANDRA_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_CASSANDRA_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_CASSANDRA_WRITER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -88,7 +89,7 @@ func main() {
|
|||
}
|
||||
defer csdSession.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -42,12 +42,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_CERTS_LOG_LEVEL" envDefault:"info"`
|
||||
CertsURL string `env:"MF_SDK_CERTS_URL" envDefault:"http://localhost"`
|
||||
ThingsURL string `env:"MF_THINGS_URL" envDefault:"http://things:9000"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_CERTS_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_CERTS_LOG_LEVEL" envDefault:"info"`
|
||||
CertsURL string `env:"MF_SDK_CERTS_URL" envDefault:"http://localhost"`
|
||||
ThingsURL string `env:"MF_THINGS_URL" envDefault:"http://things:9000"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_CERTS_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
|
||||
// Sign and issue certificates without 3rd party PKI
|
||||
SignCAPath string `env:"MF_CERTS_SIGN_CA_PATH" envDefault:"ca.crt"`
|
||||
|
@ -120,7 +121,7 @@ func main() {
|
|||
|
||||
logger.Info("Successfully connected to auth grpc server " + authHandler.Secure())
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -38,11 +38,12 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_COAP_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_COAP_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_COAP_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_COAP_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -94,7 +95,7 @@ func main() {
|
|||
|
||||
logger.Info("Successfully connected to things grpc server " + aHandler.Secure())
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -42,11 +42,12 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_HTTP_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_HTTP_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_HTTP_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_HTTP_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -91,7 +92,7 @@ func main() {
|
|||
|
||||
logger.Info("Successfully connected to things grpc server " + aHandler.Secure())
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -36,12 +36,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_INFLUX_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_INFLUX_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_INFLUX_WRITER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_INFLUX_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_INFLUX_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_INFLUX_WRITER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -76,7 +77,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -59,6 +59,7 @@ type config struct {
|
|||
InstanceID string `env:"MF_LORA_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_LORA_ADAPTER_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
RouteMapURL string `env:"MF_LORA_ADAPTER_ROUTE_MAP_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -101,7 +102,7 @@ func main() {
|
|||
}
|
||||
defer rmConn.Close()
|
||||
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaeger.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -38,12 +38,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_MONGO_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_MONGO_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_MONGO_WRITER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_MONGO_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_MONGO_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_MONGO_WRITER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -78,7 +79,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -56,6 +56,7 @@ type config struct {
|
|||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_MQTT_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_MQTT_ADAPTER_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -101,7 +102,7 @@ func main() {
|
|||
Port: cfg.HTTPTargetPort,
|
||||
}
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -45,14 +45,15 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_OPCUA_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
ESConsumerName string `env:"MF_OPCUA_ADAPTER_EVENT_CONSUMER" envDefault:"opcua-adapter"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_OPCUA_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_OPCUA_ADAPTER_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
RouteMapURL string `env:"MF_OPCUA_ADAPTER_ROUTE_MAP_URL" envDefault:"redis://localhost:6379/0"`
|
||||
LogLevel string `env:"MF_OPCUA_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
ESConsumerName string `env:"MF_OPCUA_ADAPTER_EVENT_CONSUMER" envDefault:"opcua-adapter"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_OPCUA_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_OPCUA_ADAPTER_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
RouteMapURL string `env:"MF_OPCUA_ADAPTER_ROUTE_MAP_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -104,7 +105,7 @@ func main() {
|
|||
chanRM := newRouteMapRepositoy(rmConn, channelsRMPrefix, logger)
|
||||
connRM := newRouteMapRepositoy(rmConn, connectionRMPrefix, logger)
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -39,12 +39,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_POSTGRES_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_POSTGRES_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_POSTGRES_WRITER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_POSTGRES_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_POSTGRES_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_POSTGRES_WRITER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -86,7 +87,7 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -44,13 +44,14 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_SMPP_NOTIFIER_LOG_LEVEL" envDefault:"info"`
|
||||
From string `env:"MF_SMPP_NOTIFIER_FROM_ADDR" envDefault:""`
|
||||
ConfigPath string `env:"MF_SMPP_NOTIFIER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_SMPP_NOTIFIER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_SMPP_NOTIFIER_LOG_LEVEL" envDefault:"info"`
|
||||
From string `env:"MF_SMPP_NOTIFIER_FROM_ADDR" envDefault:""`
|
||||
ConfigPath string `env:"MF_SMPP_NOTIFIER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_SMPP_NOTIFIER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -99,7 +100,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -45,13 +45,14 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_SMTP_NOTIFIER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_SMTP_NOTIFIER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
From string `env:"MF_SMTP_NOTIFIER_FROM_ADDR" envDefault:""`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_SMTP_NOTIFIER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_SMTP_NOTIFIER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_SMTP_NOTIFIER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
From string `env:"MF_SMTP_NOTIFIER_FROM_ADDR" envDefault:""`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_SMTP_NOTIFIER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -102,7 +103,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -59,15 +59,16 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_THINGS_LOG_LEVEL" envDefault:"info"`
|
||||
StandaloneID string `env:"MF_THINGS_STANDALONE_ID" envDefault:""`
|
||||
StandaloneToken string `env:"MF_THINGS_STANDALONE_TOKEN" envDefault:""`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
CacheKeyDuration string `env:"MF_THINGS_CACHE_KEY_DURATION" envDefault:"10m"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_THINGS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_THINGS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
CacheURL string `env:"MF_THINGS_CACHE_URL" envDefault:"redis://localhost:6379/0"`
|
||||
LogLevel string `env:"MF_THINGS_LOG_LEVEL" envDefault:"info"`
|
||||
StandaloneID string `env:"MF_THINGS_STANDALONE_ID" envDefault:""`
|
||||
StandaloneToken string `env:"MF_THINGS_STANDALONE_TOKEN" envDefault:""`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
CacheKeyDuration string `env:"MF_THINGS_CACHE_KEY_DURATION" envDefault:"10m"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_THINGS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_THINGS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
CacheURL string `env:"MF_THINGS_CACHE_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -113,7 +114,7 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -39,12 +39,13 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_TIMESCALE_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_TIMESCALE_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_TIMESCALE_WRITER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_TIMESCALE_WRITER_LOG_LEVEL" envDefault:"info"`
|
||||
ConfigPath string `env:"MF_TIMESCALE_WRITER_CONFIG_PATH" envDefault:"/config.toml"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_TIMESCALE_WRITER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -88,7 +89,7 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("Failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -46,16 +46,17 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_TWINS_LOG_LEVEL" envDefault:"info"`
|
||||
StandaloneID string `env:"MF_TWINS_STANDALONE_ID" envDefault:""`
|
||||
StandaloneToken string `env:"MF_TWINS_STANDALONE_TOKEN" envDefault:""`
|
||||
ChannelID string `env:"MF_TWINS_CHANNEL_ID" envDefault:""`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_TWINS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_TWINS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
CacheURL string `env:"MF_TWINS_CACHE_URL" envDefault:"redis://localhost:6379/0"`
|
||||
LogLevel string `env:"MF_TWINS_LOG_LEVEL" envDefault:"info"`
|
||||
StandaloneID string `env:"MF_TWINS_STANDALONE_ID" envDefault:""`
|
||||
StandaloneToken string `env:"MF_TWINS_STANDALONE_TOKEN" envDefault:""`
|
||||
ChannelID string `env:"MF_TWINS_CHANNEL_ID" envDefault:""`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_TWINS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_TWINS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
CacheURL string `env:"MF_TWINS_CACHE_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -105,7 +106,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -56,18 +56,19 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_USERS_LOG_LEVEL" envDefault:"info"`
|
||||
SecretKey string `env:"MF_USERS_SECRET_KEY" envDefault:"secret"`
|
||||
AdminEmail string `env:"MF_USERS_ADMIN_EMAIL" envDefault:""`
|
||||
AdminPassword string `env:"MF_USERS_ADMIN_PASSWORD" envDefault:""`
|
||||
PassRegexText string `env:"MF_USERS_PASS_REGEX" envDefault:"^.{8,}$"`
|
||||
AccessDuration string `env:"MF_USERS_ACCESS_TOKEN_DURATION" envDefault:"15m"`
|
||||
RefreshDuration string `env:"MF_USERS_REFRESH_TOKEN_DURATION" envDefault:"24h"`
|
||||
ResetURL string `env:"MF_TOKEN_RESET_ENDPOINT" envDefault:"/reset-request"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_USERS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_USERS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
LogLevel string `env:"MF_USERS_LOG_LEVEL" envDefault:"info"`
|
||||
SecretKey string `env:"MF_USERS_SECRET_KEY" envDefault:"secret"`
|
||||
AdminEmail string `env:"MF_USERS_ADMIN_EMAIL" envDefault:""`
|
||||
AdminPassword string `env:"MF_USERS_ADMIN_PASSWORD" envDefault:""`
|
||||
PassRegexText string `env:"MF_USERS_PASS_REGEX" envDefault:"^.{8,}$"`
|
||||
AccessDuration string `env:"MF_USERS_ACCESS_TOKEN_DURATION" envDefault:"15m"`
|
||||
RefreshDuration string `env:"MF_USERS_REFRESH_TOKEN_DURATION" envDefault:"24h"`
|
||||
ResetURL string `env:"MF_TOKEN_RESET_ENDPOINT" envDefault:"/reset-request"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_USERS_INSTANCE_ID" envDefault:""`
|
||||
ESURL string `env:"MF_USERS_ES_URL" envDefault:"redis://localhost:6379/0"`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
PassRegex *regexp.Regexp
|
||||
}
|
||||
|
||||
|
@ -126,7 +127,7 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -41,11 +41,12 @@ const (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
LogLevel string `env:"MF_WS_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_WS_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
LogLevel string `env:"MF_WS_ADAPTER_LOG_LEVEL" envDefault:"info"`
|
||||
BrokerURL string `env:"MF_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
|
||||
JaegerURL string `env:"MF_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
|
||||
SendTelemetry bool `env:"MF_SEND_TELEMETRY" envDefault:"true"`
|
||||
InstanceID string `env:"MF_WS_ADAPTER_INSTANCE_ID" envDefault:""`
|
||||
TraceRatio float64 `env:"MF_JAEGER_TRACE_RATIO" envDefault:"1.0"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -95,7 +96,7 @@ func main() {
|
|||
|
||||
logger.Info("Successfully connected to things grpc server " + aHandler.Secure())
|
||||
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID)
|
||||
tp, err := jaegerclient.NewProvider(svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("failed to init Jaeger: %s", err))
|
||||
exitCode = 1
|
||||
|
|
|
@ -61,10 +61,14 @@ MF_JAEGER_FRONTEND=16686
|
|||
MF_JAEGER_COLLECTOR=14268
|
||||
MF_JAEGER_CONFIGS=5778
|
||||
MF_JAEGER_URL=http://jaeger:14268/api/traces
|
||||
MF_JAEGER_TRACE_RATIO=1.0
|
||||
|
||||
## Call home
|
||||
MF_SEND_TELEMETRY=true
|
||||
|
||||
## Postgres
|
||||
MF_POSTGRES_MAX_CONNECTIONS=100
|
||||
|
||||
## Core Services
|
||||
|
||||
### Auth
|
||||
|
|
|
@ -62,6 +62,7 @@ services:
|
|||
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
||||
MF_THINGS_URL: ${MF_THINGS_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_BOOTSTRAP_INSTANCE_ID: ${MF_BOOTSTRAP_INSTANCE_ID}
|
||||
networks:
|
||||
|
|
|
@ -57,6 +57,7 @@ services:
|
|||
MF_CASSANDRA_PASS: ${MF_CASSANDRA_PASS}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_CASSANDRA_WRITER_INSANCE_ID: ${MF_CASSANDRA_WRITER_INSANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -69,6 +69,7 @@ services:
|
|||
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
||||
MF_THINGS_URL: ${MF_THINGS_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_CERTS_INSTANCE_ID: ${MF_CERTS_INSTANCE_ID}
|
||||
volumes:
|
||||
|
|
|
@ -63,6 +63,7 @@ services:
|
|||
MF_INFLUXDB_INSECURE_SKIP_VERIFY: ${MF_INFLUXDB_INSECURE_SKIP_VERIFY}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_INFLUX_WRITER_INSTANCE_ID: ${MF_INFLUX_WRITER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -39,6 +39,7 @@ services:
|
|||
MF_LORA_ADAPTER_ES_URL: ${MF_ES_STORE_URL}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_LORA_ADAPTER_INSTANCE_ID: ${MF_LORA_ADAPTER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -50,6 +50,7 @@ services:
|
|||
MF_MONGO_NAME: ${MF_MONGO_NAME}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_MONGO_WRITER_INSTANCE_ID: ${MF_MONGO_WRITER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -40,6 +40,7 @@ services:
|
|||
MF_OPCUA_ADAPTER_ROUTE_MAP_URL: ${MF_OPCUA_ADAPTER_ROUTE_MAP_URL}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_OPCUA_ADAPTER_INSTANCE_ID: ${MF_OPCUA_ADAPTER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -54,6 +54,7 @@ services:
|
|||
MF_POSTGRES_SSL_ROOT_CERT: ${MF_POSTGRES_SSL_ROOT_CERT}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_POSTGRES_WRITER_INSTANCE_ID: ${MF_POSTGRES_WRITER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -66,6 +66,7 @@ services:
|
|||
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_SMPP_NOTIFIER_INSTANCE_ID: ${MF_SMPP_NOTIFIER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -65,6 +65,7 @@ services:
|
|||
MF_EMAIL_TEMPLATE: ${MF_SMTP_NOTIFIER_EMAIL_TEMPLATE}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_SMTP_NOTIFIER_INSTANCE_ID: ${MF_SMTP_NOTIFIER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -54,6 +54,7 @@ services:
|
|||
MF_TIMESCALE_SSL_ROOT_CERT: ${MF_TIMESCALE_SSL_ROOT_CERT}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_TIMESCALE_WRITER_INSTANCE_ID: ${MF_TIMESCALE_WRITER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -64,6 +64,8 @@ services:
|
|||
MF_AUTH_GRPC_CLIENT_KEY: ${MF_AUTH_GRPC_CLIENT_KEY:+/users-grpc-client.key}
|
||||
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_TWINS_INSTANCE_ID: ${MF_TWINS_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -149,10 +149,12 @@ services:
|
|||
image: postgres:13.3-alpine
|
||||
container_name: mainflux-things-db
|
||||
restart: on-failure
|
||||
command: postgres -c "max_connections=${MF_POSTGRES_MAX_CONNECTIONS}"
|
||||
environment:
|
||||
POSTGRES_USER: ${MF_THINGS_DB_USER}
|
||||
POSTGRES_PASSWORD: ${MF_THINGS_DB_PASS}
|
||||
POSTGRES_DB: ${MF_THINGS_DB_NAME}
|
||||
MF_POSTGRES_MAX_CONNECTIONS: ${MF_POSTGRES_MAX_CONNECTIONS}
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
ports:
|
||||
|
@ -209,6 +211,7 @@ services:
|
|||
MF_AUTH_GRPC_CLIENT_KEY: ${MF_AUTH_GRPC_CLIENT_KEY:+/users-grpc-client.key}
|
||||
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
ports:
|
||||
- ${MF_THINGS_HTTP_PORT}:${MF_THINGS_HTTP_PORT}
|
||||
|
@ -258,12 +261,12 @@ services:
|
|||
image: postgres:15.1-alpine
|
||||
container_name: mainflux-users-db
|
||||
restart: on-failure
|
||||
command: postgres -c "max_connections=${MF_POSTGRES_MAX_CONNECTIONS}"
|
||||
environment:
|
||||
POSTGRES_USER: ${MF_USERS_DB_USER}
|
||||
POSTGRES_PASSWORD: ${MF_USERS_DB_PASS}
|
||||
POSTGRES_DB: ${MF_USERS_DB_NAME}
|
||||
ports:
|
||||
- 6005:5432
|
||||
MF_POSTGRES_MAX_CONNECTIONS: ${MF_POSTGRES_MAX_CONNECTIONS}
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
volumes:
|
||||
|
@ -312,6 +315,7 @@ services:
|
|||
MF_EMAIL_TEMPLATE: ${MF_EMAIL_TEMPLATE}
|
||||
MF_USERS_ES_URL: ${MF_ES_STORE_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_AUTH_GRPC_URL: ${MF_AUTH_GRPC_URL}
|
||||
MF_AUTH_GRPC_TIMEOUT: ${MF_AUTH_GRPC_TIMEOUT}
|
||||
|
@ -383,6 +387,7 @@ services:
|
|||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: ${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+/things-grpc-server-ca.crt}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
|
@ -424,6 +429,7 @@ services:
|
|||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: ${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+/things-grpc-server-ca.crt}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_HTTP_ADAPTER_INSTANCE_ID: ${MF_HTTP_ADAPTER_INSTANCE_ID}
|
||||
ports:
|
||||
|
@ -472,6 +478,7 @@ services:
|
|||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: ${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+/things-grpc-server-ca.crt}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_COAP_ADAPTER_INSTANCE_ID: ${MF_COAP_ADAPTER_INSTANCE_ID}
|
||||
ports:
|
||||
|
@ -517,6 +524,7 @@ services:
|
|||
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: ${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+/things-grpc-server-ca.crt}
|
||||
MF_MESSAGE_BROKER_URL: ${MF_MESSAGE_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_JAEGER_TRACE_RATIO: ${MF_JAEGER_TRACE_RATIO}
|
||||
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
||||
MF_WS_ADAPTER_INSTANCE_ID: ${MF_WS_ADAPTER_INSTANCE_ID}
|
||||
ports:
|
||||
|
|
|
@ -21,7 +21,7 @@ var (
|
|||
)
|
||||
|
||||
// NewProvider initializes Jaeger TraceProvider.
|
||||
func NewProvider(svcName, url, instanceID string) (*tracesdk.TracerProvider, error) {
|
||||
func NewProvider(svcName, url, instanceID string, fraction float64) (*tracesdk.TracerProvider, error) {
|
||||
if url == "" {
|
||||
return nil, errNoURL
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ func NewProvider(svcName, url, instanceID string) (*tracesdk.TracerProvider, err
|
|||
attributes = append(attributes, hostAttr.Attributes()...)
|
||||
|
||||
tp := tracesdk.NewTracerProvider(
|
||||
tracesdk.WithSampler(tracesdk.AlwaysSample()),
|
||||
tracesdk.WithSampler(tracesdk.TraceIDRatioBased(fraction)),
|
||||
tracesdk.WithBatcher(exporter),
|
||||
tracesdk.WithResource(resource.NewWithAttributes(
|
||||
semconv.SchemaURL,
|
||||
|
|
Loading…
Reference in New Issue