Skip to content

Commit

Permalink
[receiver/cloudfoundryreceiver] Remove unused code and set the teleme…
Browse files Browse the repository at this point in the history
…tryType to int8
  • Loading branch information
jriguera committed May 14, 2024
1 parent a3900d5 commit 3853b98
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions receiver/cloudfoundryreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/receiverhelper"
)
Expand All @@ -29,33 +28,26 @@ const (
var _ receiver.Metrics = (*cloudFoundryReceiver)(nil)
var _ receiver.Logs = (*cloudFoundryReceiver)(nil)

type telemetryType int64
type telemetryType int8

const (
telemetryTypeMetrics telemetryType = iota
telemetryTypeLogs
telemetryTypeTraces
)

type telemetrySlice struct {
sliceType telemetryType
metricSlice pmetric.MetricSlice
logSlice plog.LogRecordSlice
traceSlice ptrace.SpanSlice
}

// newCloudFoundryReceiver implements the receiver.Metrics for Cloud Foundry protocol.
type cloudFoundryReceiver struct {
settings component.TelemetrySettings
cancel context.CancelFunc
config Config
nextMetricsConsumer consumer.Metrics
nextLogsConsumer consumer.Logs
nextTracesConsumer consumer.Traces
obsrecv *receiverhelper.ObsReport
telemetryType telemetryType
goroutines sync.WaitGroup
receiverStartTime time.Time
// nextTracesConsumer consumer.Traces
obsrecv *receiverhelper.ObsReport
telemetryType telemetryType
goroutines sync.WaitGroup
receiverStartTime time.Time
}

// newCloudFoundryReceiver creates the Cloud Foundry receiver with the given parameters.
Expand Down Expand Up @@ -153,8 +145,8 @@ func (cfr *cloudFoundryReceiver) Start(ctx context.Context, host component.Host)
case telemetryTypeLogs:
cfr.streamLogs(innerCtx, envelopeStream)
case telemetryTypeTraces:
//TODO
//cfr.streamTelemetry(innerCtx, envelopeStream)
// TODO
// cfr.streamTelemetry(innerCtx, envelopeStream)
}

cfr.settings.Logger.Debug("cloudfoundry metrics streamer stopped")
Expand Down

0 comments on commit 3853b98

Please sign in to comment.