-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add DiodeOTLPClient #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coverage Report
|
|||||||||||||||||||||||||||||||||||
MicahParks
approved these changes
Oct 27, 2025
leoparente
commented
Oct 27, 2025
leoparente
commented
Oct 27, 2025
leoparente
commented
Oct 27, 2025
jajeffries
approved these changes
Oct 29, 2025
mfiedorowicz
approved these changes
Oct 30, 2025
Member
mfiedorowicz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new OTLP (OpenTelemetry Protocol) client to the Diode SDK, allowing ingestion entities to be exported as OTLP log records to a gRPC endpoint. This addition is accompanied by updates to documentation, dependency management, and comprehensive tests to ensure correct behavior and error handling.
Key changes:
OTLP Client Implementation
DiodeOTLPClientclass inclient.pythat serializes ingestion entities as OpenTelemetry log records and exports them to an OTLP endpoint over gRPC. This client supports TLS configuration and raises a customOTLPClientErroron export failure. ([netboxlabs/diode/sdk/client.pyR416-R644](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-d7321aa83f5274dadf12aeab1b43eecc71c8e76d32add37792a05e76eac5e280R416-R644))OTLPClientErrorexception inexceptions.pyto provide detailed error reporting when OTLP exports fail. ([netboxlabs/diode/sdk/exceptions.pyR48-R86](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-6c7ac0ab905078101cf9319b9fa2183bd3111b865c494028e6296bc99e690a4aR48-R86))SDK and Dependency Updates
DiodeOTLPClientin the SDK’s public interface (__init__.py) and addedopentelemetry-protoas a required dependency inpyproject.toml. ([[1]](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-20a572f336e16fca0b78ac87298b492fcfc0b33695083181de78b801a555dba7R8-R14),[[2]](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R31))Documentation
README.mdwith a usage example and description for the new OTLP client, including details about serialization, metadata, and TLS behavior. ([README.mdR152-R168](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R152-R168))Testing
DiodeOTLPClientto verify successful export, error handling, and secure channel setup intest_client.py. ([tests/test_client.pyR749-R847](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-0d92063e88430a02df61616c5f16b148b64ac4539d9cb9b8d883d5a23351b110R749-R847))[[1]](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-0d92063e88430a02df61616c5f16b148b64ac4539d9cb9b8d883d5a23351b110R19),[[2]](https://github.com/netboxlabs/diode-sdk-python/pull/68/files#diff-0d92063e88430a02df61616c5f16b148b64ac4539d9cb9b8d883d5a23351b110L27-R32))