googlecloudlogcsm_contract

package
v0.57.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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"
	ResponseFlagUnauthorizedExternalService      = "UAEX"
	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"
)
View Source
const TaskIDPrefix = "cloud.google.com/log/csm-accesslog/"

Variables

View Source
var CSMClusterIdentifierTaskID = taskid.NewDefaultImplementationID[[]string](TaskIDPrefix + "cluster-identifier")

CSMClusterIdentifierTaskID is the task ID for the unique cluster identifier(s) extracted from BackendService names.

View Source
var CSMTrafficDirectorFieldSetReaderTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "traffic-director/fieldset-reader")

CSMTrafficDirectorFieldSetReaderTaskID is the task ID to read the CSM Traffic Director related fieldset.

View Source
var CSMTrafficDirectorLogGrouperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "traffic-director/grouper")

CSMTrafficDirectorLogGrouperTaskID is the task ID to group CSM Traffic Director logs.

View Source
var CSMTrafficDirectorLogIngesterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "traffic-director/log-ingester")

CSMTrafficDirectorLogIngesterTaskID is the task ID to finalize the CSM Traffic Director logs.

View Source
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.

ClusterIdentityTaskID is the task id for aliasing the cluster identity.

View Source
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.

View Source
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",
}
View Source
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.

View Source
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.

View Source
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.

View Source
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.

LogGrouperTaskID is the task ID to group CSM access logs by their reporter pod for parallel processing.

View Source
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.

LogToTimelineMapperTaskID is the task ID for associating CSM access log events with resource timelines.

View Source
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.

View Source
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

Read implements log.FieldSetReader.

type ResponseFlag

type ResponseFlag string

Jump to

Keyboard shortcuts

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