Skip to content

Add logjet export as a sharedlib#7

Merged
isbm merged 12 commits intomasterfrom
isbm-sharedlib
Mar 17, 2026
Merged

Add logjet export as a sharedlib#7
isbm merged 12 commits intomasterfrom
isbm-sharedlib

Conversation

@isbm
Copy link
Member

@isbm isbm commented Mar 17, 2026

To C/C++ fellas: take it nice and easy! 😉

@isbm isbm requested a review from Copilot March 17, 2026 15:30
@isbm isbm added documentation Improvements or additions to documentation feature New feature or request labels Mar 17, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Rust cdylib (liblogjet) exposing a small C ABI for exporting OTLP logs, plus a C++ demo that loads the shared library and sends logs into ljd. Also enhances ljx view to display OTLP resource/record attributes in the modal info view (with styling) and adds tests around attribute listing.

Changes:

  • Introduce liblogjet crate with C ABI (HTTP + gRPC OTLP exporters) and a public C header.
  • Add a C++ shared-library demo (script + config + sample logger) to exercise the FFI flow end-to-end.
  • Update ljx view modal info to enumerate OTLP attributes and visually distinguish “standard” vs custom attributes; add test coverage.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ljx/src/commands/view.rs List OTLP attributes in the info modal, add formatting/styling helpers, add tests
liblogjet/src/lib.rs New Rust cdylib providing C ABI to emit OTLP logs over HTTP/gRPC
liblogjet/include/liblogjet.h Public C header for the FFI API
liblogjet/Cargo.toml New crate manifest configuring cdylib build and deps
demo/cpp-shared-lib/run-demo.sh Script to build/run the C++ demo and open ljx view
demo/cpp-shared-lib/ljd.conf Demo config for file-backed ingestion via OTLP/gRPC
demo/cpp-shared-lib/liblogjet.so Checked-in symlink/path intended to point at built shared object
demo/cpp-shared-lib/cpp-logger.cpp C++ example that dlopens the library and emits logs
demo/cpp-shared-lib/README.md Demo documentation/instructions
demo/README.md Add demo entry point to the demo index
Cargo.toml Add liblogjet to the workspace members
Comments suppressed due to low confidence (1)

demo/cpp-shared-lib/liblogjet.so:1

  • This appears to be a committed symlink (or symlink-like file) pointing to an absolute, machine-specific path under /home/.... That will be invalid for other developers/CI. Since run-demo.sh already creates the symlink via ln -sf, it’s better to remove this from version control and add it to .gitignore, or commit a relative symlink target (e.g., ../../target/debug/libliblogjet.so) if you really want it present in the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isbm isbm merged commit b3bde65 into master Mar 17, 2026
4 checks passed
@isbm isbm deleted the isbm-sharedlib branch March 17, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants