Overview
This example demonstrates automated error log analysis through natural language processing. The analyzer processes various error types and provides:- Root cause identification
- Automated fix suggestions
- Severity classification (low/medium/high/critical)
- Pattern extraction
Prerequisites
Implementation
Define Extraction Schemas
First, create Pydantic models to define what information you want to extract:Configure Session
Set up a Fenic session with semantic capabilities:Prepare Error Logs
Create a DataFrame from your error logs:Apply Semantic Operations
Use semantic operations to analyze and classify errors:Focus on Critical Errors
Filter and prioritize critical issues:Extract Error Patterns
Identify common error patterns:Complete Example
Key Concepts
Semantic Classification
fc.semantic.classify() assigns one of the provided labels to each row based on semantic understanding of the content.
Semantic Extraction
fc.semantic.extract() uses Pydantic models to extract structured information from unstructured text.
Accessing Nested Fields
Use.alias() to access fields from extracted structs:
Troubleshooting
Generic analysis results
Generic analysis results
Add more descriptive fields to your Pydantic models with detailed
description parameters.Incorrect severity classification
Incorrect severity classification
Adjust classification categories or provide more specific labels that match your use case.
Missing error patterns
Missing error patterns
Modify Pydantic model field descriptions to be more specific about what you’re looking for.
Next Steps
- Try adding your own error logs
- Extract specific fields like error codes or user IDs
- Build alerts for critical errors
- Create auto-generated runbooks
