Skip to content

Fix internal logging macros#1985

Merged
jmacd merged 1 commit intoopen-telemetry:mainfrom
cijothomas:cijothomas/fixeventmacros
Feb 6, 2026
Merged

Fix internal logging macros#1985
jmacd merged 1 commit intoopen-telemetry:mainfrom
cijothomas:cijothomas/fixeventmacros

Conversation

@cijothomas
Copy link
Copy Markdown
Member

@cijothomas cijothomas commented Feb 6, 2026

Reverting #1973
Fixing the empty "" from our internal macros, that caused the message="user friendly message here" from being omitted in stdout!

Taking https://github.com/open-telemetry/otel-arrow/blob/main/rust/otap-dataflow/crates/controller/src/lib.rs#L668-L671 as example

otel_warn!(
                "core_affinity.set_failed",
                message = "Failed to set core affinity for pipeline thread. Performance may be less predictable."
            );

Before

2026-02-06T22:15:09.891Z  WARN  otap-df-controller::core_affinity.set_failed (crates/controller/src/lib.rs:668): 

(Missing message!)

After (i.e with this PR)

2026-02-06T22:11:19.095Z  WARN  otap-df-controller::core_affinity.set_failed (crates/controller/src/lib.rs:668): Failed to set core affinity for pipeline thread. Performance may be less predictable.

(Message is back)

"message" is already special cased in this repo, OTel Rust repo, and tracing itself. Passing user friendly string as an attribute named "message" is faster too!

Also, we avoid the less friendly syntax - #1981 (comment)

@cijothomas cijothomas requested a review from a team as a code owner February 6, 2026 22:19
@github-actions github-actions Bot added the rust Pull requests that update Rust code label Feb 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.76%. Comparing base (4f64cf4) to head (c9e50ed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1985      +/-   ##
==========================================
- Coverage   85.77%   85.76%   -0.01%     
==========================================
  Files         513      513              
  Lines      162920   162908      -12     
==========================================
- Hits       139737   139723      -14     
- Misses      22649    22651       +2     
  Partials      534      534              
Components Coverage Δ
otap-dataflow 87.58% <ø> (-0.01%) ⬇️
query_abstraction 80.61% <ø> (ø)
query_engine 90.23% <ø> (ø)
syslog_cef_receivers ∅ <ø> (∅)
otel-arrow-go 53.50% <ø> (ø)
quiver 92.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jmacd
Copy link
Copy Markdown
Contributor

jmacd commented Feb 6, 2026

😞 sorry, Cijo, for my eager button-pressing in #1973.

Copy link
Copy Markdown
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

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

Munch-free? Thank you.

@cijothomas
Copy link
Copy Markdown
Member Author

@jmacd @andborja I'll send a follow up to update the guidelines for Arrow contributors, so they know they can (and they should) use message="I love user friendly messages" whenever EventName is insufficient to express an event.

@jmacd jmacd enabled auto-merge February 6, 2026 22:32
@andborja
Copy link
Copy Markdown
Contributor

andborja commented Feb 6, 2026

This is not adding the message as body. I still prefer as it was, as it did not restrict the usage of message as attribute (it is more flexible).

@cijothomas
Copy link
Copy Markdown
Member Author

This is not adding the message as body. I still prefer as it was, as it did not restrict the usage of message as attribute (it is more flexible).

https://github.com/open-telemetry/otel-arrow/blob/main/rust/otap-dataflow/crates/telemetry/src/self_tracing/encoder.rs#L268-L269 "message" attribute becomes Body :)

@jmacd jmacd added this pull request to the merge queue Feb 6, 2026
Merged via the queue into open-telemetry:main with commit 3d8dc2c Feb 6, 2026
62 checks passed
@cijothomas cijothomas deleted the cijothomas/fixeventmacros branch February 6, 2026 22:56
@cijothomas
Copy link
Copy Markdown
Member Author

@jmacd @andborja I'll send a follow up to update the guidelines for Arrow contributors, so they know they can (and they should) use message="I love user friendly messages" whenever EventName is insufficient to express an event.

#1987 Guidance proposal with CI enforcement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants