Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
damemi committed Jun 13, 2023
1 parent 0283354 commit dade9ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exporter/collector/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ func (me *MetricsExporter) PushMetrics(ctx context.Context, m pmetric.Metrics) e
errs = append(errs, fmt.Errorf("failed to marshal protobuf to bytes: %+v", err))
continue
}
fmt.Println("Writing entry to WAL")
err = me.wal.Write(me.wal.wIndex.Add(1), bytes)
if err != nil {
errs = append(errs, fmt.Errorf("failed to write to WAL: %+v", err))
Expand Down Expand Up @@ -477,7 +478,7 @@ func (me *MetricsExporter) walLoop(ctx context.Context) error {
func (me *MetricsExporter) readWALAndExport(ctx context.Context) error {
me.wal.mutex.Lock()
defer me.wal.mutex.Unlock()

fmt.Printf("Reading index %+v\n", me.wal.rIndex.Load())
bytes, err := me.wal.Read(me.wal.rIndex.Load())
if err == nil {
req := new(monitoringpb.CreateTimeSeriesRequest)
Expand Down

0 comments on commit dade9ab

Please sign in to comment.