File tree Expand file tree Collapse file tree
java/org/opensearch/dataprepper/integration/log Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ List<LogTestConfiguration> logTestConfigurations = [
8484 ' otel-logs-source-pipeline.yml' ,
8585 ' data_prepper.yml'
8686 ),
87+ new LogTestConfiguration (
88+ ' basicLogOtelLogsSourceGrpcUnframedRequestsEndToEndTest' ,
89+ ' Runs the basic end-to-end test using the otel logs source grpc service with unframed requests enabled.' ,
90+ ' org.opensearch.dataprepper.integration.log.EndToEndOtelLogsSourceTest.testOtelLogsSourceWithUnframedRequestsPipelineEndToEnd*' ,
91+ ' data-prepper-otel-logs-source' ,
92+ ' otel-logs-source-unframed-requests-pipeline.yml' ,
93+ ' data_prepper.yml'
94+ ),
8795]
8896
8997
Original file line number Diff line number Diff line change @@ -56,11 +56,19 @@ public class EndToEndOtelLogsSourceTest {
5656
5757 @ Test
5858 public void testOtelLogsSourcePipelineEndToEnd () throws InvalidProtocolBufferException {
59- ingestLogs ();
59+ ingestLogs ("/otel-logs-pipeline/logs" );
6060
6161 searchForLogsAndAssert ();
6262 }
6363
64+ @ Test
65+ public void testOtelLogsSourceWithUnframedRequestsPipelineEndToEnd () throws InvalidProtocolBufferException {
66+ ingestLogs ("/opentelemetry.proto.collector.logs.v1.LogsService/Export" );
67+
68+ searchForLogsAndAssert ();
69+ }
70+
71+
6472 private HttpData createOtelLogsHttpRequest () throws InvalidProtocolBufferException {
6573 ExportLogsServiceRequest exportLogsServiceRequest = ExportLogsServiceRequest .newBuilder ().addResourceLogs (
6674 ResourceLogs .newBuilder ()
@@ -101,12 +109,12 @@ private RestHighLevelClient createOpenSearchClient() {
101109 .createClient (null );
102110 }
103111
104- private void ingestLogs () throws InvalidProtocolBufferException {
112+ private void ingestLogs (String path ) throws InvalidProtocolBufferException {
105113 RequestHeaders headers = RequestHeaders .builder ()
106114 .scheme (SessionProtocol .HTTP )
107115 .authority (String .format ("127.0.0.1:%d" , SOURCE_PORT ))
108116 .method (HttpMethod .POST )
109- .path ("/otel-logs-pipeline/logs" )
117+ .path (path )
110118 .contentType (MediaType .JSON_UTF_8 )
111119 .build ();
112120
Original file line number Diff line number Diff line change 1+ otel-logs-pipeline :
2+ workers : 2
3+ source :
4+ otel_logs_source :
5+ http_path : " /${pipelineName}/logs"
6+ port : 2021
7+ ssl : false
8+ unframed_requests : true
9+ sink :
10+ - opensearch :
11+ hosts : [ "https://node-0.example.com:9200" ]
12+ username : " admin"
13+ password : " admin"
14+ insecure : true
15+ index : " otel-logs-index"
16+ flush_timeout : 5000
You can’t perform that action at this time.
0 commit comments