Skip to content

Commit

Permalink
Merge pull request #604 from albertored/experimental-fixes
Browse files Browse the repository at this point in the history
Experimental fixes
  • Loading branch information
Tristan Sloughter authored Aug 23, 2023
2 parents 23c49ec + ca16631 commit 9bbe0b5
Show file tree
Hide file tree
Showing 24 changed files with 247 additions and 178 deletions.
3 changes: 0 additions & 3 deletions apps/opentelemetry_api/.dialyzer_ignore.exs

This file was deleted.

2 changes: 1 addition & 1 deletion apps/opentelemetry_api/dialyzer.ignore-warnings
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/otel_tracer_provider.erl:37:5: Unknown function otel_tracer_provider_sup:start/2
src/otel_tracer_provider.erl:39:5: Unknown function otel_tracer_provider_sup:start/2
13 changes: 12 additions & 1 deletion apps/opentelemetry_api/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@ defmodule OpenTelemetry.MixProject do
start_permanent: Mix.env() == :prod,
deps: [
{:opentelemetry_semantic_conventions, "~> 0.2"},
{:eqwalizer_support,
git: "https://github.com/whatsapp/eqwalizer.git",
branch: "main",
sparse: "eqwalizer_support",
only: [:dev],
runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
{:covertool, ">= 0.0.0", only: :test}
],
name: "OpenTelemetry API",
test_coverage: [tool: :covertool],
package: package(),
aliases: [docs: & &1],
dialyzer: [ignore_warnings: "dialyzer.ignore-warnings", remove_defaults: [:unknown]]
dialyzer: [
ignore_warnings: "dialyzer.ignore-warnings",
remove_defaults: [:unknown],
plt_add_apps: [:eqwalizer_support],
list_unused_filters: true
]
]
end

Expand Down
3 changes: 2 additions & 1 deletion apps/opentelemetry_api/mix.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
%{
"cmark": {:hex, :cmark, "0.10.0", "51217dc90fec459f34a30ea73345e6a7c1d2f3d618cb4a1738a2ebd0697a57a0", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "00abeadc6f3176e3941853122413082de95d57787777dd0400d64e568acf7c32"},
"covertool": {:hex, :covertool, "2.0.3", "5d1ca6958482b9b7e718daf61f398e382426ed0f4689d5c8698a60ae3b5ba521", [:rebar3], [], "hexpm", "5c13170a55dbd6bd9efc722bc7fa32caff6f3c9cde9c692bd4a88bfc9ac4f029"},
"dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"},
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
"earmark": {:hex, :earmark, "1.4.14", "d04572cef64dd92726a97d92d714e38d6e130b024ea1b3f8a56e7de66ec04e50", [:mix], [{:earmark_parser, ">= 1.4.12", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "df338b8b1852ee425180b276c56c6941cb12220e04fe8718fe4acbdd35fd699f"},
"earmark_parser": {:hex, :earmark_parser, "1.4.19", "de0d033d5ff9fc396a24eadc2fcf2afa3d120841eb3f1004d138cbf9273210e8", [:mix], [], "hexpm", "527ab6630b5c75c3a3960b75844c314ec305c76d9899bb30f71cb85952a9dc45"},
"elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"},
"eqwalizer_support": {:git, "https://github.com/whatsapp/eqwalizer.git", "1a787cb604f6083ebe8763e358ea362e4677e500", [branch: "main", sparse: "eqwalizer_support"]},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.28.0", "7eaf526dd8c80ae8c04d52ac8801594426ae322b52a6156cd038f30bafa8226f", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e55cdadf69a5d1f4cfd8477122ebac5e1fadd433a8c1022dafc5025e48db0131"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
unit :: otel_instrument:unit() | undefined,
temporality :: otel_instrument:temporality(),
callback :: otel_instrument:callback() | undefined,
callback_args :: term() | undefined}).
callback_args :: otel_instrument:callback_args() | undefined}).

-define(TEMPORALITY_DELTA, temporality_delta).
-define(TEMPORALITY_CUMULATIVE, temporality_cumulative).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ defmodule OpenTelemetryAPIExperimental.Meter do
end

defmacro register_callback(instruments, callback, callback_args) do
:otel_meter.register_callback(:opentelemetry_experimental.get_meter(__MODULE__), instruments, callback, callback_args)
:otel_meter.register_callback(
:opentelemetry_experimental.get_meter(__MODULE__),
instruments,
callback,
callback_args
)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ defmodule OpenTelemetryAPIExperimental.ObservableCounter do
"""

defmacro create(name, opts) do
quote bind_quoted: [name: name, opts: opts] do
:otel_meter.create_observable_counter(
:opentelemetry_experimental.get_meter(:opentelemetry.get_application_scope(__MODULE__)),
name,
opts
)
end
end

defmacro create(name, callback, callback_args, opts) do
quote bind_quoted: [
name: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ defmodule OpenTelemetryAPIExperimental.ObservableGauge do
"""

defmacro create(name, opts) do
quote bind_quoted: [name: name, opts: opts] do
:otel_meter.create_observable_gauge(
:opentelemetry_experimental.get_meter(:opentelemetry.get_application_scope(__MODULE__)),
name,
opts
)
end
end

defmacro create(name, callback, callback_args, opts) do
quote bind_quoted: [
name: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ defmodule OpenTelemetryAPIExperimental.ObservableUpDownCounter do
"""

defmacro create(name, opts) do
quote bind_quoted: [name: name, opts: opts] do
:otel_meter.create_observable_updowncounter(
:opentelemetry_experimental.get_meter(:opentelemetry.get_application_scope(__MODULE__)),
name,
opts
)
end
end

defmacro create(name, callback, callback_args, opts) do
quote bind_quoted: [
name: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defmodule OpenTelemetryAPIExperimental.UpDownCounter do
end
end


defmacro add(name, number, attributes) do
quote bind_quoted: [name: name, number: number, attributes: attributes] do
:otel_updown_counter.add(
Expand Down
15 changes: 15 additions & 0 deletions apps/opentelemetry_api_experimental/mix.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%{
"cmark": {:hex, :cmark, "0.10.0", "51217dc90fec459f34a30ea73345e6a7c1d2f3d618cb4a1738a2ebd0697a57a0", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "00abeadc6f3176e3941853122413082de95d57787777dd0400d64e568acf7c32"},
"covertool": {:hex, :covertool, "2.0.6", "4a291b4e3449025b0595d8f44c8d7635d4f48f033be2ce88d22a329f36f94a91", [:rebar3], [], "hexpm", "5db3fcd82180d8ea4ad857d4d1ab21a8d31b5aee0d60d2f6c0f9e25a411d1e21"},
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
"earmark": {:hex, :earmark, "1.4.39", "acdb2f02c536471029dbcc509fbd6b94b89f40ad7729fb3f68f4b6944843f01d", [:mix], [{:earmark_parser, "~> 1.4.33", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "156c9d8ec3cbeccdbf26216d8247bdeeacc8c76b4d9eee7554be2f1b623ea440"},
"earmark_parser": {:hex, :earmark_parser, "1.4.33", "3c3fd9673bb5dcc9edc28dd90f50c87ce506d1f71b70e3de69aa8154bc695d44", [:mix], [], "hexpm", "2d526833729b59b9fdb85785078697c72ac5e5066350663e5be6a1182da61b8f"},
"elixir_make": {:hex, :elixir_make, "0.7.7", "7128c60c2476019ed978210c245badf08b03dbec4f24d05790ef791da11aa17c", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5bc19fff950fad52bbe5f211b12db9ec82c6b34a9647da0c2224b8b8464c7e6c"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.21.0", "7af8cd3e3df2fe355e99dabd2d4dcecc6e76eb417200e3b7a3da362d52730e3c", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "ef679a81de63385c7e72597e81ca1276187505eeacb38281a672d2822254ff1a"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
"nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"},
"opentelemetry_api": {:hex, :opentelemetry_api, "1.2.2", "693f47b0d8c76da2095fe858204cfd6350c27fe85d00e4b763deecc9588cf27a", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "dc77b9a00f137a858e60a852f14007bb66eda1ffbeb6c05d5fe6c9e678b05e9d"},
"opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"},
}
4 changes: 2 additions & 2 deletions apps/opentelemetry_api_experimental/src/otel_counter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
create(Meter, Name, Opts) ->
otel_meter:create_counter(Meter, Name, Opts).

-spec add(otel_meter:t(), otel_instrument:name(), number(), opentelemetry:attributes_map()) -> ok.
-spec add(otel_meter:t(), otel_instrument:name(), pos_integer() |float(), opentelemetry:attributes_map()) -> ok.
add(Meter, Name, Number, Attributes) ->
otel_meter:record(Meter, Name, Number, Attributes).

-spec add(otel_instrument:t(), number(), opentelemetry:attributes_map()) -> ok.
-spec add(otel_instrument:t(), pos_integer() |float(), opentelemetry:attributes_map()) -> ok.
add(Instrument=#instrument{module=Module}, Number, Attributes) ->
Module:record(Instrument, Number, Attributes).
4 changes: 2 additions & 2 deletions apps/opentelemetry_api_experimental/src/otel_histogram.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
create(Meter, Name, Opts) ->
otel_meter:create_histogram(Meter, Name, Opts).

-spec record(otel_meter:t(), otel_instrument:name(), number(), opentelemetry:attributes_map()) -> ok.
-spec record(otel_meter:t(), otel_instrument:name(), pos_integer() | float(), opentelemetry:attributes_map()) -> ok.
record(Meter, Name, Number, Attributes) ->
otel_meter:record(Meter, Name, Number, Attributes).

-spec record(otel_instrument:t(), number(), opentelemetry:attributes_map()) -> ok.
-spec record(otel_instrument:t(), pos_integer() | float(), opentelemetry:attributes_map()) -> ok.
record(Instrument=#instrument{module=Module}, Number, Attributes) ->
Module:record(Instrument, Number, Attributes).
4 changes: 2 additions & 2 deletions apps/opentelemetry_api_experimental/src/otel_instrument.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
callback_args/0,
callback_result/0]).

-spec new(module(), otel_meter:t(), kind(), name(), description() | undefined, unit()) -> t().
-spec new(module(), otel_meter:t(), kind(), name(), description() | undefined, unit() | undefined) -> t().
new(Module, Meter, Kind, Name, Description, Unit) ->
#instrument{module = Module,
meter = Meter,
Expand All @@ -61,7 +61,7 @@ new(Module, Meter, Kind, Name, Description, Unit) ->
kind = Kind,
unit = Unit}.

-spec new(module(), otel_meter:t(), kind(), name(), description() | undefined, unit(), callback(), term()) -> t().
-spec new(module(), otel_meter:t(), kind(), name(), description() | undefined, unit() | undefined, callback(), callback_args()) -> t().
new(Module, Meter, Kind, Name, Description, Unit, Callback, CallbackArgs) ->
#instrument{module = Module,
meter = Meter,
Expand Down
63 changes: 43 additions & 20 deletions apps/opentelemetry_api_experimental/src/otel_meter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@
create_histogram/3,
create_updown_counter/3,

create_observable_counter/3,
create_observable_counter/5,
create_observable_gauge/3,
create_observable_gauge/5,
create_observable_updowncounter/3,
create_observable_updowncounter/5,

scope/1,

register_callback/4,

instrument/6,
lookup_instrument/2,

record/4]).
Expand All @@ -47,14 +49,14 @@
Name :: otel_instrument:name(),
Kind :: otel_instrument:kind(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term(),
CallbackArgs :: otel_instrument:callback_args(),
Opts :: opts().

-callback register_callback(Meter, Instruments, Callback, CallbackArgs) -> ok when
Meter :: t(),
Instruments :: otel_instrument:t(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term().
CallbackArgs :: otel_instrument:callback_args().

-type opts() :: #{description => otel_instrument:description(),
unit => otel_instrument:unit()}.
Expand Down Expand Up @@ -85,32 +87,53 @@ create_updown_counter(Meter, Name, Opts) ->
create_histogram(Meter, Name, Opts) ->
create_instrument(Meter, Name, ?KIND_HISTOGRAM, Opts).

-spec create_observable_counter(Meter, Name, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Opts :: opts().
create_observable_counter(Meter, Name, Opts) ->
create_instrument(Meter, Name, ?KIND_OBSERVABLE_COUNTER, Opts).

-spec create_observable_counter(Meter, Name, Callback, CallbackArgs, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term(),
CallbackArgs :: otel_instrument:callback_args(),
Opts :: opts().
create_observable_counter(Meter, Name, Callback, CallbackArgs, Opts) ->
instrument(Meter, Name, ?KIND_OBSERVABLE_COUNTER, Callback, CallbackArgs, Opts).
create_instrument(Meter, Name, ?KIND_OBSERVABLE_COUNTER, Callback, CallbackArgs, Opts).

-spec create_observable_gauge(Meter, Name, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Opts :: opts().
create_observable_gauge(Meter, Name, Opts) ->
create_instrument(Meter, Name, ?KIND_OBSERVABLE_GAUGE, Opts).

-spec create_observable_gauge(Meter, Name, Callback, CallbackArgs, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term(),
CallbackArgs :: otel_instrument:callback_args(),
Opts :: opts().
create_observable_gauge(Meter, Name, Callback, CallbackArgs, Opts) ->
instrument(Meter, Name, ?KIND_OBSERVABLE_GAUGE, Callback, CallbackArgs, Opts).
create_instrument(Meter, Name, ?KIND_OBSERVABLE_GAUGE, Callback, CallbackArgs, Opts).

-spec create_observable_updowncounter(Meter, Name, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Opts :: opts().
create_observable_updowncounter(Meter, Name, Opts) ->
create_instrument(Meter, Name, ?KIND_OBSERVABLE_UPDOWNCOUNTER, Opts).

-spec create_observable_updowncounter(Meter, Name, Callback, CallbackArgs, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term(),
CallbackArgs :: otel_instrument:callback_args(),
Opts :: opts().
create_observable_updowncounter(Meter, Name, Callback, CallbackArgs, Opts) ->
instrument(Meter, Name, ?KIND_OBSERVABLE_UPDOWNCOUNTER, Callback, CallbackArgs, Opts).
create_instrument(Meter, Name, ?KIND_OBSERVABLE_UPDOWNCOUNTER, Callback, CallbackArgs, Opts).

-spec scope(Meter) -> Scope when
Meter :: t(),
Expand All @@ -126,29 +149,29 @@ scope(Meter={Module, _}) ->
create_instrument(Meter={Module, _}, Name, Kind, Opts) ->
Module:create_instrument(Meter, Name, Kind, Opts).

-spec lookup_instrument(Meter, Name) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name().
lookup_instrument(Meter={Module, _}, Name) ->
Module:lookup_instrument(Meter, Name).

-spec instrument(Meter, Name, Kind, Callback, CallbackArgs, Opts) -> otel_instrument:t() when
-spec create_instrument(Meter, Name, Kind, Callback, CallbackArgs, Opts) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name(),
Kind :: otel_instrument:kind(),
Callback :: otel_instrument:callback(),
CallbackArgs :: term(),
CallbackArgs :: otel_instrument:callback_args(),
Opts :: opts().
instrument(Meter={Module, _}, Name, Kind, Callback, CallbackArgs, Opts) ->
create_instrument(Meter={Module, _}, Name, Kind, Callback, CallbackArgs, Opts) ->
Module:create_instrument(Meter, Name, Kind, Callback, CallbackArgs, Opts).

-spec lookup_instrument(Meter, Name) -> otel_instrument:t() when
Meter :: t(),
Name :: otel_instrument:name().
lookup_instrument(Meter={Module, _}, Name) ->
Module:lookup_instrument(Meter, Name).

-spec register_callback(Meter, Instruments, Callback, CallbackArgs) -> ok when
Meter :: t(),
Instruments :: [otel_instrument:t()],
Callback :: otel_instrument:callback(),
CallbackArgs :: term().
CallbackArgs :: otel_instrument:callback_args().
register_callback(Meter={Module, _}, Instruments, Callback, CallbackArgs) ->
Module:register_callback(Meter, Instruments, Callback, CallbackArgs).

record(Meter={Module, _}, Name, Number, Attributes) ->
Module:record(Meter, Name, Number, Attributes).
Module:record(Meter, Name, Number, Attributes).
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
%%%-------------------------------------------------------------------------
-module(otel_observable_counter).

-export([create/5]).
-export([create/3, create/5]).

create(Meter, Name, Opts) ->
otel_meter:create_observable_counter(Meter, Name, Opts).

create(Meter, Name, Callback, CallbackArgs, Opts) ->
otel_meter:create_observable_counter(Meter, Name, Callback, CallbackArgs, Opts).
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
%%%-------------------------------------------------------------------------
-module(otel_observable_gauge).

-export([create/5]).
-export([create/3, create/5]).

create(Meter, Name, Opts) ->
otel_meter:create_observable_gauge(Meter, Name, Opts).

create(Meter, Name, Callback, CallbackArgs, Opts) ->
otel_meter:create_observable_gauge(Meter, Name, Callback, CallbackArgs, Opts).
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
%%%-------------------------------------------------------------------------
-module(otel_observable_updowncounter).

-export([create/5]).
-export([create/3, create/5]).

create(Meter, Name, Opts) ->
otel_meter:create_observable_updowncounter(Meter, Name, Opts).

create(Meter, Name, Callback, CallbackArgs, Opts) ->
otel_meter:create_observable_updowncounter(Meter, Name, Callback, CallbackArgs, Opts).
Loading

0 comments on commit 9bbe0b5

Please sign in to comment.