Documentation
¶
Index ¶
- Constants
- Variables
- func MustCSMClientAccessTimeline(ctx context.Context, clusterName string, podNamespace string, podName string) *khifilev6.TimelinePath
- func MustCSMServerAccessTimeline(ctx context.Context, clusterName string, podNamespace string, podName string, ...) *khifilev6.TimelinePath
- func MustCSMServiceClientAccessTimeline(ctx context.Context, clusterName string, serviceNamespace string, ...) *khifilev6.TimelinePath
- func MustCSMServiceServerAccessTimeline(ctx context.Context, clusterName string, serviceNamespace string, ...) *khifilev6.TimelinePath
- type AccessLogType
- type IstioAccessLogFieldSet
- type IstioAccessLogFieldSetReader
- type ResponseFlag
Constants ¶
const ( ResponseFlagNoError ResponseFlag = "-" ResponseFlagNoHealthyUpstream = "UH" ResponseFlagUpstreamConnectionFailure = "UF" ResponseFlagUpstreamOverflow = "UO" ResponseFlagNoRouteFound = "NR" ResponseFlagUpstreamRetryLimitExceeded = "URX" ResponseFlagNoClusterFound = "NC" ResponseFlagDurationTimeout = "DT" // HTTP only ResponseFlagDownstreamConnectionTermination = "DC" ResponseFlagFailedLocalHealthCheck = "LH" ResponseFlagUpstreamRequestTimeout = "UT" ResponseFlagLocalReset = "LR" ResponseFlagUpstreamRemoteReset = "UR" ResponseFlagUpstreamConnectionTermination = "UC" ResponseFlagDelayInjected = "DI" ResponseFlagFaultInjected = "FI" ResponseFlagRateLimited = "RL" ResponseFlagRateLimitServiceError = "RLSE" ResponseFlagInvalidEnvoyRequestHeaders = "IH" ResponseFlagStreamIdleTimeout = "SI" ResponseFlagDownstreamProtocolError = "DPE" ResponseFlagUpstreamProtocolError = "UPE" ResponseFlagUpstreamMaxStreamDurationReached = "UMSDR" ResponseFlagResponseFromCacheFilter = "RFCF" ResponseFlagNoFilterConfigFound = "NFCF" ResponseFlagOverloadManagerTerminated = "OM" ResponseFlagDnsResolutionFailed = "DF" ResponseFlagDropOverload = "DO" ResponseFlagDownstreamRemoteReset = "DR" ResponseFlagUnconditionalDropOverload = "UDO" ResponseFlagInvalid = "INVALID" )
const TaskIDPrefix = "cloud.google.com/log/csm-accesslog/"
Variables ¶
var CSMClusterIdentifierTaskID = taskid.NewDefaultImplementationID[[]string](TaskIDPrefix + "cluster-identifier")
CSMClusterIdentifierTaskID is the task ID for the unique cluster identifier(s) extracted from BackendService names.
var CSMTrafficDirectorFieldSetReaderTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "traffic-director/fieldset-reader")
CSMTrafficDirectorFieldSetReaderTaskID is the task ID to read the CSM Traffic Director related fieldset.
var CSMTrafficDirectorLogGrouperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "traffic-director/grouper")
CSMTrafficDirectorLogGrouperTaskID is the task ID to group CSM Traffic Director logs.
var CSMTrafficDirectorLogIngesterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "traffic-director/log-ingester")
CSMTrafficDirectorLogIngesterTaskID is the task ID to finalize the CSM Traffic Director logs.
var CSMTrafficDirectorLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.TimelineMapperResult](TaskIDPrefix + "traffic-director/timeline-mapper")
CSMTrafficDirectorLogToTimelineMapperTaskID is the task ID for associating CSM Traffic Director logs with resource timelines.
var ClusterIdentityTaskID = taskid.NewDefaultImplementationID[googlecloudk8scommon_contract.GoogleCloudClusterIdentity](TaskIDPrefix + "cluster-identity")
ClusterIdentityTaskID is the task id for aliasing the cluster identity.
var FieldSetReaderTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "fieldset-reader")
FieldSetReaderTaskID is the task id to read the CSM related fieldset for processing the log in the later task.
var HumanReadableErrorMessage map[ResponseFlag]string = map[ResponseFlag]string{ ResponseFlagNoError: "OK", ResponseFlagNoHealthyUpstream: "No healthy upstream", ResponseFlagUpstreamConnectionFailure: "Upstream connection failure", ResponseFlagUpstreamOverflow: "Upstream overflow", ResponseFlagNoRouteFound: "No route found", ResponseFlagUpstreamRetryLimitExceeded: "Upstream retry limit exceeded", ResponseFlagNoClusterFound: "No cluster found", ResponseFlagDurationTimeout: "Duration timeout", ResponseFlagDownstreamConnectionTermination: "Downstream connection termination", ResponseFlagFailedLocalHealthCheck: "Failed local health check", ResponseFlagUpstreamRequestTimeout: "Upstream request timeout", ResponseFlagLocalReset: "Local reset", ResponseFlagUpstreamRemoteReset: "Upstream remote reset", ResponseFlagUpstreamConnectionTermination: "Upstream connection termination", ResponseFlagDelayInjected: "Delay injected", ResponseFlagFaultInjected: "Fault injected", ResponseFlagRateLimited: "Rate limited", ResponseFlagUnauthorizedExternalService: "Unauthorized external service", ResponseFlagRateLimitServiceError: "Rate limit service error", ResponseFlagInvalidEnvoyRequestHeaders: "Invalid Envoy request headers", ResponseFlagStreamIdleTimeout: "Stream idle timeout", ResponseFlagDownstreamProtocolError: "Downstream protocol error", ResponseFlagUpstreamProtocolError: "Upstream protocol error", ResponseFlagUpstreamMaxStreamDurationReached: "Upstream max stream duration reached", ResponseFlagResponseFromCacheFilter: "Response from cache filter", ResponseFlagNoFilterConfigFound: "No filter config found", ResponseFlagOverloadManagerTerminated: "Overload manager terminated", ResponseFlagDnsResolutionFailed: "DNS resolution failed", ResponseFlagDropOverload: "Drop overload", ResponseFlagDownstreamRemoteReset: "Downstream remote reset", ResponseFlagUnconditionalDropOverload: "Unconditional drop overload", ResponseFlagInvalid: "Unknown response flag", }
var InputCSMResponseFlagsTaskID = taskid.NewDefaultImplementationID[*gcpqueryutil.SetFilterParseResult](TaskIDPrefix + "input/response-flags")
InputCSMResponseFlagsTaskID is the task ID for the form input that specifies which Envoy response flags to filter CSM access logs by.
var InputFleetProjectIDTaskID = taskid.NewDefaultImplementationID[string](TaskIDPrefix + "input/fleet-project-id")
InputFleetProjectIDTaskID is the task ID for the form input that specifies the Fleet Project ID where CSM control plane logs are stored.
var ListCSMTrafficDirectorLogEntriesTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "list-traffic-director-log-entries")
ListCSMTrafficDirectorLogEntriesTaskID is the task ID for the task that queries CSM Traffic Director logs from Cloud Logging.
var ListLogEntriesTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "list-log-entries")
ListLogEntriesTaskID is the task ID for the task that queries CSM access logs from Cloud Logging.
var LogGrouperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "grouper")
LogGrouperTaskID is the task ID to group CSM access logs by their reporter pod for parallel processing.
var LogIngesterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "log-ingester")
LogIngesterTaskID is the task id to finalize the logs to be included in the final output.
var LogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.TimelineMapperResult](TaskIDPrefix + "timeline-mapper")
LogToTimelineMapperTaskID is the task ID for associating CSM access log events with resource timelines.
var (
LogTypeCSMAccessLog = style.MustRegisterLogType("CSM access", "Cloud Service Mesh Access Logs", style.MustForceConvertSRGBHex("#FF8500"), style.ColorWhite)
)
The following block defines the registered timeline style LogTypes. These are registered as package-level variables so they are initialized immediately when this package is imported.
var ( TimelineTypeCSMAccessLog = style.MustRegisterTimelineType( "csm", "CSM Access logs related to this resource", "shuffle", 0.6, style.ColorWhite, style.ColorBlack, style.MustForceConvertSRGBHex("#FF8500"), style.ColorWhite, true, 5001, style.AlphabeticalSortPolicy(), ) )
The following block defines the registered timeline style TimelineTypes. These are registered as package-level variables so they are initialized immediately when this package is imported.
Functions ¶
func MustCSMClientAccessTimeline ¶ added in v0.56.0
func MustCSMClientAccessTimeline(ctx context.Context, clusterName string, podNamespace string, podName string) *khifilev6.TimelinePath
MustCSMClientAccessTimeline returns the timeline path for CSM Client Access under a Pod.
func MustCSMServerAccessTimeline ¶ added in v0.56.0
func MustCSMServerAccessTimeline(ctx context.Context, clusterName string, podNamespace string, podName string, containerName string) *khifilev6.TimelinePath
MustCSMServerAccessTimeline returns the timeline path for CSM Server Access under a Pod.
func MustCSMServiceClientAccessTimeline ¶ added in v0.56.0
func MustCSMServiceClientAccessTimeline(ctx context.Context, clusterName string, serviceNamespace string, serviceName string) *khifilev6.TimelinePath
MustCSMServiceClientAccessTimeline returns the timeline path for CSM Service Client Access.
func MustCSMServiceServerAccessTimeline ¶ added in v0.56.0
func MustCSMServiceServerAccessTimeline(ctx context.Context, clusterName string, serviceNamespace string, serviceName string) *khifilev6.TimelinePath
MustCSMServiceServerAccessTimeline returns the timeline path for CSM Service Server Access.
Types ¶
type AccessLogType ¶
type AccessLogType string
const ( AccessLogTypeClient AccessLogType = "client" AccessLogTypeServer AccessLogType = "server" )
type IstioAccessLogFieldSet ¶
type IstioAccessLogFieldSet struct {
Type AccessLogType
ResponseFlag ResponseFlag
SourceNamespace string
SourceName string
DestinationNamespace string
DestinationName string
DestinationServiceName string
DestinationServiceNamespace string
ReporterPodName string
ReporterPodNamespace string
ReporterContainerName string
}
func (*IstioAccessLogFieldSet) Kind ¶
func (i *IstioAccessLogFieldSet) Kind() string
Kind implements log.FieldSet.
func (*IstioAccessLogFieldSet) ResponseFlagMessage ¶
func (i *IstioAccessLogFieldSet) ResponseFlagMessage() string
ResponseFlagMessage returns a human readable message describing response flag.
type IstioAccessLogFieldSetReader ¶
type IstioAccessLogFieldSetReader struct{}
func (*IstioAccessLogFieldSetReader) FieldSetKind ¶
func (i *IstioAccessLogFieldSetReader) FieldSetKind() string
FieldSetKind implements log.FieldSetReader.
func (*IstioAccessLogFieldSetReader) Read ¶
func (i *IstioAccessLogFieldSetReader) Read(reader *structured.NodeReader) (log.FieldSet, error)
Read implements log.FieldSetReader.
type ResponseFlag ¶
type ResponseFlag string