Documentation
¶
Overview ¶
Package iisconfig manages iis configuration
Index ¶
- func ReadDotNetConfig(cfgpath string) (envTags APMTags, appSettingsTags APMTags, err error)
- type APMTags
- type DynamicIISConfig
- func (iiscfg *DynamicIISConfig) GetAPMTags(siteID uint32, urlpath string) (APMTags, APMTags, APMTags)
- func (iiscfg *DynamicIISConfig) GetApplicationPath(siteID uint32, urlpath string) string
- func (iiscfg *DynamicIISConfig) GetSiteNameFromID(id uint32) string
- func (iiscfg *DynamicIISConfig) Start() error
- func (iiscfg *DynamicIISConfig) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadDotNetConfig ¶
ReadDotNetConfig reads an IIS web.config and returns its APM tags split by source tier: the first return holds env-var tags from <aspNetCore> (real process env, ASP.NET Core apps), the second holds <appSettings> tags (.NET Framework apps, merged with any datadog.json referenced by DD_TRACE_CONFIG_FILE). A web.config is one or the other, so at most one of the two is non-empty.
Types ¶
type APMTags ¶
type APMTags struct {
DDService string `json:"DD_SERVICE"`
DDEnv string `json:"DD_ENV"`
DDVersion string `json:"DD_VERSION"`
}
APMTags holds the APM tags
func ReadDatadogJSON ¶
ReadDatadogJSON reads a datadog.json file and returns the APM tags
type DynamicIISConfig ¶
type DynamicIISConfig struct {
// contains filtered or unexported fields
}
DynamicIISConfig watches the IIS configuration, reloading it on change, and exposes lookups for specific configuration items.
func NewDynamicIISConfig ¶
func NewDynamicIISConfig() (*DynamicIISConfig, error)
NewDynamicIISConfig creates a new DynamicIISConfig
func (*DynamicIISConfig) GetAPMTags ¶
func (iiscfg *DynamicIISConfig) GetAPMTags(siteID uint32, urlpath string) (APMTags, APMTags, APMTags)
GetAPMTags returns the APM tags for the given siteID and URL path. It returns three sources, in increasing precedence within DynamicTags: datadog.json, web.config, and environment variables from applicationHost.config (applicationPoolDefaults, applicationPools, and per-application environmentVariables).
func (*DynamicIISConfig) GetApplicationPath ¶ added in v0.77.0
func (iiscfg *DynamicIISConfig) GetApplicationPath(siteID uint32, urlpath string) string
GetApplicationPath returns the IIS application path that handles the given URL path
func (*DynamicIISConfig) GetSiteNameFromID ¶
func (iiscfg *DynamicIISConfig) GetSiteNameFromID(id uint32) string
GetSiteNameFromID looks up a site name by its site ID