iisconfig

package
v0.82.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package iisconfig manages iis configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDotNetConfig

func ReadDotNetConfig(cfgpath string) (envTags APMTags, appSettingsTags APMTags, err error)

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

func ReadDatadogJSON(datadogJSONPath string) (APMTags, error)

ReadDatadogJSON reads a datadog.json file and returns the APM tags

func (APMTags) Overlay

func (t APMTags) Overlay(higher APMTags) APMTags

Overlay returns a copy of t with each non-empty field of higher taking precedence. Empty fields in higher leave t's value untouched, so chaining expresses per-field precedence low to high: low.Overlay(mid).Overlay(high).

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

func (*DynamicIISConfig) Start

func (iiscfg *DynamicIISConfig) Start() error

Start config watcher

func (*DynamicIISConfig) Stop

func (iiscfg *DynamicIISConfig) Stop()

Stop config watcher

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL