Skip to content

Commit d819458

Browse files
standardise on indexes
1 parent a77902a commit d819458

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

.textlintrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ rules:
2828
- 'bug[- ]fix(es)?'
2929
- 'readme(s)?'
3030
- 'to-?do(s)?(?=[ ,.])'
31+
- 'indexes\\b'
3132
terms:
3233
- Actix
3334
- Ajax
@@ -140,6 +141,7 @@ rules:
140141
- ['http[ /]?2(?:\.0)?', HTTP/2]
141142
- [he(/| or )she, they]
142143
- [\(s\)he, they]
144+
- ["indices\\b", "indexes"]
143145
- ["id['’]?s", IDs]
144146
- # Capitalize Java, but NOT for strings like:
145147
# - File names: file.java
@@ -183,3 +185,4 @@ rules:
183185
# - ["(auto(matic)?[- ])?instrumentation (module|package)", "instrumentation library"]
184186
# - ["(auto(matic)?[- ])?instrumentation (modules|packages)", "instrumentation libraries"]
185187
- snake_case
188+
- location_indices

oteps/0066-separate-context-propagation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ from the current span.
102102
### Correlations API
103103

104104
In addition to trace propagation, OpenTelemetry provides a simple mechanism for
105-
propagating indices, called the Correlations API. Correlations are
105+
propagating indexes, called the Correlations API. Correlations are
106106
intended for indexing observability events in one service with attributes
107107
provided by a prior service in the same transaction. This helps to establish a
108108
causal relationship between these events. For example, determining that a

oteps/profiles/0239-profiles-data-model.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ message Profile {
409409
// should not be used to store any machine-readable information, it is only
410410
// for human-friendly content. The profile must stay functional if this field
411411
// is cleaned.
412-
repeated int64 comment = 13; // Indices into string table.
412+
repeated int64 comment = 13; // Indexes into string table.
413413
// Index into the string table of the type of the preferred sample
414414
// value. If unset, clients should default to the last sample value.
415415
int64 default_sample_type = 14;
@@ -515,7 +515,7 @@ message ValueType {
515515
// augmented with auxiliary information like the thread-id, some
516516
// indicator of a higher level request being handled etc.
517517
message Sample {
518-
// The indices recorded here correspond to locations in Profile.location.
518+
// The indexes recorded here correspond to locations in Profile.location.
519519
// The leaf is at location_index[0]. [deprecated, superseded by locations_start_index / locations_length]
520520
repeated uint64 location_index = 1;
521521
// locations_start_index along with locations_length refers to to a slice of locations in Profile.location.
@@ -911,7 +911,7 @@ is cleaned.
911911

912912
##### Field `default_sample_type`
913913

914-
Indices into string table.
914+
Indexes into string table.
915915
Index into the string table of the type of the preferred sample
916916
value. If unset, clients should default to the last sample value.
917917
</details>
@@ -944,7 +944,7 @@ indicator of a higher level request being handled etc.
944944

945945
##### Field `location_index`
946946

947-
The indices recorded here correspond to locations in Profile.location.
947+
The indexes recorded here correspond to locations in Profile.location.
948948
The leaf is at location_index[0]. [deprecated, superseded by locations_start_index / locations_length]
949949

950950
##### Field `locations_start_index`
@@ -1431,7 +1431,7 @@ In the process of refining the data model, multiple alternative representations
14311431
14321432
* `pprof` representation is data in original pprof format.
14331433
* `denormalized` representation, where all messages are embedded and no references by index are used. This is the simplest representation, but it is also the least efficient (by a huge margin) in terms of CPU utilization, memory consumption and size of the resulting protobuf payload.
1434-
* `normalized` representation, where messages that repeat often are stored in separate tables and are referenced by indices. See [this chapter](#relationships-between-messages) for more details. This technique reduces the size of the resulting protobuf payload and the number of objects that need to be allocated to parse such payload.
1434+
* `normalized` representation, where messages that repeat often are stored in separate tables and are referenced by indexes. See [this chapter](#relationships-between-messages) for more details. This technique reduces the size of the resulting protobuf payload and the number of objects that need to be allocated to parse such payload.
14351435
* `arrays` representation, which is based on `normalized` representation, but uses arrays of integers instead of arrays of structures to represent messages. It further reduces the number of allocations, and the size of the resulting protobuf payload.
14361436
* `pprofextended` is a modified `pprof` representation. It is the one presented in this OTEP.
14371437

oteps/trace/4673-experimental-probability-sampling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ predetermined list of seeds.
932932
} {
933933
```
934934

935-
Note that seed indices in the example above have what appears to be
935+
Note that seed indexes in the example above have what appears to be
936936
the correct distribution. The five 0s, two 1s, five 2s, one 3s, and
937937
one 4 demonstrate that it is relatively easy to find examples where
938938
there is exactly one failure. Probability 0.001, with seed index 6 in

specification/common/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ However, if it is impossible to make sure that no `null` values are accepted
6868
processors / exporters as `null`). If exporters do not support exporting `null`
6969
values, they MAY replace those values by 0, `false`, or empty strings.
7070
This is required for map/dictionary structures represented as two arrays with
71-
indices that are kept in sync (e.g., two attributes `header_keys` and `header_values`,
71+
indexes that are kept in sync (e.g., two attributes `header_keys` and `header_values`,
7272
both containing an array of strings to represent a mapping
7373
`header_keys[i] -> header_values[i]`).
7474

specification/metrics/data-model.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,8 @@ index `offset+i`.
611611
For a given range, positive or negative:
612612

613613
- Bucket index `0` counts measurements in the range `(1, base]`
614-
- Positive indices correspond with absolute values greater than `base`
615-
- Negative indices correspond with absolute values less than or equal to 1
614+
- Positive indexes correspond with absolute values greater than `base`
615+
- Negative indexes correspond with absolute values less than or equal to 1
616616
- There are `2**scale` buckets between successive powers of 2.
617617

618618
For example, with `scale=3` there are `2**3` buckets between 1 and 2.
@@ -675,9 +675,9 @@ SHOULD ensure that the index of any encoded bucket falls within the
675675
range of a signed 32-bit integer. This recommendation is applied to
676676
limit the width of integers used in standard processing pipelines such
677677
as the OpenTelemetry Collector. The wire-level protocol could be
678-
extended for 64-bit bucket indices in a future release.
678+
extended for 64-bit bucket indexes in a future release.
679679

680-
Producers use a mapping function to compute bucket indices. Producers
680+
Producers use a mapping function to compute bucket indexes. Producers
681681
are presumed to support IEEE double-width floating-point numbers with
682682
11-bit exponent and 52-bit significand. The pseudo-code below for
683683
mapping values to exponents refers to the following constants:
@@ -713,8 +713,8 @@ reference implementations.
713713
For scale zero, the index of a value equals its normalized base-2
714714
exponent, meaning the value of *exponent* in the base-2 fractional
715715
representation `1._significand_ * 2**_exponent_`. Normal IEEE 754
716-
double-width floating point values have indices in the range
717-
`[-1022, +1023]` and subnormal values have indices in the range
716+
double-width floating point values have indexes in the range
717+
`[-1022, +1023]` and subnormal values have indexes in the range
718718
`[-1074, -1023]`. This may be written as:
719719

720720
```golang
@@ -787,7 +787,7 @@ func MapToIndexScale0(value float64) int {
787787
For negative scales, the index of a value equals the normalized
788788
base-2 exponent (as by `MapToIndexScale0()` above) shifted to the right
789789
by `-scale`. Note that because of sign extension, this shift performs
790-
correct rounding for the negative indices. This may be written as:
790+
correct rounding for the negative indexes. This may be written as:
791791

792792
```golang
793793
// MapToIndexNegativeScale computes a bucket index for scales <= 0.
@@ -932,14 +932,14 @@ such values counted in the adjacent buckets.
932932

933933
#### ExponentialHistogram: Consumer Recommendations
934934

935-
ExponentialHistogram bucket indices are expected to map into buckets
935+
ExponentialHistogram bucket indexes are expected to map into buckets
936936
where both the upper and lower boundaries can be represented
937937
using IEEE 754 double-width floating point values. Consumers MAY
938938
round the unrepresentable boundary of a partially representable bucket
939939
index to the nearest representable value.
940940

941941
Consumers SHOULD reject ExponentialHistogram data with `scale` and
942-
bucket indices that overflow or underflow this representation.
942+
bucket indexes that overflow or underflow this representation.
943943
Consumers that reject such data SHOULD warn the user through error
944944
logging that out-of-range data was received.
945945

0 commit comments

Comments
 (0)