[FEATURE] Otel: split OTEL_METRICS_INCLUDE_SESSION_ID for logs and metrics
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
OTEL_METRICS_INCLUDE_SESSION_ID is the same field used to add session id to both metrics and events: https://code.claude.com/docs/en/monitoring-usage#standard-attributes. This is immensely helpful in events/logs, but causes high cardinality in metrics. I'd love to turn this on for logs but turn it off for metrics.
Proposed Solution
Add a second setting to split up the configurability for logs and metrics including session id.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
My company runs the otel collector for both events and metrics. We pay for managed prometheus and session id has too much cardinality and would balloon costs, so we've disabled it. However, when doing analysis on logs/events, it's hard to join data within a session for a user because there are no identifiers.
Additional Context
_No response_