Skip to content

Commit

Permalink
Remove deprecated funcs (open-telemetry#3314)
Browse files Browse the repository at this point in the history
  • Loading branch information
humivo authored and dashpole committed Jun 14, 2021
1 parent 7a3b3e1 commit 737e1c6
Showing 1 changed file with 0 additions and 102 deletions.
102 changes: 0 additions & 102 deletions obsreport/obsreport_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,6 @@ func (rec *Receiver) StartTraceDataReceiveOp(
opt...)
}

// StartTraceDataReceiveOp is deprecated but is called when a request is received from a client.
// The returned context should be used in other calls to the obsreport functions
// dealing with the same receive operation.
func StartTraceDataReceiveOp(
operationCtx context.Context,
receiverID config.ComponentID,
transport string,
opt ...StartReceiveOption,
) context.Context {
rec := NewReceiver(ReceiverSettings{ReceiverID: receiverID, Transport: transport})
return rec.traceReceiveOp(
operationCtx,
obsmetrics.ReceiveTraceDataOperationSuffix,
opt...)
}

// EndTraceDataReceiveOp completes the receive operation that was started with
// StartTraceDataReceiveOp.
func (rec *Receiver) EndTraceDataReceiveOp(
Expand All @@ -145,24 +129,6 @@ func (rec *Receiver) EndTraceDataReceiveOp(
)
}

// EndTraceDataReceiveOp is deprecated but completes the receive operation that was started with
// StartTraceDataReceiveOp.
func EndTraceDataReceiveOp(
receiverCtx context.Context,
format string,
numReceivedSpans int,
err error,
) {
rec := NewReceiver(ReceiverSettings{})
rec.endReceiveOp(
receiverCtx,
format,
numReceivedSpans,
err,
config.TracesDataType,
)
}

// StartLogsReceiveOp is called when a request is received from a client.
// The returned context should be used in other calls to the obsreport functions
// dealing with the same receive operation.
Expand All @@ -176,22 +142,6 @@ func (rec *Receiver) StartLogsReceiveOp(
opt...)
}

// StartLogsReceiveOp is deprecated but is called when a request is received from a client.
// The returned context should be used in other calls to the obsreport functions
// dealing with the same receive operation.
func StartLogsReceiveOp(
operationCtx context.Context,
receiverID config.ComponentID,
transport string,
opt ...StartReceiveOption,
) context.Context {
rec := NewReceiver(ReceiverSettings{ReceiverID: receiverID, Transport: transport})
return rec.traceReceiveOp(
operationCtx,
obsmetrics.ReceiverLogsOperationSuffix,
opt...)
}

// EndLogsReceiveOp completes the receive operation that was started with
// StartLogsReceiveOp.
func (rec *Receiver) EndLogsReceiveOp(
Expand All @@ -209,24 +159,6 @@ func (rec *Receiver) EndLogsReceiveOp(
)
}

// EndLogsReceiveOp is deprecated but completes the receive operation that was started with
// StartLogsReceiveOp.
func EndLogsReceiveOp(
receiverCtx context.Context,
format string,
numReceivedLogRecords int,
err error,
) {
rec := NewReceiver(ReceiverSettings{})
rec.endReceiveOp(
receiverCtx,
format,
numReceivedLogRecords,
err,
config.LogsDataType,
)
}

// StartMetricsReceiveOp is called when a request is received from a client.
// The returned context should be used in other calls to the obsreport functions
// dealing with the same receive operation.
Expand All @@ -240,22 +172,6 @@ func (rec *Receiver) StartMetricsReceiveOp(
opt...)
}

// StartMetricsReceiveOp is deprecated but is called when a request is received from a client.
// The returned context should be used in other calls to the obsreport functions
// dealing with the same receive operation.
func StartMetricsReceiveOp(
operationCtx context.Context,
receiverID config.ComponentID,
transport string,
opt ...StartReceiveOption,
) context.Context {
rec := NewReceiver(ReceiverSettings{ReceiverID: receiverID, Transport: transport})
return rec.traceReceiveOp(
operationCtx,
obsmetrics.ReceiverMetricsOperationSuffix,
opt...)
}

// EndMetricsReceiveOp completes the receive operation that was started with
// StartMetricsReceiveOp.
func (rec *Receiver) EndMetricsReceiveOp(
Expand All @@ -273,24 +189,6 @@ func (rec *Receiver) EndMetricsReceiveOp(
)
}

// EndMetricsReceiveOp is deprecated but completes the receive operation that was started with
// StartMetricsReceiveOp.
func EndMetricsReceiveOp(
receiverCtx context.Context,
format string,
numReceivedPoints int,
err error,
) {
rec := NewReceiver(ReceiverSettings{})
rec.endReceiveOp(
receiverCtx,
format,
numReceivedPoints,
err,
config.MetricsDataType,
)
}

// ReceiverContext adds the keys used when recording observability metrics to
// the given context returning the newly created context. This context should
// be used in related calls to the obsreport functions so metrics are properly
Expand Down

0 comments on commit 737e1c6

Please sign in to comment.