diff --git a/integration-tests/tests/otel-export.lux b/integration-tests/tests/otel-export.lux index 24956c1bf6..3edb9120bf 100644 --- a/integration-tests/tests/otel-export.lux +++ b/integration-tests/tests/otel-export.lux @@ -210,8 +210,27 @@ [global offset=$1] [shell otel_collector] + # Verify request/storage metrics emitted by the initial snapshot before later span matching + # consumes this export window. + """? + Metric #[0-9]+ + Descriptor: + -> Name: electric\.plug\.serve_shape\.count + """ + + """? + Metric #[0-9]+ + Descriptor: + -> Name: electric\.plug\.serve_shape\.bytes + """ + + """? + Metric #[0-9]+ + Descriptor: + -> Name: electric\.storage\.snapshot_stored\.operations + """ + # Verify that the initial snapshot query span is exported from the Snapshotter path. - ?Span #[0-9]+ ?Name[ ]+: shape_snapshot\.execute_for_shape ?->[ ]shape\.query_reason: Str\(initial_snapshot\) @@ -226,24 +245,8 @@ ??"metadata" [shell otel_collector] - # Verify that a direct subset snapshot query span is exported from the PartialModes path. - ?Span #[0-9]+ - ?Name[ ]+: shape_snapshot\.execute_for_shape - ?->[ ]shape\.query_reason: Str\(subset_query\) - -[shell client] - [invoke curl_shape "http://localhost:3000/v1/shape?table=items&handle=$handle&offset=$offset&live"] - - ??HTTP/1.1 200 OK - ??"value":{"val":"3"} - -[shell psql] - !insert into items values ('4'); - ??INSERT - -[shell otel_collector] - # Verify that new measurement exports from this branch are present - # Order matches actual OTEL export order (not alphabetical) + # Verify request/storage metrics emitted after the insert + subset snapshot export window. + # Order matches actual OTEL export order (not alphabetical). """? Metric #[0-9]+ Descriptor: @@ -256,12 +259,6 @@ -> Name: electric\.plug\.serve_shape\.bytes """ - """? - Metric #[0-9]+ - Descriptor: - -> Name: electric\.storage\.snapshot_stored\.operations - """ - """? Metric #[0-9]+ Descriptor: @@ -274,6 +271,20 @@ -> Name: electric\.storage\.transaction_stored\.operations """ + # Verify that a direct subset snapshot query span is exported from the PartialModes path. + ?Name[ ]+: shape_snapshot\.execute_for_shape + ?->[ ]shape\.query_reason: Str\(subset_query\) + +[shell client] + [invoke curl_shape "http://localhost:3000/v1/shape?table=items&handle=$handle&offset=$offset&live"] + + ??HTTP/1.1 200 OK + ??"value":{"val":"3"} + +[shell psql] + !insert into items values ('4'); + ??INSERT + ### [cleanup]