Documentation ¶
Index ¶
- Variables
- func AddConfigLinks(frame data.Frame, dl string, title *string) data.Frame
- func AddCustomDataLink(frame data.Frame, dataLink data.DataLink) data.Frame
- func GetAzurePortalUrl(azureCloud string) (string, error)
- func ResponseTableToFrame(table *types.AzureResponseTable, refID string, executedQuery string, ...) (*data.Frame, error)
- type AzureCorrelationAPIResponse
- type AzureCorrelationAPIResponseProperties
- type AzureLogAnalyticsAPIError
- type AzureLogAnalyticsAPIErrorBase
- type AzureLogAnalyticsDatasource
- type AzureLogAnalyticsInnerError
- type AzureLogAnalyticsQuery
- type AzureLogAnalyticsResponse
- type AzureLogAnalyticsURLResource
- type AzureLogAnalyticsURLResources
- type KeyValue
- type LogAnalyticsMeta
Constants ¶
This section is empty.
Variables ¶
var AttributesOmit = map[string]string{"operationId": "operationId", "duration": "duration", "id": "id", "name": "name", "problemId": "problemId", "operation_ParentId": "operation_ParentId", "timestamp": "timestamp", "customDimensions": "customDimensions", "operation_Name": "operation_Name"}
AttributesOmit - Properties to omit when generating the attributes bag
var AvailabilityResultsSchema = copyCommonProperties(map[string]string{
"location": "Location",
"message": "Message",
"size": "Size",
}, emptyMap)
var CommonProperties = map[string]string{
"appId": "ResourceGUID",
"application_Version": "AppVersion",
"appName": "_ResourceId",
"client_Browser": "ClientBrowser",
"client_City": "ClientCity",
"client_CountryOrRegion": "ClientCountryOrRegion",
"client_IP": "ClientIP",
"client_Model": "ClientModel",
"client_OS": "ClientOS",
"client_StateOrProvince": "ClientStateOrProvince",
"client_Type": "ClientType",
"cloud_RoleInstance": "AppRoleInstance",
"cloud_RoleName": "AppRoleName",
"customDimensions": "Properties",
"customMeasurements": "Measurements",
"duration": "DurationMs",
"id": "Id",
"iKey": "IKey",
"itemCount": "ItemCount",
"itemId": "_ItemId",
"itemType": "Type",
"name": "Name",
"operation_Id": "OperationId",
"operation_Name": "OperationName",
"operation_ParentId": "OperationParentId",
"operation_SyntheticSource": "OperationSyntheticSource",
"performanceBucket": "PerformanceBucket",
"sdkVersion": "SDKVersion",
"session_Id": "SessionId",
"success": "Success",
"timestamp": "TimeGenerated",
"user_AccountId": "UserAccountId",
"user_AuthenticatedId": "UserAuthenticatedId",
"user_Id": "UserId",
}
CommonProperties - common resource centric properties mapped to legacy property names
var DependenciesSchema = copyCommonProperties(map[string]string{
"data": "Data",
"resultCode": "ResultCode",
"target": "Target",
"type": "DependencyType",
}, emptyMap)
var EventsSchema = copyCommonProperties(map[string]string{}, map[string]string{"duration": "duration", "id": "id", "success": "success", "performanceBucket": "performanceBucket"})
var ExceptionsSchema = copyCommonProperties(map[string]string{ "assembly": "Assembly", "details": "Details", "handledAt": "HandledAt", "innermostAssembly": "InnermostAssembly", "innermostMessage": "InnermostMessage", "innermostMethod": "InnermostMethod", "innermostType": "InnermostType", "message": "Message", "method": "Method", "outerAssembly": "OuterAssembly", "outerMessage": "OuterMessage", "outerMethod": "OuterMethod", "outerType": "OuterType", "problemId": "ProblemId", "severityLevel": "SeverityLevel", "type": "ExceptionType", "error": "error", }, map[string]string{"duration": "duration", "id": "id", "name": "name", "performanceBucket": "performanceBucket", "success": "success"})
var PageViewsSchema = copyCommonProperties(map[string]string{"url": "Url"}, map[string]string{"success": "success"})
var RequestsSchema = copyCommonProperties(map[string]string{"resultCode": "ResultCode", "source": "Source", "url": "Url"}, map[string]string{})
var Tables = []string{"availabilityResults", "dependencies", "customEvents", "exceptions", "pageViews", "requests", "traces"}
var TablesSchema = map[string]map[string]string{ "availabilityResults": AvailabilityResultsSchema, "dependencies": DependenciesSchema, "customEvents": EventsSchema, "exceptions": ExceptionsSchema, "pageViews": PageViewsSchema, "requests": RequestsSchema, "traces": TracesSchema, }
var TracesSchema = copyCommonProperties(map[string]string{ "message": "Message", "severityLevel": "SeverityLevel", }, map[string]string{"duration": "duration", "id": "id", "name": "name", "performanceBucket": "performanceBucket", "success": "success"})
Functions ¶
func AddCustomDataLink ¶
func GetAzurePortalUrl ¶
func ResponseTableToFrame ¶
func ResponseTableToFrame(table *types.AzureResponseTable, refID string, executedQuery string, queryType dataquery.AzureQueryType, resultFormat dataquery.ResultFormat) (*data.Frame, error)
ResponseTableToFrame converts an AzureResponseTable to a data.Frame.
Types ¶
type AzureCorrelationAPIResponse ¶
type AzureCorrelationAPIResponse struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Properties AzureCorrelationAPIResponseProperties `json:"properties"` Error *AzureLogAnalyticsAPIError `json:"error,omitempty"` }
type AzureLogAnalyticsAPIError ¶
type AzureLogAnalyticsAPIError struct { Details *[]AzureLogAnalyticsAPIErrorBase `json:"details,omitempty"` Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
Error definition has been inferred from real data and other model definitions like https://github.com/Azure/azure-sdk-for-go/blob/3640559afddbad452d265b54fb1c20b30be0b062/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go
type AzureLogAnalyticsAPIErrorBase ¶
type AzureLogAnalyticsAPIErrorBase struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` Innererror *AzureLogAnalyticsInnerError `json:"innererror,omitempty"` }
type AzureLogAnalyticsDatasource ¶
type AzureLogAnalyticsDatasource struct {
Proxy types.ServiceProxy
}
AzureLogAnalyticsDatasource calls the Azure Log Analytics API's
func (*AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery ¶
func (e *AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery(ctx context.Context, logger log.Logger, originalQueries []backend.DataQuery, dsInfo types.DatasourceInfo, client *http.Client, url string, tracer tracing.Tracer) (*backend.QueryDataResponse, error)
executeTimeSeriesQuery does the following: 1. build the AzureMonitor url and querystring for each query 2. executes each query by calling the Azure Monitor API 3. parses the responses for each query into data frames
func (*AzureLogAnalyticsDatasource) ResourceRequest ¶
func (e *AzureLogAnalyticsDatasource) ResourceRequest(rw http.ResponseWriter, req *http.Request, cli *http.Client)
type AzureLogAnalyticsQuery ¶
type AzureLogAnalyticsQuery struct { RefID string ResultFormat string URL string TraceExploreQuery string TraceParentExploreQuery string TraceLogsExploreQuery string JSON json.RawMessage TimeRange backend.TimeRange Query string Resources []string QueryType string AppInsightsQuery bool IntersectTime bool }
AzureLogAnalyticsQuery is the query request that is built from the saved values for from the UI
type AzureLogAnalyticsResponse ¶
type AzureLogAnalyticsResponse struct { Tables []types.AzureResponseTable `json:"tables"` Error *AzureLogAnalyticsAPIError `json:"error,omitempty"` }
AzureLogAnalyticsResponse is the json response object from the Azure Log Analytics API.
func (*AzureLogAnalyticsResponse) GetPrimaryResultTable ¶
func (ar *AzureLogAnalyticsResponse) GetPrimaryResultTable() (*types.AzureResponseTable, error)
GetPrimaryResultTable returns the first table in the response named "PrimaryResult", or an error if there is no table by that name.
type AzureLogAnalyticsURLResource ¶
type AzureLogAnalyticsURLResource struct {
ResourceID string `json:"resourceId"`
}
type AzureLogAnalyticsURLResources ¶
type AzureLogAnalyticsURLResources struct {
Resources []AzureLogAnalyticsURLResource `json:"resources"`
}
type LogAnalyticsMeta ¶
type LogAnalyticsMeta struct {
ColumnTypes []string `json:"azureColumnTypes"`
}
LogAnalyticsMeta is a type for the a Frame's Meta's Custom property.