-
Notifications
You must be signed in to change notification settings - Fork 849
Export logs to OTEL #38607
Copy link
Copy link
Closed
Labels
#g-security-complianceSecurity & Compliance product groupSecurity & Compliance product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.Ready to write code. Scheduled in a release. See "Making changes" in handbook.storyA user story defining an entire featureA user story defining an entire feature~engineering-initiatedEngineering-initiated story, such as a bug, refactor, or contributor experience improvement.Engineering-initiated story, such as a bug, refactor, or contributor experience improvement.
Milestone
Metadata
Metadata
Assignees
Labels
#g-security-complianceSecurity & Compliance product groupSecurity & Compliance product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.Ready to write code. Scheduled in a release. See "Making changes" in handbook.storyA user story defining an entire featureA user story defining an entire feature~engineering-initiatedEngineering-initiated story, such as a bug, refactor, or contributor experience improvement.Engineering-initiated story, such as a bug, refactor, or contributor experience improvement.
Type
Projects
Status
Done
Status
Done
Status
Done
Goal
Original requests
Resources
Changes
Product
logging.otel_logs_enabledoption (FLEET_LOGGING_OTEL_LOGS_ENABLEDenv var) to enable OTEL log exportEngineering
Implementation
POC (not using slog): #38746
Add config option
logging.otel_logs_enabled(FLEET_LOGGING_OTEL_LOGS_ENABLEDenv var) toserver/config/config.goAdd
OtelLogsEnabledfield tologging.Optionsinserver/platform/logging/logging.goInitialize OTEL LoggerProvider in
cmd/fleet/serve.gowhenOtelLogsEnabledis true:OTEL_EXPORTER_OTLP_ENDPOINTenv var)Create multi-handler in
NewSlogLoggerwhenOtelLogsEnabledis true:Trace correlation: When a log is sent to the OTEL collector, if a span is active in the context, the otelslog bridge automatically correlates the log with the trace (no extra work needed).
Add
logging.otel_logs_enabledserver option to contributor docs.Add contributor docs how to use this.
Dependencies
QA
Risk assessment
Test plan
Not needed since we have not documented OTEL support in our public docs.
Confirmation