Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ray/observability/open_telemetry_metric_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#pragma once

#include <cstdint>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This change correctly fixes the build with GCC 15. However, since the placement of <cstdint> is a workaround and intentionally violates the project's standard include order (as you noted regarding format.sh), it's crucial to add a comment. This will prevent other developers from 'fixing' the order in the future and reintroducing the build failure. The comment should explain why this specific order is necessary and refer to the relevant issues.

Suggested change
#include <cstdint>
// Included before opentelemetry headers to fix build with GCC 15. This is a
// workaround for a missing include in opentelemetry-cpp, see
// https://github.com/open-telemetry/opentelemetry-cpp/pull/3240.
// See Ray issue #56242. Do not re-order.
#include <cstdint>

#include <opentelemetry/metrics/meter.h>
#include <opentelemetry/metrics/observer_result.h>
#include <opentelemetry/metrics/sync_instruments.h>
Expand Down