Skip to content

Commit

Permalink
Ensure helper enums are consistently declared
Browse files Browse the repository at this point in the history
The changes in this PR do not affect wire formats in any way
since these are helper enums. This is not a breaking change
for the protocol.

This is a breaking change for the generated code.

This change is the smaller subset of open-telemetry#397
  • Loading branch information
tigrannajaryan committed Jun 21, 2022
1 parent 9e7c1b3 commit 401b3f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions opentelemetry/proto/logs/v1/logs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ enum SeverityNumber {

// Masks for LogRecord.flags field.
enum LogRecordFlags {
LOG_RECORD_FLAG_UNSPECIFIED = 0;
LOG_RECORD_FLAG_TRACE_FLAGS_MASK = 0x000000FF;
LOG_RECORD_FLAGS_UNSPECIFIED = 0;
LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 0x000000FF;
}

// A log record according to OpenTelemetry Log Data Model:
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,15 @@ enum AggregationTemporality {
// enum is a bit-mask. To test the presence of a single flag in the flags of
// a data point, for example, use an expression like:
//
// (point.flags & FLAG_NO_RECORDED_VALUE) == FLAG_NO_RECORDED_VALUE
// (point.flags & DATA_POINTS_FLAGS_NO_RECORDED_VALUE) == DATA_POINTS_FLAGS_NO_RECORDED_VALUE
//
enum DataPointFlags {
FLAG_NONE = 0;
DATA_POINTS_FLAGS_NONE = 0;

// This DataPoint is valid but has no recorded value. This value
// SHOULD be used to reflect explicitly missing data in a series, as
// for an equivalent to the Prometheus "staleness marker".
FLAG_NO_RECORDED_VALUE = 1;
DATA_POINTS_FLAGS_NO_RECORDED_VALUE = 1;

// Bits 2-31 are reserved for future use.
}
Expand Down

0 comments on commit 401b3f8

Please sign in to comment.