Skip to content

Commit

Permalink
chore: remove TODOs
Browse files Browse the repository at this point in the history
- Adjust the cron schedule for recording slot size in `scheduled_flows.go` to every 5 minutes
  • Loading branch information
iamKunalGupta committed May 16, 2024
1 parent f0c74cc commit aaecb88
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions flow/otel_metrics/otel_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ func newOtelResource(otelServiceName string) (*resource.Resource, error) {
return r, err
}

// TODO set either OTEL_EXPORTER_OTLP_COMPRESSION or OTEL_EXPORTER_OTLP_METRICS_COMPRESSION to "gzip" to enable compression

func setupHttpOtelMetricsExporter() (sdkmetric.Exporter, error) {
return otlpmetrichttp.New(context.Background())
}
Expand Down Expand Up @@ -66,7 +64,6 @@ func SetupOtelMetricsExporter(otelServiceName string) (*sdkmetric.MeterProvider,
}

meterProvider := sdkmetric.NewMeterProvider(
// TODO Set env OTEL_METRIC_EXPORT_INTERVAL (in milliseconds) to change export interval, default is 60 seconds
sdkmetric.WithReader(sdkmetric.NewPeriodicReader(metricExporter)),
sdkmetric.WithResource(otelResource),
)
Expand Down
3 changes: 1 addition & 2 deletions flow/workflows/scheduled_flows.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ func GlobalScheduleManagerWorkflow(ctx workflow.Context) error {

slotSizeCtx := withCronOptions(ctx,
"record-slot-size-"+info.OriginalRunID,
// TODO revert this back to 5 minutes?
"*/1 * * * *")
"*/5 * * * *")
workflow.ExecuteChildWorkflow(slotSizeCtx, RecordSlotSizeWorkflow)

ctx.Done().Receive(ctx, nil)
Expand Down

0 comments on commit aaecb88

Please sign in to comment.