fields

package
v1.23.13 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package fields provides definitions and functions related to the definition of telemetry fields.

Index

Constants

View Source
const (
	FeatLayers             string = "layers"
	FeatRevisionDeployment string = "aca.revisionDeployment"
	FeatJobDeployment      string = "aca.jobDeployment"
)

Feature related attribute values.

View Source
const (
	// A desktop environment. The user is directly interacting with azd via a terminal.
	EnvDesktop = "Desktop"

	EnvVisualStudio       = "Visual Studio"
	EnvVisualStudioCode   = "Visual Studio Code"
	EnvVSCodeAzureCopilot = "VS Code Azure GitHub Copilot"
	EnvCloudShell         = "Azure CloudShell"

	// AI Coding Agent environments
	EnvClaudeCode       = "Claude Code"
	EnvGitHubCopilotCLI = "GitHub Copilot CLI"
	EnvGemini           = "Gemini"
	EnvOpenCode         = "OpenCode"

	EnvUnknownCI          = "UnknownCI"
	EnvAzurePipelines     = "Azure Pipelines"
	EnvGitHubActions      = "GitHub Actions"
	EnvAppVeyor           = "AppVeyor"
	EnvBamboo             = "Bamboo"
	EnvBitBucketPipelines = "BitBucket Pipelines"
	EnvTravisCI           = "Travis CI"
	EnvCircleCI           = "Circle CI"
	EnvGitLabCI           = "GitLab CI"
	EnvJenkins            = "Jenkins"
	EnvAwsCodeBuild       = "AWS CodeBuild"
	EnvGoogleCloudBuild   = "Google Cloud Build"
	EnvTeamCity           = "TeamCity"
	EnvJetBrainsSpace     = "JetBrains Space"
	EnvCodespaces         = "GitHub Codespaces"

	EnvModifierAzureSpace = "Azure App Spaces Portal"
)

All possible enumerations of ExecutionEnvironmentKey

Environments are mutually exclusive. Modifiers can be set additionally to signal different types of usages. An execution environment is formatted as follows: `<environment>[;<modifier1>;<modifier2>...]`

View Source
const (
	// A user.
	AccountTypeUser = "User"
	// A service principal, typically an application.
	AccountTypeServicePrincipal = "Service Principal"
)

All possible enumerations of AccountTypeKey

View Source
const ServiceNameAzd = "azd"

The value used for ServiceNameKey

Variables

View Source
var (
	// Application name. Value is always "azd".
	ServiceNameKey = AttributeKey{
		Key: semconv.ServiceNameKey,
	}

	// Application version.
	ServiceVersionKey = AttributeKey{
		Key: semconv.ServiceVersionKey,
	}

	// The operating system type.
	OSTypeKey = AttributeKey{
		Key: semconv.OSTypeKey,
	}

	// The operating system version.
	//
	// Examples:
	//   - On Windows systems: The Windows version 10.x.x
	//   - On Unix-based systems: The release portion of uname. https://en.wikipedia.org/wiki/Uname#Examples
	//   - On MacOS: The MacOS version. For example: 12.5.1 for macOS Monterey
	OSVersionKey = AttributeKey{
		Key:            semconv.OSVersionKey,
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// The CPU architecture the host system is running on.
	HostArchKey = AttributeKey{
		Key:            semconv.HostArchKey,
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// The version of the runtime of this process, as returned by the runtime without
	// modification.
	ProcessRuntimeVersionKey = AttributeKey{
		Key:            semconv.ProcessRuntimeVersionKey,
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// A unique ID associated to the machine the application is installed on.
	//
	// This shares implementation with VSCode's machineId and can match exactly on a given device, although there are no
	// guarantees.
	MachineIdKey = AttributeKey{
		Key:            attribute.Key("machine.id"),
		Classification: EndUserPseudonymizedInformation,
		Endpoint:       "MacAddressHash",
		Purpose:        BusinessInsight,
	}

	// The unique DevDeviceId associated with the device.
	DevDeviceIdKey = AttributeKey{
		Key:            attribute.Key("machine.devdeviceid"),
		Classification: EndUserPseudonymizedInformation,
		Endpoint:       "SQMUserId",
		Purpose:        BusinessInsight,
	}

	// An enumeration of possible environments that the application is running on.
	//
	// Example: Desktop, Azure Pipelines, Visual Studio.
	//
	// See EnvDesktop for complete set of values.
	ExecutionEnvironmentKey = AttributeKey{
		Key:            attribute.Key("execution.environment"),
		Classification: SystemMetadata,
		Purpose:        BusinessInsight,
	}

	// Installer used to install the application. Set in .installed-by.txt file
	// located in the same folder as the executable.
	//
	// Example: "msi", "brew", "choco", "rpm", "deb"
	InstalledByKey = AttributeKey{
		Key:            attribute.Key("service.installer"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Application-level fields. Guaranteed to be set and available for all events.

View Source
var (
	// Object ID of the principal.
	ObjectIdKey = attribute.Key(contracts.UserAuthUserId) // user_AuthenticatedId
	// Tenant ID of the principal.
	TenantIdKey = AttributeKey{
		Key:            attribute.Key("ad.tenant.id"),
		Classification: SystemMetadata,
		Purpose:        BusinessInsight,
	}
	// The type of account. See AccountTypeUser for all possible options.
	AccountTypeKey = AttributeKey{
		Key:            attribute.Key("ad.account.type"),
		Classification: SystemMetadata,
		Purpose:        BusinessInsight,
	}
	// Currently selected Subscription ID.
	SubscriptionIdKey = AttributeKey{
		Key:            attribute.Key("ad.subscription.id"),
		Classification: OrganizationalIdentifiableInformation,
		Purpose:        PerformanceAndHealth,
		Endpoint:       "AzureSubscriptionId",
	}
)

Context level fields. Availability depends on the command running.

View Source
var (
	// Hashed template ID metadata
	ProjectTemplateIdKey = AttributeKey{
		Key:            attribute.Key("project.template.id"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// Hashed template.version metadata
	ProjectTemplateVersionKey = AttributeKey{
		Key:            attribute.Key("project.template.version"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// Hashed project name. Could be used as an indicator for number of different azd projects.
	ProjectNameKey = AttributeKey{
		Key:            attribute.Key("project.name"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The collection of hashed service hosts in the project.
	ProjectServiceHostsKey = AttributeKey{
		Key:            attribute.Key("project.service.hosts"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The collection of service targets (resolved service hosts) in the project.
	ProjectServiceTargetsKey = AttributeKey{
		Key:            attribute.Key("project.service.targets"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The collection of hashed service languages in the project.
	ProjectServiceLanguagesKey = AttributeKey{
		Key:            attribute.Key("project.service.languages"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The service language being executed.
	ProjectServiceLanguageKey = AttributeKey{
		Key:            attribute.Key("project.service.language"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}
)

Project (azure.yaml) related attributes

View Source
var (
	// Flags set by the user. Only parsed flag names are available. Values are not recorded.
	CmdFlags = AttributeKey{
		Key:            attribute.Key("cmd.flags"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// Number of positional arguments set.
	CmdArgsCount = AttributeKey{
		Key:            attribute.Key("cmd.args.count"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
	// The command invocation entrypoint.
	//
	// The command invocation is formatted using [events.GetCommandEventName]. This makes it consistent with how
	// commands are represented in telemetry.
	CmdEntry = AttributeKey{
		Key:            attribute.Key("cmd.entry"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Command entry-point attributes

View Source
var (
	// The name of the hook being run.
	HooksNameKey = AttributeKey{
		Key:            attribute.Key("hooks.name"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The type of the hook (project or service).
	HooksTypeKey = AttributeKey{
		Key:            attribute.Key("hooks.type"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Hooks command related fields

View Source
var (
	// The pipeline provider being configured.
	//
	// Example: "github", "azdo"
	PipelineProviderKey = AttributeKey{
		Key:            attribute.Key("pipeline.provider"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The authentication type used for pipeline configuration.
	PipelineAuthKey = AttributeKey{
		Key:            attribute.Key("pipeline.auth"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Pipeline command related fields

View Source
var (
	// Error category that classifies an error.
	ErrCategory = AttributeKey{
		Key:            attribute.Key("error.category"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// Error code that describes an error.
	ErrCode = AttributeKey{
		Key:            attribute.Key("error.code"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// Error type.
	ErrType = AttributeKey{
		Key:            attribute.Key("error.type"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// Inner error.
	ErrInner = AttributeKey{
		Key:            attribute.Key("error.inner"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// The frame of the error.
	ErrFrame = AttributeKey{
		Key:            attribute.Key("error.frame"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}
)

Error related fields

View Source
var (
	// Hostname of the service.
	// The list of allowed values can be found in [Domains].
	ServiceHost = AttributeKey{
		Key:            attribute.Key("service.host"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// Name of the service.
	ServiceName = AttributeKey{
		Key:            attribute.Key("service.name"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// Status code of a response returned by the service.
	// For HTTP, this corresponds to the HTTP status code.
	ServiceStatusCode = AttributeKey{
		Key:            attribute.Key("service.statusCode"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}

	// Method of a request to the service.
	// For HTTP, this corresponds to the HTTP method of the request made.
	ServiceMethod = AttributeKey{
		Key:            attribute.Key("service.method"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// An error code returned by the service in a response.
	// For HTTP, the error code can be found in the response header or body.
	ServiceErrorCode = AttributeKey{
		Key:            attribute.Key("service.errorCode"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}

	// Correlation ID for a request to the service.
	ServiceCorrelationId = AttributeKey{
		Key:            attribute.Key("service.correlationId"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}
)

Service related fields.

View Source
var (
	// The name of the tool.
	ToolName = AttributeKey{
		Key:            attribute.Key("tool.name"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// The exit code of the tool after invocation.
	ToolExitCode = AttributeKey{
		Key:            attribute.Key("tool.exitCode"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}
)

Tool related fields

View Source
var (
	// The builder image used. Hashed when a user-defined image is used.
	PackBuilderImage = AttributeKey{
		Key:            attribute.Key("pack.builder.image"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}

	// The tag of the builder image used. Hashed when a user-defined image is used.
	PackBuilderTag = AttributeKey{
		Key:            attribute.Key("pack.builder.tag"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Pack related fields

View Source
var (
	// The name of the MCP client.
	McpClientName = AttributeKey{
		Key:            attribute.Key("mcp.client.name"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}

	// The version of the MCP client.
	McpClientVersion = AttributeKey{
		Key:            attribute.Key("mcp.client.version"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Mcp related fields

View Source
var (
	InitMethod = AttributeKey{
		Key:            attribute.Key("init.method"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}

	AppInitDetectedDatabase = AttributeKey{
		Key:            attribute.Key("appinit.detected.databases"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	AppInitDetectedServices = AttributeKey{
		Key:            attribute.Key("appinit.detected.services"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}

	AppInitConfirmedDatabases = AttributeKey{
		Key:            attribute.Key("appinit.confirmed.databases"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	AppInitConfirmedServices = AttributeKey{
		Key:            attribute.Key("appinit.confirmed.services"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}

	AppInitModifyAddCount = AttributeKey{
		Key:            attribute.Key("appinit.modify_add.count"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
	AppInitModifyRemoveCount = AttributeKey{
		Key:            attribute.Key("appinit.modify_remove.count"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}

	// The last step recorded during the app init process.
	AppInitLastStep = AttributeKey{
		Key:            attribute.Key("appinit.lastStep"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Initialization from app related fields

View Source
var (
	// Logical name of the method from the RPC interface
	// perspective, which can be different from the name of any implementing
	// method/function. See semconv.RPCMethodKey.
	RpcMethod = AttributeKey{
		Key:            semconv.RPCMethodKey,
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// `id` property of JSON-RPC request or response.
	JsonRpcId = AttributeKey{
		Key:            semconv.JSONRPCRequestIDKey,
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
	}

	// `error_code` property of JSON-RPC request or response. Type: int.
	JsonRpcErrorCode = AttributeKey{
		Key:            attribute.Key("rpc.jsonrpc.error_code"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}
)

JSON-RPC related fields

View Source
var (
	// The identifier of the extension.
	ExtensionId = AttributeKey{
		Key:            attribute.Key("extension.id"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The version of the extension.
	ExtensionVersion = AttributeKey{
		Key:            attribute.Key("extension.version"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// The list of installed extensions, each formatted as "id@version".
	ExtensionsInstalled = AttributeKey{
		Key:            attribute.Key("extension.installed"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Extension related fields

View Source
var (
	// UpdateChannel is the update channel (stable, daily).
	UpdateChannel = AttributeKey{
		Key:            attribute.Key("update.channel"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// UpdateInstallMethod is the install method (brew, winget, choco, script, etc.).
	UpdateInstallMethod = AttributeKey{
		Key:            attribute.Key("update.installMethod"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// UpdateFromVersion is the version before the update.
	UpdateFromVersion = AttributeKey{
		Key:            attribute.Key("update.fromVersion"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// UpdateToVersion is the target version for the update.
	UpdateToVersion = AttributeKey{
		Key:            attribute.Key("update.toVersion"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// UpdateResult is the outcome of the update operation.
	UpdateResult = AttributeKey{
		Key:            attribute.Key("update.result"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Update related fields

View Source
var (
	// CopilotSessionId is the session ID for correlation across messages.
	CopilotSessionId = AttributeKey{
		Key:            attribute.Key("copilot.session.id"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotSessionIsNew indicates whether this was a new session (true) or resumed (false).
	CopilotSessionIsNew = AttributeKey{
		Key:            attribute.Key("copilot.session.isNew"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotSessionMessageCount is the number of messages sent in the session.
	CopilotSessionMessageCount = AttributeKey{
		Key:            attribute.Key("copilot.session.messageCount"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
)

Copilot agent session related fields

View Source
var (
	// CopilotInitIsFirstRun indicates whether this was the user's first agent initialization.
	CopilotInitIsFirstRun = AttributeKey{
		Key:            attribute.Key("copilot.init.isFirstRun"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotInitReasoningEffort is the reasoning level selected (low/medium/high).
	CopilotInitReasoningEffort = AttributeKey{
		Key:            attribute.Key("copilot.init.reasoningEffort"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotInitModel is the model ID selected (empty string = default).
	CopilotInitModel = AttributeKey{
		Key:            attribute.Key("copilot.init.model"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotInitConsentScope is the workflow consent scope chosen (session/project/global).
	CopilotInitConsentScope = AttributeKey{
		Key:            attribute.Key("copilot.init.consentScope"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Copilot agent initialization related fields

View Source
var (
	// CopilotMode is the agent operating mode (interactive/autopilot/plan).
	CopilotMode = AttributeKey{
		Key:            attribute.Key("copilot.mode"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotMessageModel is the model used for a specific message.
	CopilotMessageModel = AttributeKey{
		Key:            attribute.Key("copilot.message.model"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
	// CopilotMessageInputTokens is the number of input tokens consumed per message.
	CopilotMessageInputTokens = AttributeKey{
		Key:            attribute.Key("copilot.message.inputTokens"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}
	// CopilotMessageOutputTokens is the number of output tokens consumed per message.
	CopilotMessageOutputTokens = AttributeKey{
		Key:            attribute.Key("copilot.message.outputTokens"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}
	// CopilotMessageBillingRate is the billing rate multiplier per message.
	CopilotMessageBillingRate = AttributeKey{
		Key:            attribute.Key("copilot.message.billingRate"),
		Classification: SystemMetadata,
		Purpose:        BusinessInsight,
		IsMeasurement:  true,
	}
	// CopilotMessagePremiumRequests is the number of premium requests used per message.
	CopilotMessagePremiumRequests = AttributeKey{
		Key:            attribute.Key("copilot.message.premiumRequests"),
		Classification: SystemMetadata,
		Purpose:        BusinessInsight,
		IsMeasurement:  true,
	}
	// CopilotMessageDurationMs is the API call duration in milliseconds per message.
	CopilotMessageDurationMs = AttributeKey{
		Key:            attribute.Key("copilot.message.durationMs"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}
)

Copilot agent mode and message related fields

View Source
var (
	// CopilotConsentApprovedCount is the running count of tool calls approved during the session.
	CopilotConsentApprovedCount = AttributeKey{
		Key:            attribute.Key("copilot.consent.approvedCount"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
	// CopilotConsentDeniedCount is the running count of tool calls denied during the session.
	CopilotConsentDeniedCount = AttributeKey{
		Key:            attribute.Key("copilot.consent.deniedCount"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
)

Copilot consent related fields

View Source
var (
	// Number of auto-fix.attempts
	AgentFixAttempts = AttributeKey{
		Key:            attribute.Key("agent.fix.attempts"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Agent-troubleshooting related fields

View Source
var (
	// The authentication method used for login.
	//
	// Example: "browser", "device-code", "service-principal-secret", "managed-identity"
	AuthMethodKey = AttributeKey{
		Key:            attribute.Key("auth.method"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Auth command related fields

View Source
var Domains = []Domain{

	{"dev.azure.com", "azdo"},
	{"management.azure.com", "arm"},
	{"management.core.windows.net", "arm"},
	{"graph.microsoft.com", "graph"},
	{"graph.windows.net", "graph"},
	{"azmk8s.io", "aks"},
	{"azure-api.net", "apim"},
	{"azure-mobile.net", "mobile"},
	{"azurecontainerapps.io", "aca"},
	{"azurecr.io", "acr"},
	{"azureedge.net", "edge"},
	{"azurefd.net", "frontdoor"},
	{"scm.azurewebsites.net", "kudu"},
	{"azurewebsites.net", "websites"},
	{"services.ai.azure.com", "ai"},
	{"cognitiveservices.azure.com", "cognitiveservices"},
	{"openai.azure.com", "openai"},
	{"blob.core.windows.net", "blob"},
	{"cloudapp.azure.com", "vm"},
	{"cloudapp.net", "vm"},
	{"cosmos.azure.com", "cosmos"},
	{"database.windows.net", "sql"},
	{"documents.azure.com", "cosmos"},
	{"file.core.windows.net", "files"},
	{"origin.mediaservices.windows.net", "media"},
	{"queue.core.windows.net", "queue"},
	{"servicebus.windows.net", "servicebus"},
	{"table.core.windows.net", "table"},
	{"trafficmanager.net", "trafficmanager"},
	{"vault.azure.net", "keyvault"},
	{"visualstudio.com", "vs"},
	{"vo.msecnd.net", "cdn"},
}

Well-known domains. Domains can also be subdomains, thus should be evaluated as such.

Taken from https://learn.microsoft.com/azure/security/fundamentals/azure-domains.

View Source
var (
	// The number of environments that exist for the current project.
	EnvCountKey = AttributeKey{
		Key:            attribute.Key("env.count"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
)

Environment command related fields

View Source
var (
	// Hashed environment name
	EnvNameKey = AttributeKey{
		Key:            attribute.Key("env.name"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Environment related attributes

View Source
var (
	// The assignment context as returned by the experimentation platform.
	ExpAssignmentContextKey = AttributeKey{
		Key:            attribute.Key("exp.assignmentContext"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Fields related to the experimentation platform

View Source
var (
	// Tracks features associated to the current event.
	FeaturesKey = AttributeKey{
		Key:            attribute.Key("config.features"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Machine-level configuration related attribute.

View Source
var (
	// The IaC provider used for infrastructure generation.
	//
	// Example: "bicep", "terraform"
	InfraProviderKey = AttributeKey{
		Key:            attribute.Key("infra.provider"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Infrastructure command related fields

View Source
var (
	// The time spent waiting on user interaction in milliseconds.
	PerfInteractTime = AttributeKey{
		Key:            attribute.Key("perf.interact_time"),
		Classification: SystemMetadata,
		Purpose:        PerformanceAndHealth,
		IsMeasurement:  true,
	}
)

Performance related fields

View Source
var (
	PlatformTypeKey = AttributeKey{
		Key:            attribute.Key("platform.type"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
	}
)

Platform related attributes for integrations like devcenter / ADE

View Source
var (
	RemoteBuildCount = AttributeKey{
		Key:            attribute.Key("container.remoteBuild.count"),
		Classification: SystemMetadata,
		Purpose:        FeatureInsight,
		IsMeasurement:  true,
	}
)

Remote docker build related fields

Functions

func CaseInsensitiveHash

func CaseInsensitiveHash(value string) string

func CaseInsensitiveSliceHash

func CaseInsensitiveSliceHash(value []string) []string

func ErrorKey

func ErrorKey(k attribute.Key) attribute.Key

ErrorKey returns a new Key with "error." prefix prepended. Keys that already have the "error." prefix are returned as-is.

func Sha256Hash

func Sha256Hash(val string) string

Sha256Hash returns the hex-encoded Sha256 hash of the given string.

func StringHashed

func StringHashed(k AttributeKey, v string) attribute.KeyValue

func StringSliceHashed

func StringSliceHashed(k AttributeKey, v []string) attribute.KeyValue

Types

type AttributeKey

type AttributeKey struct {
	attribute.Key
	Classification Classification
	Purpose        Purpose
	Endpoint       string
	IsMeasurement  bool
}

AttributeKey represents an attribute key with additional metadata.

type Classification

type Classification string
const (
	PublicPersonalData                    Classification = "PublicPersonalData"
	SystemMetadata                        Classification = "SystemMetadata"
	CallstackOrException                  Classification = "CallstackOrException"
	CustomerContent                       Classification = "CustomerContent"
	EndUserPseudonymizedInformation       Classification = "EndUserPseudonymizedInformation"
	OrganizationalIdentifiableInformation Classification = "OrganizationalIdentifiableInformation"
)

type Domain

type Domain struct {
	// The domain name.
	Name string
	// The name of the service that is responsible for the domain name.
	Service string
}

type Purpose

type Purpose string
const (
	FeatureInsight       Purpose = "FeatureInsight"
	BusinessInsight      Purpose = "BusinessInsight"
	PerformanceAndHealth Purpose = "PerformanceAndHealth"
)

Jump to

Keyboard shortcuts

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