Skip to content

feat(cli): log warning if otlp feature is not enabled#19648

Merged
shekhirin merged 3 commits intomainfrom
alexey/otlp-tracing-logs
Nov 11, 2025
Merged

feat(cli): log warning if otlp feature is not enabled#19648
shekhirin merged 3 commits intomainfrom
alexey/otlp-tracing-logs

Conversation

@shekhirin
Copy link
Copy Markdown
Member

@shekhirin shekhirin commented Nov 11, 2025

Addresses two issues:

  1. OTLP initialization log wasn't printed to stdout, because trace layers initialization happened after we emitted that log.
  2. When OTLP tracing arguments were provided but feature is not enabled, we silently didn't initialize the layer.

Additionally, deduplicates the OTLP tracing initialization logic between reth-ethereum-cli and reth-optimism-cli crates.

Demonstration

cargo r --no-default-features --quiet node --chain hoodi --tracing-otlp
2025-11-11T16:03:09.066553Z  INFO Initialized tracing, debug log directory: /Users/shekhirin/Library/Caches/reth/logs/hoodi
2025-11-11T16:03:09.066680Z  WARN Provided OTLP tracing arguments do not have effect, compile with the `otlp` feature
cargo r --quiet node --chain hoodi --tracing-otlp
2025-11-11T16:03:37.324707Z  INFO Initialized tracing, debug log directory: /Users/shekhirin/Library/Caches/reth/logs/hoodi
2025-11-11T16:03:37.324869Z  INFO Started OTLP Http tracing export to http://localhost:4318/v1/traces

@shekhirin shekhirin added the C-enhancement New feature or request label Nov 11, 2025
@shekhirin shekhirin added A-observability Related to tracing, metrics, logs and other observability tools A-cli Related to the reth CLI labels Nov 11, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Nov 11, 2025
@shekhirin shekhirin force-pushed the alexey/otlp-tracing-logs branch from 73b220a to 5777f24 Compare November 11, 2025 13:32
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 11, 2025

CodSpeed Performance Report

Merging #19648 will not alter performance

Comparing alexey/otlp-tracing-logs (ce7e789) with main (3a672ee)

Summary

✅ 81 untouched

@shekhirin shekhirin force-pushed the alexey/otlp-tracing-logs branch from 66dd514 to c604b62 Compare November 11, 2025 16:04
@shekhirin shekhirin marked this pull request as ready for review November 11, 2025 16:12
Copy link
Copy Markdown
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

very nice

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Nov 11, 2025
@shekhirin shekhirin enabled auto-merge November 11, 2025 16:24
@shekhirin shekhirin added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit c780256 Nov 11, 2025
43 checks passed
@shekhirin shekhirin deleted the alexey/otlp-tracing-logs branch November 11, 2025 16:53
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Nov 11, 2025
@lean-apple
Copy link
Copy Markdown
Contributor

Thanks @shekhirin for the refactor to avoid the duplication of code !

theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 22, 2026
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Related to the reth CLI A-observability Related to tracing, metrics, logs and other observability tools C-enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants