snowrunescape/baselime-sdk
最新稳定版本:1.0.0
Composer 安装命令:
composer require snowrunescape/baselime-sdk
包简介
Baselime SDK is a client library
README 文档
README
This is a PHP SDK for sending events to Baselime. The SDK utilizes Guzzle for HTTP requests and provides a simple interface for sending events.
Installation
You can install the Baselime SDK via Composer:
composer require snowrunescape/baselime-sdk
Usage
<?php use Baselime\Baselime; // Initialize Baselime SDK with your API key $baselime = new Baselime('your-api-key'); // Send an event $baselime->event('my-service', [ 'message' => 'This is an example log event', 'error' => 'TypeError: Cannot read property \'something\' of undefined', 'requestId' => '6092d6f0-3bfa-4d62-9d0b-5bc7ae6518a1', 'namespace' => 'https://api.domain.com/resource/{id}' ]);
Recommendations
To enhance the efficiency of sending events to Baselime, it is recommended to use a queue system. This approach offers several benefits:
-
Load Management: Queues can help balance the load by controlling the rate at which events are sent to Baselime, preventing potential overloading.
-
Asynchronous Processing: Using queues allows for non-blocking event logging, improving the performance of your application.
License
Baselime SDK is made available under the MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 209
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-18