Documentation ¶
Overview ¶
Data contract definitions for telemetry submitted to Application Insights. This is generated from the schemas found at https://github.com/Microsoft/ApplicationInsights-Home/tree/master/EndpointSpecs/Schemas/Bond
Index ¶
- Constants
- func SanitizeTags(tags map[string]string) []string
- type ApplicationContextTags
- type AvailabilityData
- type Base
- type CloudContextTags
- type ContextTags
- func (tags ContextTags) Application() ApplicationContextTags
- func (tags ContextTags) Cloud() CloudContextTags
- func (tags ContextTags) Device() DeviceContextTags
- func (tags ContextTags) Internal() InternalContextTags
- func (tags ContextTags) Location() LocationContextTags
- func (tags ContextTags) Operation() OperationContextTags
- func (tags ContextTags) Session() SessionContextTags
- func (tags ContextTags) User() UserContextTags
- type Data
- type DataPoint
- type DataPointType
- type DeviceContextTags
- func (tags DeviceContextTags) GetId() string
- func (tags DeviceContextTags) GetLocale() string
- func (tags DeviceContextTags) GetModel() string
- func (tags DeviceContextTags) GetOemName() string
- func (tags DeviceContextTags) GetOsVersion() string
- func (tags DeviceContextTags) GetType() string
- func (tags DeviceContextTags) SetId(value string)
- func (tags DeviceContextTags) SetLocale(value string)
- func (tags DeviceContextTags) SetModel(value string)
- func (tags DeviceContextTags) SetOemName(value string)
- func (tags DeviceContextTags) SetOsVersion(value string)
- func (tags DeviceContextTags) SetType(value string)
- type Domain
- type Envelope
- type EventData
- type ExceptionData
- type ExceptionDetails
- type InternalContextTags
- func (tags InternalContextTags) GetAgentVersion() string
- func (tags InternalContextTags) GetNodeName() string
- func (tags InternalContextTags) GetSdkVersion() string
- func (tags InternalContextTags) SetAgentVersion(value string)
- func (tags InternalContextTags) SetNodeName(value string)
- func (tags InternalContextTags) SetSdkVersion(value string)
- type LocationContextTags
- type MessageData
- type MetricData
- type OperationContextTags
- func (tags OperationContextTags) GetCorrelationVector() string
- func (tags OperationContextTags) GetId() string
- func (tags OperationContextTags) GetName() string
- func (tags OperationContextTags) GetParentId() string
- func (tags OperationContextTags) GetSyntheticSource() string
- func (tags OperationContextTags) SetCorrelationVector(value string)
- func (tags OperationContextTags) SetId(value string)
- func (tags OperationContextTags) SetName(value string)
- func (tags OperationContextTags) SetParentId(value string)
- func (tags OperationContextTags) SetSyntheticSource(value string)
- type PageViewData
- type RemoteDependencyData
- type RequestData
- type SessionContextTags
- type SeverityLevel
- type StackFrame
- type UserContextTags
- func (tags UserContextTags) GetAccountId() string
- func (tags UserContextTags) GetAuthUserId() string
- func (tags UserContextTags) GetId() string
- func (tags UserContextTags) SetAccountId(value string)
- func (tags UserContextTags) SetAuthUserId(value string)
- func (tags UserContextTags) SetId(value string)
Constants ¶
const ( // Application version. Information in the application context fields is // always about the application that is sending the telemetry. ApplicationVersion string = "ai.application.ver" // Unique client device id. Computer name in most cases. DeviceId string = "ai.device.id" // Device locale using <language>-<REGION> pattern, following RFC 5646. // Example 'en-US'. DeviceLocale string = "ai.device.locale" // Model of the device the end user of the application is using. Used for // client scenarios. If this field is empty then it is derived from the user // agent. DeviceModel string = "ai.device.model" // Client device OEM name taken from the browser. DeviceOEMName string = "ai.device.oemName" // Operating system name and version of the device the end user of the // application is using. If this field is empty then it is derived from the // user agent. Example 'Windows 10 Pro 10.0.10586.0' DeviceOSVersion string = "ai.device.osVersion" // The type of the device the end user of the application is using. Used // primarily to distinguish JavaScript telemetry from server side telemetry. // Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value. DeviceType string = "ai.device.type" // The IP address of the client device. IPv4 and IPv6 are supported. // Information in the location context fields is always about the end user. // When telemetry is sent from a service, the location context is about the // user that initiated the operation in the service. LocationIp string = "ai.location.ip" // A unique identifier for the operation instance. The operation.id is created // by either a request or a page view. All other telemetry sets this to the // value for the containing request or page view. Operation.id is used for // finding all the telemetry items for a specific operation instance. OperationId string = "ai.operation.id" // The name (group) of the operation. The operation.name is created by either // a request or a page view. All other telemetry items set this to the value // for the containing request or page view. Operation.name is used for finding // all the telemetry items for a group of operations (i.e. 'GET Home/Index'). OperationName string = "ai.operation.name" // The unique identifier of the telemetry item's immediate parent. OperationParentId string = "ai.operation.parentId" // Name of synthetic source. Some telemetry from the application may represent // a synthetic traffic. It may be web crawler indexing the web site, site // availability tests or traces from diagnostic libraries like Application // Insights SDK itself. OperationSyntheticSource string = "ai.operation.syntheticSource" // The correlation vector is a light weight vector clock which can be used to // identify and order related events across clients and services. OperationCorrelationVector string = "ai.operation.correlationVector" // Session ID - the instance of the user's interaction with the app. // Information in the session context fields is always about the end user. // When telemetry is sent from a service, the session context is about the // user that initiated the operation in the service. SessionId string = "ai.session.id" // Boolean value indicating whether the session identified by ai.session.id is // first for the user or not. SessionIsFirst string = "ai.session.isFirst" // In multi-tenant applications this is the account ID or name which the user // is acting with. Examples may be subscription ID for Azure portal or blog // name blogging platform. UserAccountId string = "ai.user.accountId" // Anonymous user id. Represents the end user of the application. When // telemetry is sent from a service, the user context is about the user that // initiated the operation in the service. UserId string = "ai.user.id" // Authenticated user id. The opposite of ai.user.id, this represents the user // with a friendly name. Since it's PII information it is not collected by // default by most SDKs. UserAuthUserId string = "ai.user.authUserId" // Name of the role the application is a part of. Maps directly to the role // name in azure. CloudRole string = "ai.cloud.role" // Name of the instance where the application is running. Computer name for // on-premisis, instance name for Azure. CloudRoleInstance string = "ai.cloud.roleInstance" // SDK version. See // https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification // for information. InternalSdkVersion string = "ai.internal.sdkVersion" // Agent version. Used to indicate the version of StatusMonitor installed on // the computer if it is used for data collection. InternalAgentVersion string = "ai.internal.agentVersion" // This is the node name used for billing purposes. Use it to override the // standard detection of nodes. InternalNodeName string = "ai.internal.nodeName" )
Variables ¶
This section is empty.
Functions ¶
func SanitizeTags ¶
Truncates tag values that exceed their maximum supported lengths. Returns warnings for each affected field.
Types ¶
type ApplicationContextTags ¶
type ApplicationContextTags ContextTags
Helper type that provides access to context fields grouped under 'application'. This is returned by TelemetryContext.Tags.Application()
func (ApplicationContextTags) GetVer ¶
func (tags ApplicationContextTags) GetVer() string
Application version. Information in the application context fields is always about the application that is sending the telemetry.
func (ApplicationContextTags) SetVer ¶
func (tags ApplicationContextTags) SetVer(value string)
Application version. Information in the application context fields is always about the application that is sending the telemetry.
type AvailabilityData ¶
type AvailabilityData struct { Domain // Schema version Ver int `json:"ver"` // Identifier of a test run. Use it to correlate steps of test run and // telemetry generated by the service. Id string `json:"id"` // Name of the test that these availability results represent. Name string `json:"name"` // Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days. Duration string `json:"duration"` // Success flag. Success bool `json:"success"` // Name of the location where the test was run from. RunLocation string `json:"runLocation"` // Diagnostic message for the result. Message string `json:"message"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` // Collection of custom measurements. Measurements map[string]float64 `json:"measurements,omitempty"` }
Instances of AvailabilityData represent the result of executing an availability test.
func NewAvailabilityData ¶
func NewAvailabilityData() *AvailabilityData
Creates a new AvailabilityData instance with default values set by the schema.
func (*AvailabilityData) BaseType ¶
func (data *AvailabilityData) BaseType() string
Returns the base type when placed within a Data object container.
func (*AvailabilityData) EnvelopeName ¶
func (data *AvailabilityData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*AvailabilityData) Sanitize ¶
func (data *AvailabilityData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type Base ¶
type Base struct { // Name of item (B section) if any. If telemetry data is derived straight from // this, this should be null. BaseType string `json:"baseType"` }
Data struct to contain only C section with custom fields.
type CloudContextTags ¶
type CloudContextTags ContextTags
Helper type that provides access to context fields grouped under 'cloud'. This is returned by TelemetryContext.Tags.Cloud()
func (CloudContextTags) GetRole ¶
func (tags CloudContextTags) GetRole() string
Name of the role the application is a part of. Maps directly to the role name in azure.
func (CloudContextTags) GetRoleInstance ¶
func (tags CloudContextTags) GetRoleInstance() string
Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.
func (CloudContextTags) SetRole ¶
func (tags CloudContextTags) SetRole(value string)
Name of the role the application is a part of. Maps directly to the role name in azure.
func (CloudContextTags) SetRoleInstance ¶
func (tags CloudContextTags) SetRoleInstance(value string)
Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.
type ContextTags ¶
func (ContextTags) Application ¶
func (tags ContextTags) Application() ApplicationContextTags
Returns a helper to access context fields grouped under 'application'.
func (ContextTags) Cloud ¶
func (tags ContextTags) Cloud() CloudContextTags
Returns a helper to access context fields grouped under 'cloud'.
func (ContextTags) Device ¶
func (tags ContextTags) Device() DeviceContextTags
Returns a helper to access context fields grouped under 'device'.
func (ContextTags) Internal ¶
func (tags ContextTags) Internal() InternalContextTags
Returns a helper to access context fields grouped under 'internal'.
func (ContextTags) Location ¶
func (tags ContextTags) Location() LocationContextTags
Returns a helper to access context fields grouped under 'location'.
func (ContextTags) Operation ¶
func (tags ContextTags) Operation() OperationContextTags
Returns a helper to access context fields grouped under 'operation'.
func (ContextTags) Session ¶
func (tags ContextTags) Session() SessionContextTags
Returns a helper to access context fields grouped under 'session'.
func (ContextTags) User ¶
func (tags ContextTags) User() UserContextTags
Returns a helper to access context fields grouped under 'user'.
type Data ¶
type Data struct { Base // Container for data item (B section). BaseData interface{} `json:"baseData"` }
Data struct to contain both B and C sections.
type DataPoint ¶
type DataPoint struct { // Name of the metric. Name string `json:"name"` // Metric type. Single measurement or the aggregated value. Kind DataPointType `json:"kind"` // Single value for measurement. Sum of individual measurements for the // aggregation. Value float64 `json:"value"` // Metric weight of the aggregated metric. Should not be set for a // measurement. Count int `json:"count"` // Minimum value of the aggregated metric. Should not be set for a // measurement. Min float64 `json:"min"` // Maximum value of the aggregated metric. Should not be set for a // measurement. Max float64 `json:"max"` // Standard deviation of the aggregated metric. Should not be set for a // measurement. StdDev float64 `json:"stdDev"` }
Metric data single measurement.
func NewDataPoint ¶
func NewDataPoint() *DataPoint
Creates a new DataPoint instance with default values set by the schema.
type DataPointType ¶
type DataPointType int
Type of the metric data measurement.
const ( Measurement DataPointType = 0 Aggregation DataPointType = 1 )
func (DataPointType) String ¶
func (value DataPointType) String() string
type DeviceContextTags ¶
type DeviceContextTags ContextTags
Helper type that provides access to context fields grouped under 'device'. This is returned by TelemetryContext.Tags.Device()
func (DeviceContextTags) GetId ¶
func (tags DeviceContextTags) GetId() string
Unique client device id. Computer name in most cases.
func (DeviceContextTags) GetLocale ¶
func (tags DeviceContextTags) GetLocale() string
Device locale using <language>-<REGION> pattern, following RFC 5646. Example 'en-US'.
func (DeviceContextTags) GetModel ¶
func (tags DeviceContextTags) GetModel() string
Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.
func (DeviceContextTags) GetOemName ¶
func (tags DeviceContextTags) GetOemName() string
Client device OEM name taken from the browser.
func (DeviceContextTags) GetOsVersion ¶
func (tags DeviceContextTags) GetOsVersion() string
Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'
func (DeviceContextTags) GetType ¶
func (tags DeviceContextTags) GetType() string
The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.
func (DeviceContextTags) SetId ¶
func (tags DeviceContextTags) SetId(value string)
Unique client device id. Computer name in most cases.
func (DeviceContextTags) SetLocale ¶
func (tags DeviceContextTags) SetLocale(value string)
Device locale using <language>-<REGION> pattern, following RFC 5646. Example 'en-US'.
func (DeviceContextTags) SetModel ¶
func (tags DeviceContextTags) SetModel(value string)
Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.
func (DeviceContextTags) SetOemName ¶
func (tags DeviceContextTags) SetOemName(value string)
Client device OEM name taken from the browser.
func (DeviceContextTags) SetOsVersion ¶
func (tags DeviceContextTags) SetOsVersion(value string)
Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'
func (DeviceContextTags) SetType ¶
func (tags DeviceContextTags) SetType(value string)
The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.
type Domain ¶
type Domain struct { }
The abstract common base of all domains.
type Envelope ¶
type Envelope struct { // Envelope version. For internal use only. By assigning this the default, it // will not be serialized within the payload unless changed to a value other // than #1. Ver int `json:"ver"` // Type name of telemetry data item. Name string `json:"name"` // Event date time when telemetry item was created. This is the wall clock // time on the client when the event was generated. There is no guarantee that // the client's time is accurate. This field must be formatted in UTC ISO 8601 // format, with a trailing 'Z' character, as described publicly on // https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal // seconds digits provided are variable (and unspecified). Consumers should // handle this, i.e. managed code consumers should not use format 'O' for // parsing as it specifies a fixed length. Example: // 2009-06-15T13:45:30.0000000Z. Time string `json:"time"` // Sampling rate used in application. This telemetry item represents 1 / // sampleRate actual telemetry items. SampleRate float64 `json:"sampleRate"` // Sequence field used to track absolute order of uploaded events. Seq string `json:"seq"` // The application's instrumentation key. The key is typically represented as // a GUID, but there are cases when it is not a guid. No code should rely on // iKey being a GUID. Instrumentation key is case insensitive. IKey string `json:"iKey"` // Key/value collection of context properties. See ContextTagKeys for // information on available properties. Tags map[string]string `json:"tags,omitempty"` // Telemetry data item. Data interface{} `json:"data"` }
System variables for a telemetry item.
func NewEnvelope ¶
func NewEnvelope() *Envelope
Creates a new Envelope instance with default values set by the schema.
type EventData ¶
type EventData struct { Domain // Schema version Ver int `json:"ver"` // Event name. Keep it low cardinality to allow proper grouping and useful // metrics. Name string `json:"name"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` // Collection of custom measurements. Measurements map[string]float64 `json:"measurements,omitempty"` }
Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.
func NewEventData ¶
func NewEventData() *EventData
Creates a new EventData instance with default values set by the schema.
func (*EventData) EnvelopeName ¶
Returns the name used when this is embedded within an Envelope container.
type ExceptionData ¶
type ExceptionData struct { Domain // Schema version Ver int `json:"ver"` // Exception chain - list of inner exceptions. Exceptions []*ExceptionDetails `json:"exceptions"` // Severity level. Mostly used to indicate exception severity level when it is // reported by logging library. SeverityLevel SeverityLevel `json:"severityLevel"` // Identifier of where the exception was thrown in code. Used for exceptions // grouping. Typically a combination of exception type and a function from the // call stack. ProblemId string `json:"problemId"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` // Collection of custom measurements. Measurements map[string]float64 `json:"measurements,omitempty"` }
An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
func NewExceptionData ¶
func NewExceptionData() *ExceptionData
Creates a new ExceptionData instance with default values set by the schema.
func (*ExceptionData) BaseType ¶
func (data *ExceptionData) BaseType() string
Returns the base type when placed within a Data object container.
func (*ExceptionData) EnvelopeName ¶
func (data *ExceptionData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*ExceptionData) Sanitize ¶
func (data *ExceptionData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type ExceptionDetails ¶
type ExceptionDetails struct { // In case exception is nested (outer exception contains inner one), the id // and outerId properties are used to represent the nesting. Id int `json:"id"` // The value of outerId is a reference to an element in ExceptionDetails that // represents the outer exception OuterId int `json:"outerId"` // Exception type name. TypeName string `json:"typeName"` // Exception message. Message string `json:"message"` // Indicates if full exception stack is provided in the exception. The stack // may be trimmed, such as in the case of a StackOverflow exception. HasFullStack bool `json:"hasFullStack"` // Text describing the stack. Either stack or parsedStack should have a value. Stack string `json:"stack"` // List of stack frames. Either stack or parsedStack should have a value. ParsedStack []*StackFrame `json:"parsedStack,omitempty"` }
Exception details of the exception in a chain.
func NewExceptionDetails ¶
func NewExceptionDetails() *ExceptionDetails
Creates a new ExceptionDetails instance with default values set by the schema.
func (*ExceptionDetails) Sanitize ¶
func (data *ExceptionDetails) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type InternalContextTags ¶
type InternalContextTags ContextTags
Helper type that provides access to context fields grouped under 'internal'. This is returned by TelemetryContext.Tags.Internal()
func (InternalContextTags) GetAgentVersion ¶
func (tags InternalContextTags) GetAgentVersion() string
Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.
func (InternalContextTags) GetNodeName ¶
func (tags InternalContextTags) GetNodeName() string
This is the node name used for billing purposes. Use it to override the standard detection of nodes.
func (InternalContextTags) GetSdkVersion ¶
func (tags InternalContextTags) GetSdkVersion() string
SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.
func (InternalContextTags) SetAgentVersion ¶
func (tags InternalContextTags) SetAgentVersion(value string)
Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.
func (InternalContextTags) SetNodeName ¶
func (tags InternalContextTags) SetNodeName(value string)
This is the node name used for billing purposes. Use it to override the standard detection of nodes.
func (InternalContextTags) SetSdkVersion ¶
func (tags InternalContextTags) SetSdkVersion(value string)
SDK version. See https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.
type LocationContextTags ¶
type LocationContextTags ContextTags
Helper type that provides access to context fields grouped under 'location'. This is returned by TelemetryContext.Tags.Location()
func (LocationContextTags) GetIp ¶
func (tags LocationContextTags) GetIp() string
The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
func (LocationContextTags) SetIp ¶
func (tags LocationContextTags) SetIp(value string)
The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
type MessageData ¶
type MessageData struct { Domain // Schema version Ver int `json:"ver"` // Trace message Message string `json:"message"` // Trace severity level. SeverityLevel SeverityLevel `json:"severityLevel"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` }
Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.
func NewMessageData ¶
func NewMessageData() *MessageData
Creates a new MessageData instance with default values set by the schema.
func (*MessageData) BaseType ¶
func (data *MessageData) BaseType() string
Returns the base type when placed within a Data object container.
func (*MessageData) EnvelopeName ¶
func (data *MessageData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*MessageData) Sanitize ¶
func (data *MessageData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type MetricData ¶
type MetricData struct { Domain // Schema version Ver int `json:"ver"` // List of metrics. Only one metric in the list is currently supported by // Application Insights storage. If multiple data points were sent only the // first one will be used. Metrics []*DataPoint `json:"metrics"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` }
An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
func NewMetricData ¶
func NewMetricData() *MetricData
Creates a new MetricData instance with default values set by the schema.
func (*MetricData) BaseType ¶
func (data *MetricData) BaseType() string
Returns the base type when placed within a Data object container.
func (*MetricData) EnvelopeName ¶
func (data *MetricData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*MetricData) Sanitize ¶
func (data *MetricData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type OperationContextTags ¶
type OperationContextTags ContextTags
Helper type that provides access to context fields grouped under 'operation'. This is returned by TelemetryContext.Tags.Operation()
func (OperationContextTags) GetCorrelationVector ¶
func (tags OperationContextTags) GetCorrelationVector() string
The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.
func (OperationContextTags) GetId ¶
func (tags OperationContextTags) GetId() string
A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.
func (OperationContextTags) GetName ¶
func (tags OperationContextTags) GetName() string
The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').
func (OperationContextTags) GetParentId ¶
func (tags OperationContextTags) GetParentId() string
The unique identifier of the telemetry item's immediate parent.
func (OperationContextTags) GetSyntheticSource ¶
func (tags OperationContextTags) GetSyntheticSource() string
Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.
func (OperationContextTags) SetCorrelationVector ¶
func (tags OperationContextTags) SetCorrelationVector(value string)
The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.
func (OperationContextTags) SetId ¶
func (tags OperationContextTags) SetId(value string)
A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.
func (OperationContextTags) SetName ¶
func (tags OperationContextTags) SetName(value string)
The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').
func (OperationContextTags) SetParentId ¶
func (tags OperationContextTags) SetParentId(value string)
The unique identifier of the telemetry item's immediate parent.
func (OperationContextTags) SetSyntheticSource ¶
func (tags OperationContextTags) SetSyntheticSource(value string)
Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.
type PageViewData ¶
type PageViewData struct { Domain EventData // Request URL with all query string parameters Url string `json:"url"` // Request duration in format: DD.HH:MM:SS.MMMMMM. For a page view // (PageViewData), this is the duration. For a page view with performance // information (PageViewPerfData), this is the page load time. Must be less // than 1000 days. Duration string `json:"duration"` }
An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.
func NewPageViewData ¶
func NewPageViewData() *PageViewData
Creates a new PageViewData instance with default values set by the schema.
func (*PageViewData) BaseType ¶
func (data *PageViewData) BaseType() string
Returns the base type when placed within a Data object container.
func (*PageViewData) EnvelopeName ¶
func (data *PageViewData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*PageViewData) Sanitize ¶
func (data *PageViewData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type RemoteDependencyData ¶
type RemoteDependencyData struct { Domain // Schema version Ver int `json:"ver"` // Name of the command initiated with this dependency call. Low cardinality // value. Examples are stored procedure name and URL path template. Name string `json:"name"` // Identifier of a dependency call instance. Used for correlation with the // request telemetry item corresponding to this dependency call. Id string `json:"id"` // Result code of a dependency call. Examples are SQL error code and HTTP // status code. ResultCode string `json:"resultCode"` // Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 // days. Duration string `json:"duration"` // Indication of successfull or unsuccessfull call. Success bool `json:"success"` // Command initiated by this dependency call. Examples are SQL statement and // HTTP URL's with all query parameters. Data string `json:"data"` // Target site of a dependency call. Examples are server name, host address. Target string `json:"target"` // Dependency type name. Very low cardinality value for logical grouping of // dependencies and interpretation of other fields like commandName and // resultCode. Examples are SQL, Azure table, and HTTP. Type string `json:"type"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` // Collection of custom measurements. Measurements map[string]float64 `json:"measurements,omitempty"` }
An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
func NewRemoteDependencyData ¶
func NewRemoteDependencyData() *RemoteDependencyData
Creates a new RemoteDependencyData instance with default values set by the schema.
func (*RemoteDependencyData) BaseType ¶
func (data *RemoteDependencyData) BaseType() string
Returns the base type when placed within a Data object container.
func (*RemoteDependencyData) EnvelopeName ¶
func (data *RemoteDependencyData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*RemoteDependencyData) Sanitize ¶
func (data *RemoteDependencyData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type RequestData ¶
type RequestData struct { Domain // Schema version Ver int `json:"ver"` // Identifier of a request call instance. Used for correlation between request // and other telemetry items. Id string `json:"id"` // Source of the request. Examples are the instrumentation key of the caller // or the ip address of the caller. Source string `json:"source"` // Name of the request. Represents code path taken to process request. Low // cardinality value to allow better grouping of requests. For HTTP requests // it represents the HTTP method and URL path template like 'GET // /values/{id}'. Name string `json:"name"` // Request duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 // days. Duration string `json:"duration"` // Result of a request execution. HTTP status code for HTTP requests. ResponseCode string `json:"responseCode"` // Indication of successfull or unsuccessfull call. Success bool `json:"success"` // Request URL with all query string parameters. Url string `json:"url"` // Collection of custom properties. Properties map[string]string `json:"properties,omitempty"` // Collection of custom measurements. Measurements map[string]float64 `json:"measurements,omitempty"` }
An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results.
func NewRequestData ¶
func NewRequestData() *RequestData
Creates a new RequestData instance with default values set by the schema.
func (*RequestData) BaseType ¶
func (data *RequestData) BaseType() string
Returns the base type when placed within a Data object container.
func (*RequestData) EnvelopeName ¶
func (data *RequestData) EnvelopeName(key string) string
Returns the name used when this is embedded within an Envelope container.
func (*RequestData) Sanitize ¶
func (data *RequestData) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type SessionContextTags ¶
type SessionContextTags ContextTags
Helper type that provides access to context fields grouped under 'session'. This is returned by TelemetryContext.Tags.Session()
func (SessionContextTags) GetId ¶
func (tags SessionContextTags) GetId() string
Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.
func (SessionContextTags) GetIsFirst ¶
func (tags SessionContextTags) GetIsFirst() string
Boolean value indicating whether the session identified by ai.session.id is first for the user or not.
func (SessionContextTags) SetId ¶
func (tags SessionContextTags) SetId(value string)
Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.
func (SessionContextTags) SetIsFirst ¶
func (tags SessionContextTags) SetIsFirst(value string)
Boolean value indicating whether the session identified by ai.session.id is first for the user or not.
type SeverityLevel ¶
type SeverityLevel int
Defines the level of severity for the event.
const ( Verbose SeverityLevel = 0 Information SeverityLevel = 1 Warning SeverityLevel = 2 Error SeverityLevel = 3 Critical SeverityLevel = 4 )
func (SeverityLevel) String ¶
func (value SeverityLevel) String() string
type StackFrame ¶
type StackFrame struct { // Level in the call stack. For the long stacks SDK may not report every // function in a call stack. Level int `json:"level"` // Method name. Method string `json:"method"` // Name of the assembly (dll, jar, etc.) containing this function. Assembly string `json:"assembly"` // File name or URL of the method implementation. FileName string `json:"fileName"` // Line number of the code implementation. Line int `json:"line"` }
Stack frame information.
func NewStackFrame ¶
func NewStackFrame() *StackFrame
Creates a new StackFrame instance with default values set by the schema.
func (*StackFrame) Sanitize ¶
func (data *StackFrame) Sanitize() []string
Truncates string fields that exceed their maximum supported sizes for this object and all objects it references. Returns a warning for each affected field.
type UserContextTags ¶
type UserContextTags ContextTags
Helper type that provides access to context fields grouped under 'user'. This is returned by TelemetryContext.Tags.User()
func (UserContextTags) GetAccountId ¶
func (tags UserContextTags) GetAccountId() string
In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.
func (UserContextTags) GetAuthUserId ¶
func (tags UserContextTags) GetAuthUserId() string
Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.
func (UserContextTags) GetId ¶
func (tags UserContextTags) GetId() string
Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.
func (UserContextTags) SetAccountId ¶
func (tags UserContextTags) SetAccountId(value string)
In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.
func (UserContextTags) SetAuthUserId ¶
func (tags UserContextTags) SetAuthUserId(value string)
Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.
func (UserContextTags) SetId ¶
func (tags UserContextTags) SetId(value string)
Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.