Skip to content

Commit

Permalink
Rename decider() to sampler_fun()
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic committed Aug 3, 2021
1 parent 8ffe3ad commit 055afa2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/opentelemetry/src/otel_sampler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
-type sampling_decision() :: ?DROP | ?RECORD_ONLY | ?RECORD_AND_SAMPLE.
-type sampling_result() :: {sampling_decision(), opentelemetry:attributes(), opentelemetry:tracestate()}.
-type description() :: unicode:unicode_binary().
-type decider() :: fun((otel_ctx:t(),
opentelemetry:trace_id(),
opentelemetry:links(),
opentelemetry:span_name(),
opentelemetry:span_kind(),
opentelemetry:attributes(),
term()) -> sampling_result()).
-type sampler() :: {decider(), description(), sampler_opts()}.
-type sampler_fun() :: fun((otel_ctx:t(),
opentelemetry:trace_id(),
opentelemetry:links(),
opentelemetry:span_name(),
opentelemetry:span_kind(),
opentelemetry:attributes(),
term()) -> sampling_result()).
-type sampler() :: {sampler_fun(), description(), sampler_opts()}.
-type sampler_opts() :: term().
-opaque t() :: sampler().
-export_type([decider/0,
-export_type([sampler_fun/0,
description/0,
sampling_result/0,
sampling_decision/0,
Expand All @@ -56,7 +56,7 @@

-define(MAX_VALUE, 9223372036854775807). %% 2^63 - 1

-spec new(decider(), description(), sampler_opts()) -> t().
-spec new(sampler_fun(), description(), sampler_opts()) -> t().
new(DecisionFunction, Description, SamplerOpts) ->
{DecisionFunction, Description, SamplerOpts}.

Expand Down

0 comments on commit 055afa2

Please sign in to comment.