Skip to content

Commit e30700c

Browse files
committed
FIXUP
1 parent e5ef817 commit e30700c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

apps/opentelemetry/src/otel_sampler.erl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
%% For examples of configuring samplers or implementing your own sampler,
2525
%% see <a href="https://opentelemetry.io/docs/languages/erlang/sampling/">the OpenTelemetry
2626
%% Erlang documentation</a>.
27+
%%
28+
%% <h3>Configuration</h3>
29+
%%
30+
%% To configure sampling for the `opentelemetry' application, see
31+
%% <a href="https://hexdocs.pm/opentelemetry/readme.html#samplers">the documentation</a>.
2732
%% @end
2833
%%%-------------------------------------------------------------------------
2934
-module(otel_sampler).
@@ -81,6 +86,7 @@
8186
%% A built-in sampler.
8287

8388
-type sampler_spec() :: builtin_sampler() | {module(), sampler_opts()}.
89+
%% Specification to create a sampler.
8490

8591
-type sampling_decision() :: ?DROP | ?RECORD_ONLY | ?RECORD_AND_SAMPLE.
8692
%% The decision that a sampler can make on a given span.
@@ -90,12 +96,13 @@
9096
opentelemetry:attributes_map(),
9197
opentelemetry:tracestate() | otel_tracestate:members()
9298
}.
99+
%% The result of a sampling decision.
93100

94101
-opaque t() :: {module(), description(), sampler_opts()}.
95102
%% A sampler.
96103

97-
%% @private
98-
-spec new(sampler_spec()) -> t().
104+
%% @doc Returns a sampler based on the given specification.
105+
-spec new(SamplerSpec :: sampler_spec()) -> t().
99106
new(always_on) ->
100107
new({otel_sampler_always_on, #{}});
101108
new(always_off) ->
@@ -128,6 +135,6 @@ should_sample({Sampler, _, Config}, Ctx, TraceId, Links, SpanName, Kind, Attribu
128135
Result
129136
end.
130137

131-
%% @private
138+
%% @doc Returns the description of the given sampler.
132139
-spec description(t()) -> description().
133-
description({_, Description, _}) -> Description.
140+
description(_Sampler = {_, Description, _}) -> Description.

0 commit comments

Comments
 (0)