Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjinks/opentelemetry_exporter_syslog_logs
A Syslog Exporter for OpenTelemetry Logs (C++)
https://github.com/sjinks/opentelemetry_exporter_syslog_logs
log log-export opentelemetry opentelemetry-exporter syslog
Last synced: 27 days ago
JSON representation
A Syslog Exporter for OpenTelemetry Logs (C++)
- Host: GitHub
- URL: https://github.com/sjinks/opentelemetry_exporter_syslog_logs
- Owner: sjinks
- License: mit
- Created: 2024-09-20T22:47:44.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-10-23T19:45:43.000Z (3 months ago)
- Last Synced: 2024-10-24T06:41:11.052Z (3 months ago)
- Topics: log, log-export, opentelemetry, opentelemetry-exporter, syslog
- Language: C++
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# opentelemetry_exporter_syslog_logs
[![Build and Test](https://github.com/sjinks/opentelemetry_exporter_syslog_logs/actions/workflows/ci.yml/badge.svg)](https://github.com/sjinks/opentelemetry_exporter_syslog_logs/actions/workflows/ci.yml)
[![CodeQL](https://github.com/sjinks/opentelemetry_exporter_syslog_logs/actions/workflows/codeql.yml/badge.svg)](https://github.com/sjinks/opentelemetry_exporter_syslog_logs/actions/workflows/codeql.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=sjinks_opentelemetry_exporter_syslog_logs&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=sjinks_opentelemetry_exporter_syslog_logs)Exports OpenTelemetry log records to syslog.
## Installation
```shell
cmake -B build
cmake --build build
cmake --install build
```**Dependencies:** [opentelemetry-cpp](https://github.com/open-telemetry/opentelemetry-cpp) >= 1.11.0
**Development Dependencies:** [Google Test with GMock](https://github.com/google/googletest) (will be downloaded if not present)
### CMake Options
| Option Name | Description | Default Value |
|---------------------------|------------------------------------------|---------------|
| `WITH_TESTING` | Whether to enable tests | `ON` |
| `INSTALL_SYSLOG_EXPORTER` | Whether to install the syslog exporter | `ON` |## Usage
```cmake
find_package(wwa_opentelemetry_exporter_syslog_logs CONFIG REQUIRED)
target_link_libraries(
my_target
PRIVATE
wwa::opentelemetry::syslog_log_record_exporter
)
``````cpp
#include
#include
#include
#includevoid init_logging()
{
auto exporter = wwa::opentelemetry::exporter::logs::SyslogLogRecordExporterFactory::Create(
"syslog-identifier"
);auto processor = std::make_unique(
std::move(exporter)
);auto provider = std::make_shared(
std::move(processor)
);opentelemetry::logs::Provider::SetLoggerProvider(
std::static_pointer_cast(provider)
);
}
```See [ci/CMakeLists.txt](ci/CMakeLists.txt) and [ci/main.cpp](ci/main.cpp) for an example.