You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add user-configurable serialization options for span data in Mastra Observability. (#11484)
## Description
Add user-configurable serialization options for span data in Mastra
Observability.
This PR introduces the ability to configure how span data (input,
output, attributes) is serialized before export. Users can now
customize:
- `maxStringLength` - Maximum length for string values (default: 1024)
- `maxDepth` - Maximum depth for nested objects (default: 6)
- `maxArrayLength` - Maximum number of items in arrays (default: 50)
- `maxObjectKeys` - Maximum number of keys in objects (default: 50)
These options can be configured via
`ObservabilityInstanceConfig.serializationOptions`, allowing users to
control truncation limits for large payloads based on their
observability backend requirements.
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Checklist
- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added configurable serialization options to control span data
handling, including customizable limits for string length, object depth,
array size, and object key counts.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments