Documentation
      ¶
    
    
  
    
  
    Overview ¶
Copyright Microsoft. All rights reserved.
Copyright Microsoft. All rights reserved.
Index ¶
- Constants
 - func Close()
 - func Debugf(format string, args ...any)
 - func Errorf(format string, args ...any)
 - func InitAI(aiConfig aitelemetry.AIConfig, ...)
 - func InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, ...)
 - func InitLogger(fileName string, logLevel, logTarget int, logDir string)
 - func LogEvent(event aitelemetry.Event)
 - func Printf(format string, args ...any)
 - func Request(tag string, request any, err error)
 - func Response(tag string, response any, returnCode types.ResponseCode, err error)
 - func ResponseEx(tag string, request, response any, returnCode types.ResponseCode, err error)
 - func SendHeartBeat(ctx context.Context, heartbeatIntervalInMins int)
 - func SendMetric(metric aitelemetry.Metric)
 - func SetContextDetails(orchestrator, nodeID string)
 - func Warnf(format string, args ...any)
 - type CNSLogger
 - func (c *CNSLogger) Close()
 - func (c *CNSLogger) Debugf(format string, args ...any)
 - func (c *CNSLogger) Errorf(format string, args ...any)
 - func (c *CNSLogger) InitAI(aiConfig aitelemetry.AIConfig, ...)
 - func (c *CNSLogger) InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, ...)
 - func (c *CNSLogger) LogEvent(event aitelemetry.Event)
 - func (c *CNSLogger) Printf(format string, args ...any)
 - func (c *CNSLogger) Request(tag string, request any, err error)
 - func (c *CNSLogger) Response(tag string, response any, returnCode types.ResponseCode, err error)
 - func (c *CNSLogger) ResponseEx(tag string, request, response any, returnCode types.ResponseCode, err error)
 - func (c *CNSLogger) SendMetric(metric aitelemetry.Metric)
 - func (c *CNSLogger) SetContextDetails(orchestrator, nodeID string)
 - func (c *CNSLogger) Warnf(format string, args ...any)
 
Constants ¶
      View Source
      
  
const ( // Metrics HeartBeatMetricStr = "HeartBeat" // Dimensions OrchestratorTypeStr = "OrchestratorType" NodeIDStr = "NodeID" // CNS Snspshot properties CnsNCSnapshotEventStr = "CNSNCSnapshot" IpConfigurationStr = "IPConfiguration" LocalIPConfigurationStr = "LocalIPConfiguration" PrimaryInterfaceIdentifierStr = "PrimaryInterfaceIdentifier" MultiTenancyInfoStr = "MultiTenancyInfo" CnetAddressSpaceStr = "CnetAddressSpace" AllowNCToHostCommunicationStr = "AllowNCToHostCommunication" AllowHostToNCCommunicationStr = "AllowHostToNCCommunication" NetworkContainerTypeStr = "NetworkContainerType" OrchestratorContextStr = "OrchestratorContext" )
Variables ¶
This section is empty.
Functions ¶
func InitAI ¶
func InitAI(aiConfig aitelemetry.AIConfig, disableTraceLogging, disableMetricLogging, disableEventLogging bool)
func InitAIWithIKey ¶
func InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, disableTraceLogging, disableMetricLogging, disableEventLogging bool)
func InitLogger ¶
func LogEvent ¶
func LogEvent(event aitelemetry.Event)
func ResponseEx ¶
func ResponseEx(tag string, request, response any, returnCode types.ResponseCode, err error)
func SendHeartBeat ¶
func SendMetric ¶
func SendMetric(metric aitelemetry.Metric)
func SetContextDetails ¶
func SetContextDetails(orchestrator, nodeID string)
Types ¶
type CNSLogger ¶
type CNSLogger struct {
	DisableTraceLogging  bool
	DisableMetricLogging bool
	DisableEventLogging  bool
	Orchestrator string
	NodeID       string
	// contains filtered or unexported fields
}
    var (
	Log *CNSLogger
)
    func NewCNSLogger ¶
func (*CNSLogger) InitAI ¶
func (c *CNSLogger) InitAI(aiConfig aitelemetry.AIConfig, disableTraceLogging, disableMetricLogging, disableEventLogging bool)
func (*CNSLogger) InitAIWithIKey ¶
func (c *CNSLogger) InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, disableTraceLogging, disableMetricLogging, disableEventLogging bool)
func (*CNSLogger) LogEvent ¶
func (c *CNSLogger) LogEvent(event aitelemetry.Event)
func (*CNSLogger) ResponseEx ¶
func (*CNSLogger) SendMetric ¶
func (c *CNSLogger) SendMetric(metric aitelemetry.Metric)
func (*CNSLogger) SetContextDetails ¶
 Click to show internal directories. 
   Click to hide internal directories.