Skip to content

Commit

Permalink
Revert "fix: send old and new pipeline trigger measurements (#565)"
Browse files Browse the repository at this point in the history
This reverts commit 33cf3c7.
  • Loading branch information
jvallesm committed Oct 4, 2024
1 parent 12e1102 commit 7ae67ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
29 changes: 1 addition & 28 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
RenameEvent string = "Rename"
ExecuteEvent string = "Execute"

pipelineMeasurement = "pipeline.trigger.v1"
pipelineMeasurement = "pipeline.trigger"
)

func IsAuditEvent(eventName string) bool {
Expand Down Expand Up @@ -106,33 +106,6 @@ func NewPipelineDataPoint(data PipelineUsageMetricData) *write.Point {
return influxdb2.NewPoint(pipelineMeasurement, tags, fields, time.Now())
}

// DeprecatedNewPipelineDatapoint transforms the information of a pipeline
// triger into an InfluxDB datapoint. This measurement is deprecated and will
// be retired with the new dashboard implementation.
func DeprecatedNewPipelineDatapoint(data PipelineUsageMetricData) *write.Point {
return influxdb2.NewPoint(
"pipeline.trigger",
map[string]string{
"status": data.Status.String(),
"trigger_mode": data.TriggerMode.String(),
},
map[string]any{
"owner_uid": data.OwnerUID,
"owner_type": data.OwnerType,
"user_uid": data.UserUID,
"user_type": data.UserType,
"pipeline_id": data.PipelineID,
"pipeline_uid": data.PipelineUID,
"pipeline_release_id": data.PipelineReleaseID,
"pipeline_release_uid": data.PipelineReleaseUID,
"pipeline_trigger_id": data.PipelineTriggerUID,
"trigger_time": data.TriggerTime,
"compute_time_duration": data.ComputeTimeDuration,
},
time.Now(),
)
}

type ConnectorUsageMetricData struct {
OwnerUID string
OwnerType mgmtPB.OwnerType
Expand Down
1 change: 0 additions & 1 deletion pkg/worker/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func (w *worker) writeNewDataPoint(ctx context.Context, data utils.PipelineUsage
}

w.influxDBWriteClient.WritePoint(utils.NewPipelineDataPoint(data))
w.influxDBWriteClient.WritePoint(utils.DeprecatedNewPipelineDatapoint(data))

return nil
}
Expand Down

0 comments on commit 7ae67ee

Please sign in to comment.