Skip to content

feat(otel): make otel logging level configurable#7271

Merged
codefromthecrypt merged 2 commits intomainfrom
otel-level
Feb 17, 2026
Merged

feat(otel): make otel logging level configurable#7271
codefromthecrypt merged 2 commits intomainfrom
otel-level

Conversation

@codefromthecrypt
Copy link
Collaborator

Summary

Make the OTLP log filter level configurable instead of hardcoded to WARN. Follows the Rust community pattern: RUST_LOGOTEL_LOG_LEVEL → default info.

Type of Change

  • Feature

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

No exporter — no OTel output in console:

$ ./target/release/goose run -t "hello"
● new session · openai gpt-5-nano
    20260217_5 · /Users/codefromthecrypt/oss/goose-goosed
Hello! Happy to help with Goose.

Default (info) — shows INFO log records:

$ OTEL_LOGS_EXPORTER=console ./target/release/goose run -t "hello"
Logs
Resource
	 ->  service.name=String(Static("goose"))
	 ->  service.namespace=String(Static("goose"))
	 ->  telemetry.sdk.language=String(Static("rust"))
	 ->  service.version=String(Static("1.24.0"))
	 ->  telemetry.sdk.version=String(Static("0.31.0"))
	 ->  telemetry.sdk.name=String(Static("opentelemetry"))
Log #0
	 Instrumentation Scope: InstrumentationScope { name: "", version: None, schema_url: None, attributes: [] }
	 EventName: "event crates/goose-cli/src/cli.rs:1439"
	 Target (Scope): "goose_cli::cli"
	 Observed Timestamp: 2026-02-17 15:03:21.868813
	 SeverityText: "INFO"
	 SeverityNumber: Info
	 Body: String(Owned("CLI command executed"))
	 Attributes:
		 ->  counter.goose.cli_commands: Int(1)
		 ->  command: String(Owned("run"))

WARN only — no INFO log records in output:

$ OTEL_LOG_LEVEL=warn OTEL_LOGS_EXPORTER=console ./target/release/goose run -t "hello"
● new session · openai gpt-5-nano
    20260217_4 · /Users/codefromthecrypt/oss/goose-goosed
Hello! Nice to meet you. I'm ready to help with the goose-goosed repo.

Related Issues

Continues ENV support from #7144

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Copilot AI review requested due to automatic review settings February 17, 2026 15:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the OTLP log filter level configurable (instead of hardcoded to WARN) by resolving a level from environment variables with precedence RUST_LOGOTEL_LOG_LEVEL → default info.

Changes:

  • Added parse_level() + otel_logs_level() to resolve an OTLP log level from env vars.
  • Updated the OTLP logs filter to use the resolved level.
  • Extended the OTLP tests and generalized env cleanup to include OTEL_LOG_LEVEL and override keys.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
}

fn clear_otel_env(overrides: &[(&str, &str)]) -> OtelTestGuard {
fn clear_otel_env(overrides: &[(&'static str, &'static str)]) -> OtelTestGuard {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rejigged this so that otel tests that now interact with RUST_LOG can be tested without conflating that generally with an otel env

@codefromthecrypt codefromthecrypt added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit b26d7af Feb 17, 2026
20 checks passed
@codefromthecrypt codefromthecrypt deleted the otel-level branch February 17, 2026 22:58
jh-block added a commit that referenced this pull request Feb 18, 2026
* origin/main: (49 commits)
  chore: show important keys for provider configuration (#7265)
  fix: subrecipe relative path with summon (#7295)
  fix extension selector not displaying the correct enabled extensions (#7290)
  Use the working dir from the session (#7285)
  Fix: Minor logging uplift for debugging of prompt injection mitigation (#7195)
  feat(otel): make otel logging level configurable (#7271)
  docs: add documentation for Top Of Mind extension (#7283)
  Document gemini 3 thinking levels (#7282)
  docs: stream subagent tool calls (#7280)
  Docs: delete custom provider in desktop (#7279)
  Everything is streaming (#7247)
  openai: responses models and hardens event streaming handling (#6831)
  docs: disable ai session naming (#7194)
  Added cmd to validate bundled extensions json (#7217)
  working_dir usage more clear in add_extension (#6958)
  Use Canonical Models to set context window sizes (#6723)
  Set up direnv and update flake inputs (#6526)
  fix: restore subagent tool call notifications after summon refactor (#7243)
  fix(ui): preserve server config values on partial provider config save (#7248)
  fix(claude-code): allow goose to run inside a Claude Code session (#7232)
  ...
aharvard added a commit that referenced this pull request Feb 18, 2026
* origin/main:
  feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options (#7277)
  fix(openai): support "reasoning" field alias in streaming deltas (#7294)
  fix(ui): revert app-driven iframe width and send containerDimensions per ext-apps spec (#7300)
  New OpenAI event (#7301)
  ci: add fork guards to scheduled workflows (#7292)
  fix: allow ollama input limit override (#7281)
  chore: show important keys for provider configuration (#7265)
  fix: subrecipe relative path with summon (#7295)
  fix extension selector not displaying the correct enabled extensions (#7290)
  Use the working dir from the session (#7285)
  Fix: Minor logging uplift for debugging of prompt injection mitigation (#7195)
  feat(otel): make otel logging level configurable (#7271)
  docs: add documentation for Top Of Mind extension (#7283)
  Document gemini 3 thinking levels (#7282)
  docs: stream subagent tool calls (#7280)
  Docs: delete custom provider in desktop (#7279)

# Conflicts:
#	ui/desktop/src/components/McpApps/McpAppRenderer.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments