Documentation ¶
Index ¶
- Constants
- Variables
- func AssertSameKeys[V1, V2 any](m1 map[string]V1, m2 map[string]V2)
- type Client
- type Config
- type ConfigEnvI
- type ConfigT
- type ConnectionDetails
- type EDConnectionDetails
- type EDErrorDetails
- type EDInstanceDetails
- type EDMetric
- type EDReportsDB
- type EventParams
- type EventSchemasI
- type GatewayBatchRequest
- type InstanceDetails
- type Metric
- type PUDetails
- type PUReportedMetric
- type ReportByStatus
- type ReportMetadata
- type Reporting
- type SingularEventT
- type SingularEventWithReceivedAt
- type StatusDetail
- type UserSuppression
Constants ¶
View Source
const ( CoreReportingClient = "core" WarehouseReportingClient = "warehouse" SupportedTransformerApiVersion = 2 DefaultReportingEnabled = true DefaultReplayEnabled = false )
Variables ¶
View Source
var ( DiffStatus = "diff" // Module names GATEWAY = "gateway" DESTINATION_FILTER = "destination_filter" TRACKINGPLAN_VALIDATOR = "tracking_plan_validator" USER_TRANSFORMER = "user_transformer" EVENT_FILTER = "event_filter" DEST_TRANSFORMER = "dest_transformer" ROUTER = "router" BATCH_ROUTER = "batch_router" WAREHOUSE = "warehouse" )
View Source
var ( // Tracking plan validation states SUCCEEDED_WITHOUT_VIOLATIONS = "succeeded_without_violations" SUCCEEDED_WITH_VIOLATIONS = "succeeded_with_violations" )
Functions ¶
func AssertSameKeys ¶
Types ¶
type ConfigEnvI ¶
type ConfigEnvI interface {
ReplaceConfigWithEnvVariables(workspaceConfig []byte) (updatedConfig []byte)
}
ConfigEnvI is interface to inject env variables into config
type ConnectionDetails ¶
type ConnectionDetails struct { SourceID string `json:"sourceId"` DestinationID string `json:"destinationId"` SourceTaskRunID string `json:"sourceTaskRunId"` SourceJobID string `json:"sourceJobId"` SourceJobRunID string `json:"sourceJobRunId"` SourceDefinitionId string `json:"sourceDefinitionId"` DestinationDefinitionId string `string:"destinationDefinitionId"` SourceCategory string `json:"sourceCategory"` TransformationID string `json:"transformationId"` TransformationVersionID string `json:"transformationVersionId"` TrackingPlanID string `json:"trackingPlanId"` TrackingPlanVersion int `json:"trackingPlanVersion"` }
func CreateConnectionDetail ¶
func CreateConnectionDetail(sid, did, strid, sjid, sjrid, sdid, ddid, sc, trid, trvid, tpid string, tpv int) *ConnectionDetails
type EDConnectionDetails ¶ added in v1.10.0
type EDConnectionDetails struct { SourceID string `json:"sourceId"` DestinationID string `json:"destinationId"` SourceDefinitionId string `json:"sourceDefinitionId"` DestinationDefinitionId string `json:"destinationDefinitionId"` DestType string `json:"destinationDefinitionName"` }
EDMetric => ErrorDetailMetric
type EDErrorDetails ¶ added in v1.10.0
type EDInstanceDetails ¶ added in v1.10.0
type EDMetric ¶ added in v1.10.0
type EDMetric struct { EDInstanceDetails PU string `json:"reportedBy"` ReportMetadata EDConnectionDetails Errors []EDErrorDetails `json:"errors"` Count int64 `json:"-"` }
The structure in which the error detail data is being sent to reporting service
type EDReportsDB ¶ added in v1.10.0
type EDReportsDB struct { EDErrorDetails EDInstanceDetails EDConnectionDetails ReportMetadata PU string `json:"reportedBy"` Count int64 `json:"-"` }
type EventParams ¶
type EventSchemasI ¶
type EventSchemasI interface { RecordEventSchema(writeKey, eventBatch string) bool GetEventModels(w http.ResponseWriter, r *http.Request) GetEventVersions(w http.ResponseWriter, r *http.Request) GetSchemaVersionMetadata(w http.ResponseWriter, r *http.Request) GetSchemaVersionMissingKeys(w http.ResponseWriter, r *http.Request) GetKeyCounts(w http.ResponseWriter, r *http.Request) GetEventModelMetadata(w http.ResponseWriter, r *http.Request) GetJsonSchemas(w http.ResponseWriter, r *http.Request) }
EventSchemasI is interface to access EventSchemas feature
type GatewayBatchRequest ¶ added in v1.11.0
type GatewayBatchRequest struct { Batch []SingularEventT `json:"batch"` RequestIP string `json:"requestIP"` ReceivedAt time.Time `json:"receivedAt"` }
GatewayBatchRequest batch request structure
type InstanceDetails ¶
type Metric ¶
type Metric struct { InstanceDetails ConnectionDetails PUDetails ReportMetadata StatusDetails []*StatusDetail `json:"reports"` }
type PUDetails ¶
type PUDetails struct { InPU string `json:"inReportedBy"` PU string `json:"reportedBy"` TerminalPU bool `json:"terminalState"` InitialPU bool `json:"initialState"` }
func CreatePUDetails ¶
type PUReportedMetric ¶
type PUReportedMetric struct { ConnectionDetails PUDetails StatusDetail *StatusDetail }
type ReportByStatus ¶
type ReportByStatus struct { InstanceDetails ConnectionDetails PUDetails ReportMetadata StatusDetail *StatusDetail }
type ReportMetadata ¶
type ReportMetadata struct {
ReportedAt int64 `json:"reportedAt"`
}
type Reporting ¶ added in v1.10.0
type Reporting interface { WaitForSetup(ctx context.Context, clientName string) error Report(metrics []*PUReportedMetric, txn *sql.Tx) AddClient(ctx context.Context, c Config) }
Reporting is interface to report metrics
type SingularEventT ¶
type SingularEventT map[string]interface{}
SingularEventT single event structrue
type SingularEventWithReceivedAt ¶
type SingularEventWithReceivedAt struct { SingularEvent SingularEventT ReceivedAt time.Time }
type StatusDetail ¶
type StatusDetail struct { Status string `json:"state"` Count int64 `json:"count"` StatusCode int `json:"statusCode"` SampleResponse string `json:"sampleResponse"` SampleEvent json.RawMessage `json:"sampleEvent"` EventName string `json:"eventName"` EventType string `json:"eventType"` ErrorType string `json:"errorType"` ViolationCount int64 `json:"violationCount"` }
func CreateStatusDetail ¶
func CreateStatusDetail(status string, count, violationCount int64, code int, resp string, event json.RawMessage, eventName, eventType, errorType string) *StatusDetail
type UserSuppression ¶ added in v1.2.0
type UserSuppression interface {
GetSuppressedUser(workspaceID, userID, sourceID string) *model.Metadata
}
UserSuppression is interface to access Suppress user feature
Click to show internal directories.
Click to hide internal directories.