diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index e498252b..2ee7aba7 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -10,15 +10,15 @@ on: jobs: format: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: '25.0' - elixir-version: '1.13.4' + otp-version: '26.1.2' + elixir-version: '1.15.7' version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | @@ -34,15 +34,18 @@ jobs: name: Test SDK on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['25.0.3', '24.1.2'] - elixir_version: ['1.14', '1.13.4'] - rebar3_version: ['3.20.0'] + otp_version: ['26.1.2', '24.3.4.14'] + elixir_version: ['1.15.7', '1.12.3'] + rebar3_version: ['3.22.1'] os: [ubuntu-20.04] + exclude: + - elixir_version: "1.12.3" + - otp_version: "26.1.2" env: OTP_VERSION: ${{ matrix.otp_version }} ELIXIR_VERSION: ${{ matrix.elixir_version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} @@ -60,10 +63,13 @@ jobs: name: Test API on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['25.0.3', '24.1.2'] - elixir_version: ['1.14', '1.13.4'] - rebar3_version: ['3.20.0'] + otp_version: ['26.1.2', '24.3.4.14'] + elixir_version: ['1.15.7', '1.12.3'] + rebar3_version: ['3.22.1'] os: [ubuntu-20.04] + exclude: + - elixir_version: "1.12.3" + - otp_version: "26.1.2" env: OTP_VERSION: ${{ matrix.otp_version }} ELIXIR_VERSION: ${{ matrix.elixir_version }} @@ -71,14 +77,14 @@ jobs: run: working-directory: apps/opentelemetry_api/ steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | @@ -104,8 +110,9 @@ jobs: name: Dialyze on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['25.0'] - elixir_version: ['1.14'] + otp_version: ['26.1.2'] + elixir_version: ['1.15.7'] + rebar_version: ['3.22.1'] os: [ubuntu-20.04] env: OTP_VERSION: ${{ matrix.otp_version }} @@ -114,13 +121,13 @@ jobs: run: working-directory: apps/opentelemetry_api/ steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir_version }} version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index ae2e6bce..3359f4cb 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -18,17 +18,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.0', '25.0.3', '24.1.2'] + otp_version: ['26.1.2', '25.3.2.7', '24.3.4.14'] rebar3_version: ['3.22.1'] os: [ubuntu-20.04] include: - - otp_version: '23.3' + - otp_version: '23.3.4.19' rebar3_version: '3.17.0' os: ubuntu-20.04 env: OTP_VERSION: ${{ matrix.otp_version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run Collector run: docker-compose up -d - uses: erlef/setup-beam@v1 @@ -36,7 +36,7 @@ jobs: otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | @@ -52,7 +52,7 @@ jobs: run: rebar3 ct --cover - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v4 if: success() || failure() # always run even if the previous step fails with: report_paths: '**/_build/test/logs/*/junit_report.xml' @@ -91,17 +91,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.0'] + otp_version: ['26.1.2'] rebar3_version: ['3.22.1'] os: [ubuntu-20.04] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | @@ -119,17 +119,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.0'] + otp_version: ['26.1.2'] rebar3_version: ['3.22.1'] os: [ubuntu-20.04] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} version-type: 'strict' - - uses: actions/cache@v2 + - uses: actions/cache@v3 name: Cache with: path: | diff --git a/.github/workflows/w3c_interop.yml b/.github/workflows/w3c_interop.yml index 85dd5955..74966dc7 100644 --- a/.github/workflows/w3c_interop.yml +++ b/.github/workflows/w3c_interop.yml @@ -11,15 +11,15 @@ on: jobs: interop_tests: name: Run W3C Trace Context Interop Tests - runs-on: ubuntu-20.04 - env: - OTP_VERSION: + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: '26.0' - - uses: actions/cache@v2 + otp-version: '26.1.2' + version-type: strict + rebar3-version: '3.22.1' + - uses: actions/cache@v3 name: Cache with: path: | @@ -31,14 +31,14 @@ jobs: - name: Compile run: rebar3 as interop compile - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: 'w3c/trace-context' path: 'trace-context' - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.6 + python-version: 3.12 architecture: x64 - run: pip install aiohttp - run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 320c2095..d756ea81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,11 +25,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Attributes module `otel_attributes` moved to API](https://github.com/open-telemetry/opentelemetry-erlang/pull/618) +### Fixes + +- [Fix leak of atoms/persistent terms by creating unique processor name in `otel_tracer_server`](https://github.com/open-telemetry/opentelemetry-erlang/pull/646) + ## Experimental API ### Changes -- [Allow to create observable instruments without passing callback arguments](https://github.com/open-telemetry/opentelemetry-erlang/pull/604) +- [Allow to create observable instruments without passing callback + arguments](https://github.com/open-telemetry/opentelemetry-erlang/pull/604) - [Allow to give `advisory_params` to instrument creation functions](https://github.com/open-telemetry/opentelemetry-erlang/pull/628) - [Attributes are optional in Counter.add(), UpDownCounter.add() and Histo.record()](https://github.com/open-telemetry/opentelemetry-erlang/pull/632) diff --git a/apps/opentelemetry/src/otel_batch_processor.erl b/apps/opentelemetry/src/otel_batch_processor.erl index d1374c55..433dea95 100644 --- a/apps/opentelemetry/src/otel_batch_processor.erl +++ b/apps/opentelemetry/src/otel_batch_processor.erl @@ -90,17 +90,11 @@ current_tab_to_list(RegName) -> ets:tab2list(?CURRENT_TABLE(RegName)). -endif. -start_link(Config) -> - Name = case maps:find(name, Config) of - {ok, N} -> - N; - error -> - %% use a unique reference to distiguish multiple batch processors while - %% still having a single name, instead of a possibly changing pid, to - %% communicate with the processor - erlang:ref_to_list(erlang:make_ref()) - end, - +%% require a unique name to distiguish multiple batch processors while +%% still having a single name, instead of a possibly changing pid, to +%% communicate with the processor +-spec start_link(#{name := atom() | list()}) -> {ok, pid(), map()}. +start_link(Config=#{name := Name}) -> RegisterName = ?REG_NAME(Name), Config1 = Config#{reg_name => RegisterName}, {ok, Pid} = gen_statem:start_link({local, RegisterName}, ?MODULE, [Config1], []), diff --git a/apps/opentelemetry/src/otel_simple_processor.erl b/apps/opentelemetry/src/otel_simple_processor.erl index eaa5fd83..bb877c4b 100644 --- a/apps/opentelemetry/src/otel_simple_processor.erl +++ b/apps/opentelemetry/src/otel_simple_processor.erl @@ -64,17 +64,11 @@ -define(DEFAULT_EXPORTER_TIMEOUT_MS, timer:minutes(5)). -define(NAME_TO_ATOM(Name, Unique), list_to_atom(lists:concat([Name, "_", Unique]))). -start_link(Config) -> - Name = case maps:find(name, Config) of - {ok, N} -> - N; - error -> - %% use a unique reference to distiguish multiple batch processors while - %% still having a single name, instead of a possibly changing pid, to - %% communicate with the processor - erlang:ref_to_list(erlang:make_ref()) - end, - +%% require a unique name to distiguish multiple simple processors while +%% still having a single name, instead of a possibly changing pid, to +%% communicate with the processor +-spec start_link(#{name := atom() | list()}) -> {ok, pid(), map()}. +start_link(Config=#{name := Name}) -> RegisterName = ?NAME_TO_ATOM(?MODULE, Name), Config1 = Config#{reg_name => RegisterName}, {ok, Pid} = gen_statem:start_link({local, RegisterName}, ?MODULE, [Config1], []), diff --git a/apps/opentelemetry/src/otel_tracer_server.erl b/apps/opentelemetry/src/otel_tracer_server.erl index 4b536906..00e367e5 100644 --- a/apps/opentelemetry/src/otel_tracer_server.erl +++ b/apps/opentelemetry/src/otel_tracer_server.erl @@ -159,7 +159,14 @@ init_processor(SpanProcessorSup, ProcessorModule, Config) -> %% start_link is an optional callback for processors case lists:member({start_link, 1}, ProcessorModule:module_info(exports)) of true -> - try supervisor:start_child(SpanProcessorSup, [ProcessorModule, Config]) of + try supervisor:start_child(SpanProcessorSup, + [ProcessorModule, + %% use a unique reference to distiguish 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())}, + Config)]) + of {ok, _Pid, Config1} -> {true, {ProcessorModule, Config1}}; {error, Reason} -> diff --git a/apps/opentelemetry_api/mix.exs b/apps/opentelemetry_api/mix.exs index b1f7af1d..fe282710 100644 --- a/apps/opentelemetry_api/mix.exs +++ b/apps/opentelemetry_api/mix.exs @@ -50,7 +50,7 @@ defmodule OpenTelemetry.MixProject do end defp load_app do - {:ok, [{:application, name, desc}]} = :file.consult('src/opentelemetry_api.app.src') + {:ok, [{:application, name, desc}]} = :file.consult(~c"src/opentelemetry_api.app.src") {name, desc} end diff --git a/apps/opentelemetry_api/mix.lock b/apps/opentelemetry_api/mix.lock index badaab35..34024f8e 100644 --- a/apps/opentelemetry_api/mix.lock +++ b/apps/opentelemetry_api/mix.lock @@ -1,7 +1,7 @@ %{ "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.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, + "covertool": {:hex, :covertool, "2.0.6", "4a291b4e3449025b0595d8f44c8d7635d4f48f033be2ce88d22a329f36f94a91", [:rebar3], [], "hexpm", "5db3fcd82180d8ea4ad857d4d1ab21a8d31b5aee0d60d2f6c0f9e25a411d1e21"}, + "dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"}, "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"}, diff --git a/apps/opentelemetry_api_experimental/mix.exs b/apps/opentelemetry_api_experimental/mix.exs index df92b836..4dc94db2 100644 --- a/apps/opentelemetry_api_experimental/mix.exs +++ b/apps/opentelemetry_api_experimental/mix.exs @@ -52,8 +52,8 @@ defmodule OpenTelemetryExperimental.MixProject do dep when is_atom(dep) -> {dep, ">= 0.0.0"} end) |> Enum.concat([ - {:cmark, "~> 0.7", only: :dev, runtime: false}, - {:ex_doc, "0.21.0", only: :dev, runtime: false}, + {:cmark, "~> 0.10", only: :dev, runtime: false}, + {:ex_doc, "~> 0.30", only: :dev, runtime: false}, {:dialyxir, "~> 1.0", only: [:dev], runtime: false}, {:covertool, ">= 0.0.0", only: :test} ]) diff --git a/apps/opentelemetry_api_experimental/mix.lock b/apps/opentelemetry_api_experimental/mix.lock index a1cc64e6..ac2c69b7 100644 --- a/apps/opentelemetry_api_experimental/mix.lock +++ b/apps/opentelemetry_api_experimental/mix.lock @@ -3,13 +3,14 @@ "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"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.38", "b42252eddf63bda05554ba8be93a1262dc0920c721f1aaf989f5de0f73a2e367", [:mix], [], "hexpm", "2cd0907795aaef0c7e8442e376633c5b3bd6edc8dbbdc539b22f095501c1cdb6"}, "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"}, + "ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [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", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"}, + "makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"}, "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "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"}, } diff --git a/apps/opentelemetry_experimental/src/otel_otlp_metrics.erl b/apps/opentelemetry_experimental/src/otel_otlp_metrics.erl index 1115010c..8da7bdbe 100644 --- a/apps/opentelemetry_experimental/src/otel_otlp_metrics.erl +++ b/apps/opentelemetry_experimental/src/otel_otlp_metrics.erl @@ -85,9 +85,10 @@ to_data_points(#datapoint{attributes=Attributes, exemplars=Exemplars, flags=Flags }) -> + #{attributes => otel_otlp_common:to_attributes(Attributes), - start_time => opentelemetry:timestamp_to_nano(StartTime), - time => opentelemetry:timestamp_to_nano(CollectionStartTime), + start_time_unix_nano => opentelemetry:timestamp_to_nano(StartTime), + time_unix_nano => opentelemetry:timestamp_to_nano(CollectionStartTime), value => to_datapoint_value(Value), exemplars => Exemplars, flags => Flags @@ -107,8 +108,8 @@ to_histogram_data_points(#histogram_datapoint{ max=Max }) -> #{attributes => otel_otlp_common:to_attributes(Attributes), - start_time => StartTime, - time => CollectionStartTime, + start_time_unix_nano => opentelemetry:timestamp_to_nano(StartTime), + time_unix_nano => opentelemetry:timestamp_to_nano(CollectionStartTime), count => Count, sum => Sum, bucket_counts => Buckets, diff --git a/rebar.lock b/rebar.lock index 8bb74ffc..f0c6aab0 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,15 +1,15 @@ {"1.2.0", [{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},1}, - {<<"chatterbox">>,{pkg,<<"ts_chatterbox">>,<<"0.13.0">>},1}, + {<<"chatterbox">>,{pkg,<<"ts_chatterbox">>,<<"0.15.1">>},1}, {<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},1}, {<<"eqwalizer_support">>, {git_subdir,"https://github.com/whatsapp/eqwalizer.git", {ref,"1a787cb604f6083ebe8763e358ea362e4677e500"}, "eqwalizer_support"}, 0}, - {<<"gproc">>,{pkg,<<"gproc">>,<<"0.8.0">>},1}, - {<<"grpcbox">>,{pkg,<<"grpcbox">>,<<"0.16.0">>},0}, - {<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.2.3">>},2}, + {<<"gproc">>,{pkg,<<"gproc">>,<<"0.9.1">>},1}, + {<<"grpcbox">>,{pkg,<<"grpcbox">>,<<"0.17.1">>},0}, + {<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.3.0">>},2}, {<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.6">>},1}, {<<"tls_certificate_check">>, {pkg,<<"tls_certificate_check">>,<<"1.19.0">>}, @@ -17,20 +17,20 @@ [ {pkg_hash,[ {<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>}, - {<<"chatterbox">>, <<"6F059D97BCAA758B8EA6FFFE2B3B81362BD06B639D3EA2BB088335511D691EBF">>}, + {<<"chatterbox">>, <<"5CAC4D15DD7AD61FC3C4415CE4826FC563D4643DEE897A558EC4EA0B1C835C9C">>}, {<<"ctx">>, <<"8FF88B70E6400C4DF90142E7F130625B82086077A45364A78D208ED3ED53C7FE">>}, - {<<"gproc">>, <<"CEA02C578589C61E5341FCE149EA36CCEF236CC2ECAC8691FBA408E7EA77EC2F">>}, - {<<"grpcbox">>, <<"B83F37C62D6EECA347B77F9B1EC7E9F62231690CDFEB3A31BE07CD4002BA9C82">>}, - {<<"hpack">>, <<"17670F83FF984AE6CD74B1C456EDDE906D27FF013740EE4D9EFAA4F1BF999633">>}, + {<<"gproc">>, <<"F1DF0364423539CF0B80E8201C8B1839E229E5F9B3CCB944C5834626998F5B8C">>}, + {<<"grpcbox">>, <<"6E040AB3EF16FE699FFB513B0EF8E2E896DA7B18931A1EF817143037C454BCCE">>}, + {<<"hpack">>, <<"2461899CC4AB6A0EF8E970C1661C5FC6A52D3C25580BC6DD204F84CE94669926">>}, {<<"ssl_verify_fun">>, <<"CF344F5692C82D2CD7554F5EC8FD961548D4FD09E7D22F5B62482E5AEAEBD4B0">>}, {<<"tls_certificate_check">>, <<"C76C4C5D79EE79A2B11C84F910C825D6F024A78427C854F515748E9BD025E987">>}]}, {pkg_hash_ext,[ {<<"acceptor_pool">>, <<"0CBCD83FDC8B9AD2EEE2067EF8B91A14858A5883CB7CD800E6FCD5803E158788">>}, - {<<"chatterbox">>, <<"B93D19104D86AF0B3F2566C4CBA2A57D2E06D103728246BA1AC6C3C0FF010AA7">>}, + {<<"chatterbox">>, <<"4F75B91451338BC0DA5F52F3480FA6EF6E3A2AEECFC33686D6B3D0A0948F31AA">>}, {<<"ctx">>, <<"A14ED2D1B67723DBEBBE423B28D7615EB0BDCBA6FF28F2D1F1B0A7E1D4AA5FC2">>}, - {<<"gproc">>, <<"580ADAFA56463B75263EF5A5DF4C86AF321F68694E7786CB057FD805D1E2A7DE">>}, - {<<"grpcbox">>, <<"294DF743AE20A7E030889F00644001370A4F7CE0121F3BBDAF13CF3169C62913">>}, - {<<"hpack">>, <<"06F580167C4B8B8A6429040DF36CC93BBA6D571FAEAEC1B28816523379CBB23A">>}, + {<<"gproc">>, <<"905088E32E72127ED9466F0BAC0D8E65704CA5E73EE5A62CB073C3117916D507">>}, + {<<"grpcbox">>, <<"4A3B5D7111DAABC569DC9CBD9B202A3237D81C80BF97212FBC676832CB0CEB17">>}, + {<<"hpack">>, <<"D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0">>}, {<<"ssl_verify_fun">>, <<"BDB0D2471F453C88FF3908E7686F86F9BE327D065CC1EC16FA4540197EA04680">>}, {<<"tls_certificate_check">>, <<"4083B4A298ADD534C96125337CB01161C358BB32DD870D5A893AAE685FD91D70">>}]} ]. diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..a08e452e --- /dev/null +++ b/renovate.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "packageRules": [ + { + "matchDatasources": ["hex"], + "matchUpdateTypes": ["patch", "pin", "digest"], + "addLabels": ["skip-changelog"] + } + ] +}