diff --git a/exporter/stefexporter/exporter_test.go b/exporter/stefexporter/exporter_test.go index af14bed338bf3..e2ab933c69016 100644 --- a/exporter/stefexporter/exporter_test.go +++ b/exporter/stefexporter/exporter_test.go @@ -77,7 +77,9 @@ func (m *mockMetricDestServer) start() { Logger: nil, ServerSchema: &schema, MaxDictBytes: 0, - OnStream: m.onStream, + Callbacks: stefgrpc.Callbacks{ + OnStream: m.onStream, + }, } mockServer := stefgrpc.NewStreamServer(settings) stef_proto.RegisterSTEFDestinationServer(grpcServer, mockServer) @@ -93,7 +95,7 @@ func (m *mockMetricDestServer) stop() { m.grpcServer.Stop() } -func (m *mockMetricDestServer) onStream(grpcReader stefgrpc.GrpcReader, ackFunc func(sequenceId uint64) error) error { +func (m *mockMetricDestServer) onStream(grpcReader stefgrpc.GrpcReader, stream stefgrpc.STEFStream) error { m.logger.Info("Incoming TEF/gRPC connection.") reader, err := oteltef.NewMetricsReader(grpcReader) @@ -115,9 +117,11 @@ func (m *mockMetricDestServer) onStream(grpcReader stefgrpc.GrpcReader, ackFunc continue } - if err = ackFunc(reader.RecordCount()); err != nil { + err = stream.SendDataResponse(&stef_proto.STEFDataResponse{AckRecordId: reader.RecordCount()}) + if err != nil { return err } + m.acksSent.Add(1) } } diff --git a/exporter/stefexporter/go.mod b/exporter/stefexporter/go.mod index 1821560987e7b..32c20f4e3d010 100644 --- a/exporter/stefexporter/go.mod +++ b/exporter/stefexporter/go.mod @@ -4,9 +4,9 @@ go 1.23.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.124.1 - github.com/splunk/stef/go/grpc v0.0.4 - github.com/splunk/stef/go/otel v0.0.4 - github.com/splunk/stef/go/pdata v0.0.4 + github.com/splunk/stef/go/grpc v0.0.5 + github.com/splunk/stef/go/otel v0.0.5 + github.com/splunk/stef/go/pdata v0.0.5 github.com/splunk/stef/go/pkg v0.0.5 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v1.30.0 diff --git a/exporter/stefexporter/go.sum b/exporter/stefexporter/go.sum index d0bbaadb3a57a..73fefea093ab2 100644 --- a/exporter/stefexporter/go.sum +++ b/exporter/stefexporter/go.sum @@ -58,12 +58,12 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/splunk/stef/go/grpc v0.0.4 h1:BqYj7rIwWBGw1WwkjMkP6VS3qIbQ/U4ZZ2hItra1OpI= -github.com/splunk/stef/go/grpc v0.0.4/go.mod h1:HS7Zgl26eITGdN5xo1bPaqO+5sQ/kbPquSU5iv14gG4= -github.com/splunk/stef/go/otel v0.0.4 h1:qQ+5/8dpRE1YZSQzKBIgnesHJAGOu+R/193XMC0TGU8= -github.com/splunk/stef/go/otel v0.0.4/go.mod h1:gg/SPmWqVfbyBmR5KthHzTJYy1N+WNBME7sd1RYccdk= -github.com/splunk/stef/go/pdata v0.0.4 h1:Vtq+97JPAo16jj/ku4r/bCXGFQBP71E4vtS/e9M2voQ= -github.com/splunk/stef/go/pdata v0.0.4/go.mod h1:o0PLyw0emG3JSfXpUklU2DuizAC2AHpJpLc6sgQkzd8= +github.com/splunk/stef/go/grpc v0.0.5 h1:n104aOXGsan3mAtaXQlESY5lJWdYBV5mAzQUBjwP6mA= +github.com/splunk/stef/go/grpc v0.0.5/go.mod h1:QXi3IE0ZtEXBFicUpEWivqUGeGY6O9Q2oYsc1JAZmiY= +github.com/splunk/stef/go/otel v0.0.5 h1:EC+MwKGRgI9I71Ef4es4NDnQAFbLYiLkiJ/yR+kVHvw= +github.com/splunk/stef/go/otel v0.0.5/go.mod h1:YqFzAMEGONm/PVIFGghbMgRz0GdJazKKYIAOAbZbzhw= +github.com/splunk/stef/go/pdata v0.0.5 h1:Oro7gNg6lAE5+tjLt2E2S0E3kxMTTDOzVWa2SVctDs0= +github.com/splunk/stef/go/pdata v0.0.5/go.mod h1:aRBlP2usY7uBqWMIZpwM2EYZiIoZBYcCLOfktftrMXk= github.com/splunk/stef/go/pkg v0.0.5 h1:fGHgpT1DVso8hbQP6rGCRzY9+ZO7DBFdxmoMKpe5z8o= github.com/splunk/stef/go/pkg v0.0.5/go.mod h1:eDMc/KOCPUv5ClCiF6Jcw8sDueYouDujMKhQoDbDtPw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/receiver/stefreceiver/go.mod b/receiver/stefreceiver/go.mod index 84dfb1b4036d8..988d46b511978 100644 --- a/receiver/stefreceiver/go.mod +++ b/receiver/stefreceiver/go.mod @@ -4,9 +4,9 @@ go 1.23.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/stefexporter v0.124.1 - github.com/splunk/stef/go/grpc v0.0.5-0.20250328192643-20ae67012e0c - github.com/splunk/stef/go/otel v0.0.5-0.20250328192643-20ae67012e0c - github.com/splunk/stef/go/pdata v0.0.5-0.20250328192643-20ae67012e0c + github.com/splunk/stef/go/grpc v0.0.5 + github.com/splunk/stef/go/otel v0.0.5 + github.com/splunk/stef/go/pdata v0.0.5 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v1.30.0 go.opentelemetry.io/collector/component/componentstatus v0.124.0 diff --git a/receiver/stefreceiver/go.sum b/receiver/stefreceiver/go.sum index 186b688561601..664598560aa5c 100644 --- a/receiver/stefreceiver/go.sum +++ b/receiver/stefreceiver/go.sum @@ -58,12 +58,12 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/splunk/stef/go/grpc v0.0.5-0.20250328192643-20ae67012e0c h1:+dppPZD1PSONzzOowVkNQHZOQLE5HfFbxiX1jds3oKM= -github.com/splunk/stef/go/grpc v0.0.5-0.20250328192643-20ae67012e0c/go.mod h1:HS7Zgl26eITGdN5xo1bPaqO+5sQ/kbPquSU5iv14gG4= -github.com/splunk/stef/go/otel v0.0.5-0.20250328192643-20ae67012e0c h1:2g8HMbsa7gq35+kX1FvvAFNLRZ7/5W8ozU+LuKJZms4= -github.com/splunk/stef/go/otel v0.0.5-0.20250328192643-20ae67012e0c/go.mod h1:gg/SPmWqVfbyBmR5KthHzTJYy1N+WNBME7sd1RYccdk= -github.com/splunk/stef/go/pdata v0.0.5-0.20250328192643-20ae67012e0c h1:pok/I8c7bly3IEJT1FkpMLE8/Mb2HixwvNLCp0T+NpM= -github.com/splunk/stef/go/pdata v0.0.5-0.20250328192643-20ae67012e0c/go.mod h1:o0PLyw0emG3JSfXpUklU2DuizAC2AHpJpLc6sgQkzd8= +github.com/splunk/stef/go/grpc v0.0.5 h1:n104aOXGsan3mAtaXQlESY5lJWdYBV5mAzQUBjwP6mA= +github.com/splunk/stef/go/grpc v0.0.5/go.mod h1:QXi3IE0ZtEXBFicUpEWivqUGeGY6O9Q2oYsc1JAZmiY= +github.com/splunk/stef/go/otel v0.0.5 h1:EC+MwKGRgI9I71Ef4es4NDnQAFbLYiLkiJ/yR+kVHvw= +github.com/splunk/stef/go/otel v0.0.5/go.mod h1:YqFzAMEGONm/PVIFGghbMgRz0GdJazKKYIAOAbZbzhw= +github.com/splunk/stef/go/pdata v0.0.5 h1:Oro7gNg6lAE5+tjLt2E2S0E3kxMTTDOzVWa2SVctDs0= +github.com/splunk/stef/go/pdata v0.0.5/go.mod h1:aRBlP2usY7uBqWMIZpwM2EYZiIoZBYcCLOfktftrMXk= github.com/splunk/stef/go/pkg v0.0.5 h1:fGHgpT1DVso8hbQP6rGCRzY9+ZO7DBFdxmoMKpe5z8o= github.com/splunk/stef/go/pkg v0.0.5/go.mod h1:eDMc/KOCPUv5ClCiF6Jcw8sDueYouDujMKhQoDbDtPw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=