Add tracing defaults for jaeger (#934)

* Add tracing defaults for jaeger

* Fix tests

* Add comment in config file as well
This commit is contained in:
Manu Gupta
2018-11-29 10:44:34 -05:00
committed by GitHub
parent bd2ebddc9b
commit 66cb01e668
2 changed files with 16 additions and 13 deletions
+8 -6
View File
@@ -119,15 +119,17 @@ GithubToken = ""
# Env override: ATHENS_HGRC_PATH
HGRCPath = ""
# TraceExporterURL is the URL to which Athens populates distributed tracing
# information such as Jaeger. In Stackdriver, use this as the GCP ProjectID.
# Env override: ATHENS_TRACE_EXPORTER_URL
TraceExporterURL = ""
# Tracing is not a requirement for Athens. If the infrastructure is not set up,
# Athens will keep on running and traces won't be exported.
# TraceExporter is the service to which the data collected by OpenCensus can be exported to.
# Possible values are: jaeger, datadog, and stackdriver.
# Env overide: ATHENS_TRACE_EXPORTER
TraceExporter = ""
TraceExporter = "jaeger"
# TraceExporterURL is the URL to which Athens populates distributed tracing
# information such as Jaeger. In Stackdriver, use this as the GCP ProjectID.
# Env override: ATHENS_TRACE_EXPORTER_URL
TraceExporterURL = "http://localhost:14268"
[Storage]
# Only storage backends that are specified in Proxy.StorageType are required here
+8 -7
View File
@@ -208,12 +208,14 @@ func TestParseExampleConfig(t *testing.T) {
TimeoutConf: TimeoutConf{
Timeout: 300,
},
StorageType: "memory",
GlobalEndpoint: "http://localhost:3001",
Port: ":3000",
BasicAuthUser: "",
BasicAuthPass: "",
Storage: expStorage,
StorageType: "memory",
GlobalEndpoint: "http://localhost:3001",
Port: ":3000",
BasicAuthUser: "",
BasicAuthPass: "",
Storage: expStorage,
TraceExporterURL: "http://localhost:14268",
TraceExporter: "jaeger",
}
absPath, err := filepath.Abs(exampleConfigPath)
@@ -240,7 +242,6 @@ func getEnvMap(config *Config) map[string]string {
"BUFFALO_LOG_LEVEL": config.BuffaloLogLevel,
"ATHENS_CLOUD_RUNTIME": config.CloudRuntime,
"ATHENS_TIMEOUT": strconv.Itoa(config.Timeout),
"ATHENS_TRACE_EXPORTER": config.TraceExporterURL,
}
envVars["ATHENS_STORAGE_TYPE"] = config.StorageType