Skip to content

Make otel-export lux test reliable via normalized output and per-pattern grep#4232

Merged
icehaunter merged 3 commits intomainfrom
alco/otel-output-matching
Apr 29, 2026
Merged

Make otel-export lux test reliable via normalized output and per-pattern grep#4232
icehaunter merged 3 commits intomainfrom
alco/otel-output-matching

Conversation

@alco
Copy link
Copy Markdown
Member

@alco alco commented Apr 29, 2026

Summary

Reworks the otel-export.lux integration test so its assertions no longer depend on the raw, ordering-sensitive output of the OtelCollector debug exporter.

  • Adds integration-tests/support_files/normalize-otel-output.py, which collapses the verbose collector log into a compact, stable one-line-per-metric/span representation.
  • Adds a grep_otel_collector_output macro in _macros.luxinc so each expected metric/span is asserted independently against the normalized output.
  • Rewrites otel-export.lux to verify resource attributes for both application and stack metrics on collector startup, then assert each expected metric and span via the new macro — removing the previous coupling to alphabetical ordering of patterns.

Test plan

  • otel-export.lux integration test passes locally
  • CI green

@alco alco changed the title Sort OtelCollector output for predictable pattern matching in lux tests Replace sorting with grepping for more reliable OtelCollector pattern matching Apr 29, 2026
@alco alco changed the title Replace sorting with grepping for more reliable OtelCollector pattern matching Make otel-export lux test reliable via normalized output and per-pattern grep Apr 29, 2026
@alco
Copy link
Copy Markdown
Member Author

alco commented Apr 29, 2026

Supersedes #4226.

@icehaunter icehaunter merged commit 00a0a50 into main Apr 29, 2026
6 of 7 checks passed
@icehaunter icehaunter deleted the alco/otel-output-matching branch April 29, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants