Skip to content

Commit 9eaf222

Browse files
authored
Merge pull request #143 from shelltime/claude/issue-142-20251216-0558
feat(otel): add complete OTEL configuration fields
2 parents d3cb2a0 + cda5dce commit 9eaf222

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

model/ccotel_env.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ func NewBashCCOtelEnvService() CCOtelEnvService {
115115
"export OTEL_LOGS_EXPORTER=otlp",
116116
"export OTEL_EXPORTER_OTLP_PROTOCOL=grpc",
117117
"export OTEL_EXPORTER_OTLP_ENDPOINT=" + ccOtelEndpoint,
118+
"export OTEL_METRIC_EXPORT_INTERVAL=10000",
119+
"export OTEL_LOGS_EXPORT_INTERVAL=5000",
120+
"export OTEL_LOG_USER_PROMPTS=1",
121+
"export OTEL_METRICS_INCLUDE_SESSION_ID=true",
122+
"export OTEL_METRICS_INCLUDE_VERSION=true",
123+
"export OTEL_METRICS_INCLUDE_ACCOUNT_UUID=true",
124+
"export OTEL_RESOURCE_ATTRIBUTES=\"user.name=$(whoami),machine.name=$(hostname),team.id=shelltime\"",
118125
ccOtelMarkerEnd,
119126
}
120127

@@ -200,6 +207,13 @@ func NewZshCCOtelEnvService() CCOtelEnvService {
200207
"export OTEL_LOGS_EXPORTER=otlp",
201208
"export OTEL_EXPORTER_OTLP_PROTOCOL=grpc",
202209
"export OTEL_EXPORTER_OTLP_ENDPOINT=" + ccOtelEndpoint,
210+
"export OTEL_METRIC_EXPORT_INTERVAL=10000",
211+
"export OTEL_LOGS_EXPORT_INTERVAL=5000",
212+
"export OTEL_LOG_USER_PROMPTS=1",
213+
"export OTEL_METRICS_INCLUDE_SESSION_ID=true",
214+
"export OTEL_METRICS_INCLUDE_VERSION=true",
215+
"export OTEL_METRICS_INCLUDE_ACCOUNT_UUID=true",
216+
"export OTEL_RESOURCE_ATTRIBUTES=\"user.name=$(whoami),machine.name=$(hostname),team.id=shelltime\"",
203217
ccOtelMarkerEnd,
204218
}
205219

@@ -282,6 +296,13 @@ func NewFishCCOtelEnvService() CCOtelEnvService {
282296
"set -gx OTEL_LOGS_EXPORTER otlp",
283297
"set -gx OTEL_EXPORTER_OTLP_PROTOCOL grpc",
284298
"set -gx OTEL_EXPORTER_OTLP_ENDPOINT " + ccOtelEndpoint,
299+
"set -gx OTEL_METRIC_EXPORT_INTERVAL 10000",
300+
"set -gx OTEL_LOGS_EXPORT_INTERVAL 5000",
301+
"set -gx OTEL_LOG_USER_PROMPTS 1",
302+
"set -gx OTEL_METRICS_INCLUDE_SESSION_ID true",
303+
"set -gx OTEL_METRICS_INCLUDE_VERSION true",
304+
"set -gx OTEL_METRICS_INCLUDE_ACCOUNT_UUID true",
305+
"set -gx OTEL_RESOURCE_ATTRIBUTES \"user.name=$(whoami),machine.name=$(hostname),team.id=shelltime\"",
285306
ccOtelMarkerEnd,
286307
}
287308

0 commit comments

Comments
 (0)