Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opentelemetry-php/config-sdk
[READONLY] OpenTelemetry SDK Configuration
https://github.com/opentelemetry-php/config-sdk
Last synced: 3 months ago
JSON representation
[READONLY] OpenTelemetry SDK Configuration
- Host: GitHub
- URL: https://github.com/opentelemetry-php/config-sdk
- Owner: opentelemetry-php
- Created: 2024-04-01T07:15:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T23:32:08.000Z (4 months ago)
- Last Synced: 2024-09-15T10:10:01.560Z (4 months ago)
- Language: PHP
- Size: 42 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenTelemetry SDK configuration
## Installation
```shell
composer require open-telemetry/sdk-configuration
```## Usage
### Initialization from [configuration file](https://opentelemetry.io/docs/specs/otel/configuration/file-configuration/)
```php
$configuration = Configuration::parseFile(__DIR__ . '/kitchen-sink.yaml');
$sdkBuilder = $configuration->create();
```#### Performance considerations
Parsing and processing the configuration is rather expensive. It is highly recommended to provide the `$cacheFile`
parameter when running in a shared-nothing setup.```php
$configuration = Configuration::parseFile(
__DIR__ . '/kitchen-sink.yaml',
__DIR__ . '/var/cache/opentelemetry.php',
);
$sdkBuilder = $configuration->create();
```## Contributing
This repository is a read-only git subtree split.
To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).