fix(auditlog-ng): select OTLP transport from OTEL_EXPORTER_OTLP_PROTOCOL#85
Merged
jeanscherf merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
Read OTEL_EXPORTER_OTLP_PROTOCOL (default: grpc) and instantiate either GRPCLogExporter or HTTPLogExporter accordingly, mirroring the same pattern used for metrics in _provider.py (PR #63).
LucasAlvesSoares
approved these changes
Apr 28, 2026
NicoleMGomes
approved these changes
Apr 28, 2026
Map AuditLogNGConfig fields to their HTTP exporter equivalents: - compression -> HTTPCompression.Gzip/NoCompression - ca_file -> certificate_file - key_file -> client_key_file - cert_file -> client_certificate_file
LucasAlvesSoares
approved these changes
Apr 29, 2026
…version Tests were patching the removed OTLPLogExporter attribute; update to patch _create_log_exporter instead. Bump version to 0.12.1 as required by CI.
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
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.
Description
The
auditlog_ngclient hardcoded the gRPC OTLP log exporter, ignoringOTEL_EXPORTER_OTLP_PROTOCOL. This PR extracts a_create_log_exporter()function that reads the env var (defaulting togrpc) and instantiates eitherGRPCLogExporterorHTTPLogExporter— the same pattern used for metrics in_provider.py(PR #63).Type of Change
How to Test
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufand instantiate anAuditClient— the HTTP exporter is usedgrpc) — the gRPC exporter is used as beforeuv run pytest tests/core/unit/auditlog_ng/unit/test_client.py -vTestAuditClientProtocoltestsChecklist
Breaking Changes
None. Defaults to
grpc, preserving existing behaviour for users who do not setOTEL_EXPORTER_OTLP_PROTOCOL.Additional Notes
Mirrors the pattern introduced for metrics in PR #63.