feat: add OTLP logging export#635
Conversation
Adds OTLP logging handler that exports logs to OpenTelemetry collectors. Configured via MELLEA_LOGS_OTLP and OTEL_EXPORTER_OTLP_LOGS_ENDPOINT environment variables. Integrates with existing FancyLogger infrastructure. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
jakelorocco
left a comment
There was a problem hiding this comment.
two small changes but looks good overall; thank you
Renamed function for clarity to indicate it's specifically for log handling. Updated all references in telemetry module, core utils, and tests. Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
jakelorocco
left a comment
There was a problem hiding this comment.
code lgtm; I don't have otel setup right now so I'm trusting the tests work
There was a problem hiding this comment.
These docs probably need to make their way into the published docs website at some point right?
There was a problem hiding this comment.
do they not? I've just been making updates to the docs where they already existed.
There was a problem hiding this comment.
no, only things in docs/docs are added to the website proper
API docs will get picked up, but not the docs/dev/telemetry.md file
There was a problem hiding this comment.
I'll take a look and see if it's a quick fix, otherwise I'll open an issue
Ran all the tests locally, all passing, LGTM. |
c4cb59f
Misc PR
Type of PR
Description
MVP implementation of OTLP log export for Mellea's telemetry stack. This is the first phase of #460 — focused on getting logs into an observability backend. Enhanced handlers (file rotation, webhook, trace context injection) are deferred to Phase 2 (blocked in part by #458 and #459).
What's included:
mellea/telemetry/logging.pymodule withget_otlp_handler()FancyLoggerintegration — attaches OTLP handler when enabledOTEL_EXPORTER_OTLP_LOGS_ENDPOINTwith fallback toOTEL_EXPORTER_OTLP_ENDPOINTTesting