Skip to content

Commit

Permalink
Merge pull request #739 from kianmeng/fix-typos-again
Browse files Browse the repository at this point in the history
Fix typos again
  • Loading branch information
ferd authored May 13, 2024
2 parents afb1e8b + a172d24 commit 51bbad5
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry/src/otel_batch_processor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry/src/otel_simple_processor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry/src/otel_tracer_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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())},
Expand Down
10 changes: 5 additions & 5 deletions apps/opentelemetry/test/opentelemetry_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand All @@ -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)),

Expand All @@ -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">>}),

Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry_api/include/opentelemetry.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry_api/src/opentelemetry.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

%% @doc Create a new Composite TextMap Propagator.
%%
%% The `Propagators' list is a list of atoms that represnet the <i>suffix</i>
%% The `Propagators' list is a list of atoms that represent the <i>suffix</i>
%% of the module name of the TextMap Propagator to be used.
-spec create([otel_propagator:builtin()]) -> otel_propagator:t().
create(Propagators) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
record(_Meter, _Name, _Number, _Attributes) ->
ok.

record(_Insturment, _Number, _Attributes) ->
record(_Instrument, _Number, _Attributes) ->
ok.

%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand All @@ -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'},
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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).
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 51bbad5

Please sign in to comment.