From a172d2454f9963eaf9f054d49cf6b812e3f2fb98 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 13 May 2024 15:22:45 +0800 Subject: [PATCH] Fix typos again Found via `typos --format brief` --- CHANGELOG.md | 8 ++++---- apps/opentelemetry/src/otel_batch_processor.erl | 2 +- apps/opentelemetry/src/otel_simple_processor.erl | 2 +- apps/opentelemetry/src/otel_tracer_server.erl | 2 +- apps/opentelemetry/test/opentelemetry_SUITE.erl | 10 +++++----- apps/opentelemetry_api/include/opentelemetry.hrl | 2 +- apps/opentelemetry_api/src/opentelemetry.erl | 2 +- .../src/otel_propagator_text_map_composite.erl | 2 +- .../src/otel_meter_noop.erl | 2 +- .../src/otel_aggregation_histogram_explicit.erl | 6 +++--- .../src/otel_metric_exemplar_reservoir.erl | 8 ++++---- .../include/resource.hrl | 2 +- .../open_telemetry/semantic_conventions/resource.ex | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11acad32..a67a6958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,8 +73,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Add `instrument_unit` to view criteria](https://github.com/open-telemetry/opentelemetry-erlang/pull/604) - [Validate instrument name](https://github.com/open-telemetry/opentelemetry-erlang/pull/604) -- [Handle `explict_bucket_boundaries` advisory parameter](https://github.com/open-telemetry/opentelemetry-erlang/pull/628) -- [Rename `boundaries` to `explict_bucket_boundaries` in histogram explicit aggregation options](https://github.com/open-telemetry/opentelemetry-erlang/pull/628) +- [Handle `explicit_bucket_boundaries` advisory parameter](https://github.com/open-telemetry/opentelemetry-erlang/pull/628) +- [Rename `boundaries` to `explicit_bucket_boundaries` in histogram explicit aggregation options](https://github.com/open-telemetry/opentelemetry-erlang/pull/628) - [Allow creating wildcard views](https://github.com/open-telemetry/opentelemetry-erlang/pull/624) - [Exemplars support](https://github.com/open-telemetry/opentelemetry-erlang/pull/692) - [Metric @@ -484,9 +484,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Attribute values now validate against what is allowable per the specification rather than allowing anything the protobuf could encode. This may be breaking to some users who were relying on the incorrect behavior, such as allowing - dictionaries or non-homogenous lists/tuples. The one exception we have + dictionaries or non-homogeneous lists/tuples. The one exception we have kept is continuing to allow atoms in place of binaries for performance. -- Attribute values of type list/tuple must be homogenous. +- Attribute values of type list/tuple must be homogeneous. - Span start opts are now validated. Previously, opts underwent no validations. - Event and link attributes are now validated. Previously only span attributes were validated. diff --git a/apps/opentelemetry/src/otel_batch_processor.erl b/apps/opentelemetry/src/otel_batch_processor.erl index b0fd0626..fc368f65 100644 --- a/apps/opentelemetry/src/otel_batch_processor.erl +++ b/apps/opentelemetry/src/otel_batch_processor.erl @@ -95,7 +95,7 @@ current_tab_to_list(RegName) -> ets:tab2list(?CURRENT_TABLE(RegName)). -endif. -%% require a unique name to distiguish multiple batch processors while +%% require a unique name to distinguish multiple batch processors while %% still having a single name, instead of a possibly changing pid, to %% communicate with the processor %% @doc Starts a Batch Span Processor. diff --git a/apps/opentelemetry/src/otel_simple_processor.erl b/apps/opentelemetry/src/otel_simple_processor.erl index 24373991..8d07e593 100644 --- a/apps/opentelemetry/src/otel_simple_processor.erl +++ b/apps/opentelemetry/src/otel_simple_processor.erl @@ -64,7 +64,7 @@ -define(DEFAULT_EXPORTER_TIMEOUT_MS, timer:minutes(5)). -define(NAME_TO_ATOM(Name, Unique), list_to_atom(lists:concat([Name, "_", Unique]))). -%% require a unique name to distiguish multiple simple processors while +%% require a unique name to distinguish multiple simple processors while %% still having a single name, instead of a possibly changing pid, to %% communicate with the processor %% @doc Starts a Simple Span Processor. diff --git a/apps/opentelemetry/src/otel_tracer_server.erl b/apps/opentelemetry/src/otel_tracer_server.erl index 00e367e5..1d082daf 100644 --- a/apps/opentelemetry/src/otel_tracer_server.erl +++ b/apps/opentelemetry/src/otel_tracer_server.erl @@ -161,7 +161,7 @@ init_processor(SpanProcessorSup, ProcessorModule, Config) -> true -> try supervisor:start_child(SpanProcessorSup, [ProcessorModule, - %% use a unique reference to distiguish multiple processors of the same type while + %% use a unique reference to distinguish multiple processors of the same type while %% still having a single name, instead of a possibly changing pid, to %% communicate with the processor maps:merge(#{name => erlang:ref_to_list(erlang:make_ref())}, diff --git a/apps/opentelemetry/test/opentelemetry_SUITE.erl b/apps/opentelemetry/test/opentelemetry_SUITE.erl index c41db277..cb527585 100644 --- a/apps/opentelemetry/test/opentelemetry_SUITE.erl +++ b/apps/opentelemetry/test/opentelemetry_SUITE.erl @@ -1025,10 +1025,10 @@ too_many_attributes(Config) -> ?set_current_span(SpanCtx), %% tuple tests cover lists, as well. - ?set_attribute(attr1, {homogenous, tuple}), + ?set_attribute(attr1, {homogeneous, tuple}), - %% dropped because of non-homogenous - ?set_attribute(<<"attr-2-dropped">>, {non_homogenous, <<"attributes">>}), + %% dropped because of non-homogeneous + ?set_attribute(<<"attr-2-dropped">>, {non_homogeneous, <<"attributes">>}), ?set_attribute(<<"attr-3">>, attr_3_value), @@ -1045,7 +1045,7 @@ too_many_attributes(Config) -> otel_span:end_span(SpanCtx), [Span] = assert_exported(Tid, SpanCtx), - ?assertEqual(#{attr1 => [homogenous, tuple], + ?assertEqual(#{attr1 => [homogeneous, tuple], <<"attr-3">> => 4}, otel_attributes:map(Span#span.attributes)), ?assertEqual(3, otel_attributes:dropped(Span#span.attributes)), @@ -1055,7 +1055,7 @@ too_many_attributes(Config) -> ?set_current_span(SpanCtx2), ?set_attributes(#{<<"attr-1">> => <<"attr-value-1">>, - <<"attr-2">> => {homogenous, attribute}, + <<"attr-2">> => {homogeneous, attribute}, <<"attr-3">> => attr_3_value, <<"attr-4">> => <<"attr-value-4">>}), diff --git a/apps/opentelemetry_api/include/opentelemetry.hrl b/apps/opentelemetry_api/include/opentelemetry.hrl index 79d036d2..a8434887 100644 --- a/apps/opentelemetry_api/include/opentelemetry.hrl +++ b/apps/opentelemetry_api/include/opentelemetry.hrl @@ -13,7 +13,7 @@ %% limitations under the License. %%%------------------------------------------------------------------------ -%% convert 2 strings (one meant to be like a namspace and the other a unique name) +%% convert 2 strings (one meant to be like a namespace and the other a unique name) %% to an atom for use registering a process -define(REG_NAME(Name), list_to_atom(lists:concat([?MODULE, "_", Name]))). -define(GLOBAL_TRACER_PROVIDER_NAME, global). diff --git a/apps/opentelemetry_api/src/opentelemetry.erl b/apps/opentelemetry_api/src/opentelemetry.erl index 656adb5a..c20c7385 100644 --- a/apps/opentelemetry_api/src/opentelemetry.erl +++ b/apps/opentelemetry_api/src/opentelemetry.erl @@ -437,7 +437,7 @@ event(_, _, _) -> %% @doc Creates a list of Span events from the given `List'. %% -%% This is a conveneince function to create a list of Span events from a list +%% This is a convenience function to create a list of Span events from a list %% of `{Time, Name, Attributes}' or `{Name, Attributes}' tuples. It's equivalent %% to calling {@link event/2} or {@link event/3} multiple times. This function %% also automatically filters out any invalid tuple. diff --git a/apps/opentelemetry_api/src/otel_propagator_text_map_composite.erl b/apps/opentelemetry_api/src/otel_propagator_text_map_composite.erl index b8b6e638..5f59f37d 100644 --- a/apps/opentelemetry_api/src/otel_propagator_text_map_composite.erl +++ b/apps/opentelemetry_api/src/otel_propagator_text_map_composite.erl @@ -39,7 +39,7 @@ %% @doc Create a new Composite TextMap Propagator. %% -%% The `Propagators' list is a list of atoms that represnet the suffix +%% The `Propagators' list is a list of atoms that represent the suffix %% of the module name of the TextMap Propagator to be used. -spec create([otel_propagator:builtin()]) -> otel_propagator:t(). create(Propagators) -> diff --git a/apps/opentelemetry_api_experimental/src/otel_meter_noop.erl b/apps/opentelemetry_api_experimental/src/otel_meter_noop.erl index 775822f9..7b75a722 100644 --- a/apps/opentelemetry_api_experimental/src/otel_meter_noop.erl +++ b/apps/opentelemetry_api_experimental/src/otel_meter_noop.erl @@ -32,7 +32,7 @@ record(_Meter, _Name, _Number, _Attributes) -> ok. -record(_Insturment, _Number, _Attributes) -> +record(_Instrument, _Number, _Attributes) -> ok. %% diff --git a/apps/opentelemetry_experimental/src/otel_aggregation_histogram_explicit.erl b/apps/opentelemetry_experimental/src/otel_aggregation_histogram_explicit.erl index 0edb3e21..5fa632b8 100644 --- a/apps/opentelemetry_experimental/src/otel_aggregation_histogram_explicit.erl +++ b/apps/opentelemetry_experimental/src/otel_aggregation_histogram_explicit.erl @@ -41,7 +41,7 @@ %% since we need the Key in the MatchHead for the index to be used we %% can't use `ets:fun2ms' as it will shadow `Key' in the `fun' head -if(?OTP_RELEASE >= 26). --define(AGGREATE_MATCH_SPEC(Key, Value, BucketCounts), +-define(AGGREGATE_MATCH_SPEC(Key, Value, BucketCounts), [ { {explicit_histogram_aggregation,Key,'_','_','_','_','_','$1','$2','$3'}, @@ -62,7 +62,7 @@ ] ). -else. --define(AGGREATE_MATCH_SPEC(Key, Value, BucketCounts), +-define(AGGREGATE_MATCH_SPEC(Key, Value, BucketCounts), [ { {explicit_histogram_aggregation,Key,'_','_','_','_','_','$1','$2','$3'}, @@ -199,7 +199,7 @@ aggregate(Ctx, Table, ExemplarsTab, #stream{name=Name, counters:add(BucketCounts, BucketIdx, 1), Key = {Name, Attributes, ReaderId, Generation}, - MS = ?AGGREATE_MATCH_SPEC(Key, Value, BucketCounts), + MS = ?AGGREGATE_MATCH_SPEC(Key, Value, BucketCounts), case ets:select_replace(Table, MS) of 1 -> otel_metric_exemplar_reservoir:offer(Ctx, ExemplarReservoir, ExemplarsTab, Key, Value, DroppedAttributes), diff --git a/apps/opentelemetry_experimental/src/otel_metric_exemplar_reservoir.erl b/apps/opentelemetry_experimental/src/otel_metric_exemplar_reservoir.erl index 419d755f..1fa519e0 100644 --- a/apps/opentelemetry_experimental/src/otel_metric_exemplar_reservoir.erl +++ b/apps/opentelemetry_experimental/src/otel_metric_exemplar_reservoir.erl @@ -21,17 +21,17 @@ offer/6, collect/3]). --record(exemplar_resevoir, {module :: module(), +-record(exemplar_reservoir, {module :: module(), state :: term(), filter :: fun()}). new(Module, Config, Filter) -> State = Module:new(Config), - #exemplar_resevoir{module=Module, + #exemplar_reservoir{module=Module, state=State, filter=Filter}. -offer(Ctx, ExemplarReservoir=#exemplar_resevoir{module=Module, +offer(Ctx, ExemplarReservoir=#exemplar_reservoir{module=Module, state=State, filter=Filter}, ExemplarTab, Key, Value, DroppedAttributes) -> @@ -42,6 +42,6 @@ offer(Ctx, ExemplarReservoir=#exemplar_resevoir{module=Module, ok end. -collect(#exemplar_resevoir{module=Module, +collect(#exemplar_reservoir{module=Module, state=State}, ExemplarTab, Key) -> Module:collect(ExemplarTab, Key, State). diff --git a/apps/opentelemetry_semantic_conventions/include/resource.hrl b/apps/opentelemetry_semantic_conventions/include/resource.hrl index 171e44b1..65bd8c06 100644 --- a/apps/opentelemetry_semantic_conventions/include/resource.hrl +++ b/apps/opentelemetry_semantic_conventions/include/resource.hrl @@ -130,7 +130,7 @@ %% * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). %% Take care not to use the "invoked ARN" directly but replace any %% [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) -%% with the resolved function version, as the same runtime instance may be invokable with +%% with the resolved function version, as the same runtime instance may be invocable with %% multiple different aliases. %% * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) %% * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function, diff --git a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex index 7ac6f642..5734e518 100644 --- a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex +++ b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex @@ -394,7 +394,7 @@ defmodule OpenTelemetry.SemanticConventions.Resource do * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). Take care not to use the "invoked ARN" directly but replace any [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - with the resolved function version, as the same runtime instance may be invokable with + with the resolved function version, as the same runtime instance may be invocable with multiple different aliases. * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function,