Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- type EntryPoint
- type Event
- type EventBuilder
- type EventGenerator
- type Generator
- func (e *Generator) CreateEvent(logEvent LogEvent, eventTime time.Time, metaData common.MapStr, ...) (beat.Event, error)
- func (e *Generator) CreateEvents(summaryEvent LogEvent, detailEvents []LogEvent, eventTime time.Time, ...) ([]beat.Event, error)
- func (e *Generator) SetUseTrafficForAggregation(useTrafficForAggregation bool)
- type HTTPProtocolBuilder
- type JMSProtocol
- type JMSProtocolBuilder
- type LogEvent
- type Protocol
- type Proxy
- type Runtime
- type Summary
- type SummaryBuilder
- type Team
- type TransportProtocol
- type TxEventStatus
- type TxSummaryStatus
Constants ¶
const SummaryEventApplicationIDPrefix = "remoteAppId_"
SummaryEventApplicationIDPrefix - Prefix for application.ID in summary event
const SummaryEventProxyIDPrefix = "remoteApiId_"
SummaryEventProxyIDPrefix - Prefix for proxyID in summary event
const TypeTransactionEvent = "transactionEvent"
TypeTransactionEvent - Transaction Event type
const TypeTransactionSummary = "transactionSummary"
TypeTransactionSummary - Transaction summary type
Variables ¶
var (
ErrInRedactions = errors.Newf(1550, "error when redacting %v: %v")
)
Transaction errors
Functions ¶
This section is empty.
Types ¶
type Application ¶
Application - Represents the application used in transaction summary event (dataplane)
type EntryPoint ¶
type EntryPoint struct { Type string `json:"type,omitempty"` Method string `json:"method,omitempty"` Path string `json:"path,omitempty"` Host string `json:"host,omitempty"` }
EntryPoint - represents the entry point details for API in summary event
type Event ¶
type Event struct { ID string `json:"id,omitempty"` ParentID string `json:"parentId,omitempty"` Source string `json:"source,omitempty"` Destination string `json:"destination,omitempty"` Duration int `json:"duration"` Direction string `json:"direction,omitempty"` Status string `json:"status,omitempty"` Protocol TransportProtocol `json:"protocol,omitempty"` }
Event - Represents the transaction detail event
type EventBuilder ¶
type EventBuilder interface { SetTimestamp(timestamp int64) EventBuilder SetTransactionID(transactionID string) EventBuilder SetAPICDeployment(apicDeployment string) EventBuilder SetEnvironmentName(environmentName string) EventBuilder SetEnvironmentID(environmentID string) EventBuilder SetTenantID(tenantID string) EventBuilder SetTrcbltPartitionID(trcbltPartitionID string) EventBuilder SetTargetPath(targetPath string) EventBuilder SetResourcePath(resourcePath string) EventBuilder SetID(id string) EventBuilder SetParentID(parentID string) EventBuilder SetSource(source string) EventBuilder SetDestination(destination string) EventBuilder SetDuration(duration int) EventBuilder SetDirection(direction string) EventBuilder SetStatus(status TxEventStatus) EventBuilder SetProtocolDetail(protocolDetail interface{}) EventBuilder SetRedactionConfig(config redaction.Redactions) EventBuilder Build() (*LogEvent, error) }
EventBuilder - Interface to build the log event of type transaction event
func NewTransactionEventBuilder ¶
func NewTransactionEventBuilder() EventBuilder
NewTransactionEventBuilder - Creates a new log event builder
type EventGenerator ¶
type EventGenerator interface { CreateEvent(logEvent LogEvent, eventTime time.Time, metaData common.MapStr, fields common.MapStr, privateData interface{}) (event beat.Event, err error) // DEPRECATED CreateEvents(summaryEvent LogEvent, detailEvents []LogEvent, eventTime time.Time, metaData common.MapStr, fields common.MapStr, privateData interface{}) (events []beat.Event, err error) SetUseTrafficForAggregation(useTrafficForAggregation bool) }
EventGenerator - Create the events to be published to Condor
func NewEventGenerator ¶
func NewEventGenerator() EventGenerator
NewEventGenerator - Create a new event generator
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator - Create the events to be published to Condor
func (*Generator) CreateEvent ¶
func (e *Generator) CreateEvent(logEvent LogEvent, eventTime time.Time, metaData common.MapStr, eventFields common.MapStr, privateData interface{}) (beat.Event, error)
CreateEvent - Creates a new event to be sent to Amplify Observability, expects sampling is handled by agent
func (*Generator) CreateEvents ¶
func (e *Generator) CreateEvents(summaryEvent LogEvent, detailEvents []LogEvent, eventTime time.Time, metaData common.MapStr, eventFields common.MapStr, privateData interface{}) ([]beat.Event, error)
CreateEvents - Creates new events to be sent to Amplify Observability
func (*Generator) SetUseTrafficForAggregation ¶
SetUseTrafficForAggregation - set the flag to use traffic events for aggregation.
type HTTPProtocolBuilder ¶
type HTTPProtocolBuilder interface { SetURI(uri string) HTTPProtocolBuilder SetVersion(version string) HTTPProtocolBuilder SetArgs(args string) HTTPProtocolBuilder SetArgsMap(args map[string][]string) HTTPProtocolBuilder AddArg(key string, value []string) HTTPProtocolBuilder SetMethod(method string) HTTPProtocolBuilder SetStatus(status int, statusText string) HTTPProtocolBuilder SetUserAgent(userAgent string) HTTPProtocolBuilder SetHost(host string) HTTPProtocolBuilder SetByteLength(byteReceived, byteSent int) HTTPProtocolBuilder SetRemoteAddress(remoteName string, remoteAddr string, remotePort int) HTTPProtocolBuilder SetLocalAddress(localAddr string, localPort int) HTTPProtocolBuilder SetSSLProperties(sslProtocol, sslServerName, sslSubject string) HTTPProtocolBuilder SetAuthSubjectID(authSubjectID string) HTTPProtocolBuilder SetHeaders(requestHeaders, responseHeaders string) HTTPProtocolBuilder SetRequestHeaders(requestHeaders map[string]string) HTTPProtocolBuilder SetResponseHeaders(responseHeaders map[string]string) HTTPProtocolBuilder AddRequestHeader(headerKey string, headerValue string) HTTPProtocolBuilder AddResponseHeader(headerKey string, headerValue string) HTTPProtocolBuilder SetIndexedHeaders(indexedRequestHeaders, indexedResponseHeaders string) HTTPProtocolBuilder SetIndexedRequestHeaders(indexedRequestHeaders map[string]string) HTTPProtocolBuilder SetIndexedResponseHeaders(indexedResponseHeaders map[string]string) HTTPProtocolBuilder AddIndexedRequestHeader(headerKey string, headerValue string) HTTPProtocolBuilder AddIndexedResponseHeader(headerKey string, headerValue string) HTTPProtocolBuilder SetPayload(requestPayload, responsePayload string) HTTPProtocolBuilder SetWAFStatus(wasStatus int) HTTPProtocolBuilder SetRedactionConfig(config redaction.Redactions) HTTPProtocolBuilder Build() (TransportProtocol, error) }
HTTPProtocolBuilder - Interface to build the HTTP protocol details for transaction log event
func NewHTTPProtocolBuilder ¶
func NewHTTPProtocolBuilder() HTTPProtocolBuilder
NewHTTPProtocolBuilder - Creates a new http protocol builder
type JMSProtocol ¶
type JMSProtocol struct { Type string `json:"type,omitempty"` AuthSubjectID string `json:"authSubjectId,omitempty"` JMSMessageID string `json:"jmsMessageID,omitempty"` JMSCorrelationID string `json:"jmsCorrelationID,omitempty"` JMSDestination string `json:"jmsDestination,omitempty"` JMSProviderURL string `json:"jmsProviderURL,omitempty"` JMSDeliveryMode int `json:"jmsDeliveryMode,omitempty"` JMSPriority int `json:"jmsPriority,omitempty"` JMSReplyTo string `json:"jmsReplyTo,omitempty"` JMSRedelivered int `json:"jmsRedelivered,omitempty"` JMSTimestamp int `json:"jmsTimestamp,omitempty"` JMSExpiration int `json:"jmsExpiration,omitempty"` JMSType string `json:"jmsType,omitempty"` JMSStatus string `json:"jmsStatus,omitempty"` JMSStatusText string `json:"jmsStatusText,omitempty"` }
JMSProtocol - Represents the details in a transaction event for the JMS protocol
func (*JMSProtocol) FromMapStringString ¶
func (j *JMSProtocol) FromMapStringString(propertyMap map[string]string) error
FromMapStringString - convert the map[string]string to a JMSProtocol
func (*JMSProtocol) ToMapStringString ¶
func (j *JMSProtocol) ToMapStringString() (map[string]string, error)
ToMapStringString - convert the JMSProtocol to a map[string]string
type JMSProtocolBuilder ¶
type JMSProtocolBuilder interface { SetMessageID(messageID string) JMSProtocolBuilder SetCorrelationID(correlationID string) JMSProtocolBuilder SetAuthSubjectID(authSubjectID string) JMSProtocolBuilder SetDestination(destination string) JMSProtocolBuilder SetProviderURL(providerURL string) JMSProtocolBuilder SetDeliveryMode(deliveryMode int) JMSProtocolBuilder SetPriority(priority int) JMSProtocolBuilder SetReplyTo(replyTo string) JMSProtocolBuilder SetRedelivered(redelivered int) JMSProtocolBuilder SetTimestamp(timestamp int) JMSProtocolBuilder SetExpiration(expiration int) JMSProtocolBuilder SetJMSType(jmsType string) JMSProtocolBuilder SetStatus(status string) JMSProtocolBuilder SetStatusText(statusText string) JMSProtocolBuilder Build() (TransportProtocol, error) }
JMSProtocolBuilder - Interface to build the JMS protocol details for transaction log event
func NewJMSProtocolBuilder ¶
func NewJMSProtocolBuilder() JMSProtocolBuilder
NewJMSProtocolBuilder - Creates a new JMS protocol builder
type LogEvent ¶
type LogEvent struct { Version string `json:"version"` Stamp int64 `json:"timestamp"` TransactionID string `json:"transactionId"` Environment string `json:"environment,omitempty"` APICDeployment string `json:"apicDeployment,omitempty"` EnvironmentName string `json:"environmentName,omitempty"` EnvironmentID string `json:"environmentId"` TenantID string `json:"tenantId"` TrcbltPartitionID string `json:"trcbltPartitionId"` Type string `json:"type"` TargetPath string `json:"targetPath,omitempty"` ResourcePath string `json:"resourcePath,omitempty"` TransactionEvent *Event `json:"transactionEvent,omitempty"` TransactionSummary *Summary `json:"transactionSummary,omitempty"` }
LogEvent - Log event to be sent to Condor
type Protocol ¶
type Protocol struct { Type string `json:"type,omitempty"` URI string `json:"uri,omitempty"` Args string `json:"args,omitempty"` Method string `json:"method,omitempty"` Status int `json:"status,omitempty"` StatusText string `json:"statusText,omitempty"` UserAgent string `json:"userAgent,omitempty"` Host string `json:"host,omitempty"` Version string `json:"version,omitempty"` BytesReceived int `json:"bytesReceived,omitempty"` BytesSent int `json:"bytesSent,omitempty"` RemoteName string `json:"remoteName,omitempty"` RemoteAddr string `json:"remoteAddr,omitempty"` RemotePort int `json:"remotePort,omitempty"` LocalAddr string `json:"localAddr,omitempty"` LocalPort int `json:"localPort,omitempty"` SslServerName string `json:"sslServerName,omitempty"` SslProtocol string `json:"sslProtocol,omitempty"` Referer string `json:"referer,omitempty"` SslSubject string `json:"sslSubject,omitempty"` AuthSubjectID string `json:"authSubjectId,omitempty"` RequestHeaders string `json:"requestHeaders,omitempty"` IndexedRequestHeaders string `json:"indexedRequestHeaders,omitempty"` ResponseHeaders string `json:"responseHeaders,omitempty"` IndexedResponseHeaders string `json:"indexedResponseHeaders,omitempty"` RequestPayload string `json:"requestPayload,omitempty"` ResponsePayload string `json:"responsePayload,omitempty"` WafStatus int `json:"wafStatus,omitempty"` Timing string `json:"timing,omitempty"` // contains filtered or unexported fields }
Protocol - Represents the protocol details in transaction detail events
type Proxy ¶
type Proxy struct { ID string `json:"id,omitempty"` Revision int `json:"revision,omitempty"` Name string `json:"name,omitempty"` Stage string `json:"-"` Version string `json:"-"` }
Proxy - Represents the proxy definition in summary event
type Summary ¶
type Summary struct { Status string `json:"status,omitempty"` StatusDetail string `json:"statusDetail,omitempty"` Duration int `json:"duration"` Team *Team `json:"team,omitempty"` Proxy *Proxy `json:"proxy,omitempty"` Runtime *Runtime `json:"runtime,omitempty"` EntryPoint *EntryPoint `json:"entryPoint,omitempty"` IsInMetricEvent bool `json:"isInMetricEvent,omitempty"` Application *Application `json:"application,omitempty"` AssetResource *models.AssetResource `json:"assetResource,omitempty"` API *models.APIDetails `json:"api,omitempty"` Product *models.Product `json:"product,omitempty"` ProductPlan *models.ProductPlan `json:"productPlan,omitempty"` Quota *models.Quota `json:"quota,omitempty"` ConsumerDetails *models.ConsumerDetails `json:"consumerDetails,omitempty"` }
Summary - Represent the transaction summary event
type SummaryBuilder ¶
type SummaryBuilder interface { SetTimestamp(timestamp int64) SummaryBuilder SetTransactionID(transactionID string) SummaryBuilder SetAPICDeployment(apicDeployment string) SummaryBuilder SetEnvironmentName(environmentName string) SummaryBuilder SetEnvironmentID(environmentID string) SummaryBuilder SetTenantID(tenantID string) SummaryBuilder SetTrcbltPartitionID(trcbltPartitionID string) SummaryBuilder SetTargetPath(targetPath string) SummaryBuilder SetResourcePath(resourcePath string) SummaryBuilder SetStatus(status TxSummaryStatus, statusDetail string) SummaryBuilder SetDuration(duration int) SummaryBuilder SetApplication(appID, appName string) SummaryBuilder SetProduct(id, name, version string) SummaryBuilder SetTeam(teamID string) SummaryBuilder SetProxy(proxyID, proxyName string, proxyRevision int) SummaryBuilder SetProxyWithStage(proxyID, proxyName, proxyStage string, proxyRevision int) SummaryBuilder SetProxyWithStageVersion(proxyID, proxyName, proxyStage, proxyVersion string, proxyRevision int) SummaryBuilder SetRunTime(runtimeID, runtimeName string) SummaryBuilder SetEntryPoint(entryPointType, method, path, host string) SummaryBuilder SetIsInMetricEvent(isInMetricEvent bool) SummaryBuilder SetRedactionConfig(config redaction.Redactions) SummaryBuilder Build() (*LogEvent, error) }
SummaryBuilder - Interface to build the log event of type transaction summary
func NewTransactionSummaryBuilder ¶
func NewTransactionSummaryBuilder() SummaryBuilder
NewTransactionSummaryBuilder - Creates a new log event builder
type Team ¶
type Team struct {
ID string `json:"id,omitempty"`
}
Team - Represents the team used in transaction summary event
type TransportProtocol ¶
type TransportProtocol interface{}
TransportProtocol - Interface for transport protocol detail
type TxEventStatus ¶
type TxEventStatus string
TxEventStatus - Type def for transaction event status
const ( // TxEventStatusPass - Constant for Pass transaction event status TxEventStatusPass TxEventStatus = "Pass" // TxEventStatusFail - Constant for Fail transaction event status TxEventStatusFail TxEventStatus = "Fail" )
Constants for transaction event status
func (TxEventStatus) IsValid ¶
func (s TxEventStatus) IsValid() error
IsValid - Validator for TxEventStatus
type TxSummaryStatus ¶
type TxSummaryStatus string
TxSummaryStatus - Type def for transaction event status
const ( // TxSummaryStatusSuccess - Constant for Success transaction summary status TxSummaryStatusSuccess TxSummaryStatus = "Success" // TxSummaryStatusFailure - Constant for Success transaction summary status TxSummaryStatusFailure TxSummaryStatus = "Failure" // TxSummaryStatusException - Constant for Exception transaction summary status TxSummaryStatusException TxSummaryStatus = "Exception" // TxSummaryStatusUnknown - Constant for Exception transaction summary status TxSummaryStatusUnknown TxSummaryStatus = "Unknown" )
Constants for transaction summary status
func (TxSummaryStatus) IsValid ¶
func (s TxSummaryStatus) IsValid() error
IsValid - Validator for TxSummaryStatus