Skip to content

Add support for custom span attributes #35

@Nancy-Chauhan

Description

@Nancy-Chauhan

Feature Request\n\nUsers should be able to define custom span attributes with type validation and schema enforcement.\n\n## Motivation\n\nEnterprise customers need to ensure span attributes conform to their internal schemas. Currently attributes are untyped dict[str, Any].\n\n## Proposed Solution\n\n1. Add an AttributeSchema class that defines allowed keys and types\n2. Add an optional schema parameter to Span.__init__\n3. Validate attributes on assignment when schema is set\n\n## Alternatives\n\n- Could use Pydantic validators but that's less flexible\n- Could do validation at export time instead of assignment time

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions