analytics

package
v0.0.0-...-dcd54df Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TemplateName = "analytics"

Fully qualified name of the template

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	adapter.Handler

	// HandleAnalytics is called by Mixer at request time to deliver instances to
	// to an adapter.
	HandleAnalytics(context.Context, []*Instance) error
}

Handler must be implemented by adapter code if it wants to process data associated with the 'analytics' template.

Mixer uses this interface to call into the adapter at request time in order to dispatch created instances to the adapter. Adapters take the incoming instances and do what they need to achieve their primary function.

The name of each instance can be used as a key into the Type map supplied to the adapter at configuration time via the method 'SetAnalyticsTypes'. These Type associated with an instance describes the shape of the instance

type HandlerBuilder

type HandlerBuilder interface {
	adapter.HandlerBuilder

	// SetAnalyticsTypes is invoked by Mixer to pass the template-specific Type information for instances that an adapter
	// may receive at runtime. The type information describes the shape of the instance.
	SetAnalyticsTypes(map[string]*Type)
}

HandlerBuilder must be implemented by adapters if they want to process data associated with the 'analytics' template.

Mixer uses this interface to call into the adapter at configuration time to configure it with adapter-specific configuration as well as all template-specific type information.

type Instance

type Instance struct {
	// Name of the instance as specified in configuration.
	Name string

	// The name of the proxy (usually the Istio API or service name).
	ApiProxy string

	// HTTP response code
	ResponseStatusCode int64

	// Client IP address
	ClientIp net.IP

	// HTTP request verb
	RequestVerb string

	// HTTP request URI
	RequestUri string

	// HTTP request path
	RequestPath string

	// HTTP user agent header
	Useragent string

	// Timestamp of when the api_proxy started receiving the request.
	ClientReceivedStartTimestamp time.Time

	// Timestamp of when the api_proxy  finished receiving the request.
	ClientReceivedEndTimestamp time.Time

	// Timestamp of when the api_proxy started sending the request to the target.
	ClientSentStartTimestamp time.Time

	// Timestamp of when the api_proxy finished sending the request to the target.
	ClientSentEndTimestamp time.Time

	// Timestamp of when the api_proxy started request to target.
	TargetSentStartTimestamp time.Time

	// Timestamp of when the api_proxy finished sending request to target.
	TargetSentEndTimestamp time.Time

	// Timestamp of when the api_proxy started receiving response from target.
	TargetReceivedStartTimestamp time.Time

	// Timestamp of when the api_proxy finished receiving response from target.
	TargetReceivedEndTimestamp time.Time

	// The JWT claims that were used for authenticating the request (if any)
	// Use subkey "json_claims" for passing all claims in as a single JSON field.
	ApiClaims map[string]string

	// The API KEY that was used for authenticating the request (if any)
	ApiKey string
}

Instance is constructed by Mixer for the 'analytics' template.

This Template provides Istio telemetry data to the Apigee Analytics engine. For additional information on this adapter or support please contact anchor-prega-support@google.com.

Jump to

Keyboard shortcuts

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