-
Notifications
You must be signed in to change notification settings - Fork 230
Configuration Endpoint
When debugging a service, you may want to view its current configuration in order to check if things are configured correctly. For this purpose, every Microdot service exposes a configuration endpoint, which can be called from outside service and return its current configuration tree with all values from all levels, specifying which value is the value that is currently being used. In order to call the config endpoint, call the service at the service's port at url of /config
.
For example, if your service is running on localhost:4567
, you can call http://localhost:4567/config
, and get a list of all configuration values (under the Configuration Entries section) and some more runtime data in plain text. It will look something like this:
=== Hash of everything: 1835166307 ===
=== Environment Variables (hash 359924621) ===
DC = eu
ENV = staging
GIGYA_CONFIG_PATHS_FILE = d:/gigya/config/configPaths.json
GIGYA_CONFIG_ROOT = d:/gigya/config/
...
=== Assembly Versions (hash -1098675723) ===
(service) 2.1.3.9072
MyService 2.1.3.9072
MyService.Interface 2.1.3.9072
Gigya.Microdot.Configuration 1.0.0.84
Gigya.Microdot.Fakes 1.0.0.84
Gigya.Microdot.Hosting 1.0.0.84
Gigya.Microdot.Interfaces 1.0.0.84
Gigya.Microdot.Ninject 1.0.0.84
Gigya.Microdot.Ninject.Host 1.0.0.84
...
=== Runtime Info (hash -1545482989) ===
ApplicationName = MyService
HostName = EU-MACHINE-NI1A-S22
InstanceName = 20170618104357Z
OSUser = NT AUTHORITY\SYSTEM
OSVersion = Microsoft Windows NT 6.1.7601 Service Pack 1
...
=== Configuration Entries (hash -1568813744) ===
Log.MaxQueuedLoggingEvents = "1000" [d:\gigya\config\eu\general.config] [UNUSED]
~~~> "5000" [d:\gigya\config\_global\general.config] [USED]
logging.ClassLogLevel.Enabled = "false" [d:\gigya\config\_global\general.config] [USED]
Logging.ExcludeParams = "false" [d:\gigya\config\_global\general.config] [USED]
...
If you want this information in JSON format, you can call the url /config?format=json
instead.