Skip to content

test: add real-world OTLP JSON fixtures and tests#175

Open
Anshuman-cs50 wants to merge 1 commit into
Dharanish-AM:mainfrom
Anshuman-cs50:feature-otlp-fixtures
Open

test: add real-world OTLP JSON fixtures and tests#175
Anshuman-cs50 wants to merge 1 commit into
Dharanish-AM:mainfrom
Anshuman-cs50:feature-otlp-fixtures

Conversation

@Anshuman-cs50

Copy link
Copy Markdown
Contributor

Description

This PR introduces comprehensive, real-world OpenTelemetry (OTLP) JSON fixtures and updates the test_otel_ingest.py suite to validate backend ingestion against complex payload schemas. Previously, the tests relied on small, hardcoded dictionary payloads that missed critical edge cases like nested arrays (arrayValue), standard kvlistValue fields, and deeply nested attributes. The pytest test suite has been successfully parametrized to cover these scenarios without failing.

Related Issue

Closes #131

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style / UI improvement
  • ♻️ Refactor (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or update
  • 🔧 Chore / Tooling / Config

Changes Made

  • Created backend/tests/fixtures/otel_payloads.py containing complex, large-scale OTLP JSON dictionary exports.
  • Parametrized tests in test_otel_ingest.py to seamlessly validate these new COMPLEX_OTEL_PAYLOAD and LARGE_BATCH_OTEL_PAYLOAD fixtures.
  • Added explicit test coverage checking proper parsing mapping for standard metadata, heavily nested attributes, and array-based types.

Testing

  • I have tested these changes locally
  • I have added/updated tests where applicable
  • All existing tests pass

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • I have updated the documentation if needed
  • My changes generate no new warnings or errors

@github-actions github-actions Bot added the backend Backend application changes or issues label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend application changes or issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: OTLP JSON Payload Test Fixtures

1 participant