-
Notifications
You must be signed in to change notification settings - Fork 5
API Observability TelemetryEventListener
Event listener that forwards domain events to the telemetry provider. This decouples business logic from telemetry by using events to communicate what happened without the business logic needing to know about telemetry.
Table of Contents
OpenFGA\Observability
- TelemetryEventListenerInterface (interface)
public function onHttpRequestSent(OpenFGA\Events\HttpRequestSentEvent $event): voidHandle HTTP request sent events. Records telemetry data when an HTTP request is sent, including request method, URL, body size, and OpenFGA-specific context like operation, store ID, and model ID.
| Name | Type | Description |
|---|---|---|
$event |
HttpRequestSentEvent |
The HTTP request sent event |
void
public function onHttpResponseReceived(OpenFGA\Events\HttpResponseReceivedEvent $event): voidHandle HTTP response received events. Records telemetry data when an HTTP response is received, including response status, body size, and any exception information if the request failed.
| Name | Type | Description |
|---|---|---|
$event |
HttpResponseReceivedEvent |
The HTTP response received event |
void
public function onOperationCompleted(OpenFGA\Events\OperationCompletedEvent $event): voidHandle operation completed events. Records telemetry data when an OpenFGA operation completes, including success status, operation context, and exception details if the operation failed.
| Name | Type | Description |
|---|---|---|
$event |
OperationCompletedEvent |
The operation completed event |
void
public function onOperationStarted(OpenFGA\Events\OperationStartedEvent $event): voidHandle operation started events. Records telemetry data when an OpenFGA operation begins, including operation type, store context, and model information.
| Name | Type | Description |
|---|---|---|
$event |
OperationStartedEvent |
The operation started event |
void
Getting Started: Introduction • Installation • Authentication
Essentials: Stores • Authorization Models • Relationship Tuples • Permissions Queries
Features: Helper Functions • Concurrency • Results • Exceptions • Observability • Integration
- API Reference - Full class and method documentation
- Quickstart - Get up and running in minutes
- Helpers - Convenient shortcuts for common operations
- Testing Guide - Unit testing with the SDK
- Performance Guide - Optimize for high-scale applications
- Report Issues - Bug reports and feature requests
- Discussions - Community support and questions
- Contributing - Help improve the SDK
- Changelog - Latest updates and releases
- OpenFGA Documentation - Official OpenFGA documentation
- OpenFGA Playground - Interactive modeling environment
- Authorization Concepts - Learn relationship-based access control
- Other SDKs - JavaScript, Go, Python, .NET, and more
OpenFGA PHP SDK • Apache 2.0 License
- Authorization Stores
- Authorization Models
- Relationship Tuples
- Permission Queries
- Testing with Assertions
- Helper Functions
- Concurrency
- Error Handling
- Framework Integration
- OpenTelemetry Observability
- Result Pattern
- Event Dispatcher
- HTTP Request Sent Event
- HTTP Response Received Event
- Operation Started Event
- Operation Completed Event
- More Events …
- Authentication Exception
- Client Exception
- Configuration Exception
- Network Exception
- Serialization Exception
- More Exceptions …
- Request Manager
- Request Context
- Circuit Breaker
- Parallel Task Executor
- Fiber Concurrent Executor
- Simple Concurrent Executor
- Retry Handler
- Exponential Backoff Retry Strategy
- More Networking …