diff --git a/.github/elixir-test-matrix.json b/.github/elixir-test-matrix.json index 50d30258..2dd138f5 100644 --- a/.github/elixir-test-matrix.json +++ b/.github/elixir-test-matrix.json @@ -1,58 +1,29 @@ { "otp_version": [ - "26.0.2", - "25.3.2.5", - "24.3.4.13", - "23.3.4.19" + "26.2.1", + "25.3.2.8", + "24.3.4.15" ], "elixir_version": [ - "1.15.4", - "1.14.4", - "1.13.4", - "1.12.3", - "1.11.4" + "1.16.0", + "1.14.5" ], "rebar3_version": [ - "3.20.0" + "3.22.1" ], "os": [ "ubuntu-20.04" ], "include": [ { - "elixir_version": "1.15.4", - "otp_version": "26.0.2", + "elixir_version": "1.16.0", + "otp_version": "26.2.1", "check_formatted": true - } - ], - "exclude": [ - { - "elixir_version": "1.15.4", - "otp_version": "23.3.4.19" - }, - { - "elixir_version": "1.14.4", - "otp_version": "26.0.2" - }, - { - "elixir_version": "1.13.4", - "otp_version": "26.0.2" }, { "elixir_version": "1.12.3", - "otp_version": "25.3.2.5" - }, - { - "elixir_version": "1.12.3", - "otp_version": "26.0.2" - }, - { - "elixir_version": "1.11.4", - "otp_version": "25.3.2.5" - }, - { - "elixir_version": "1.11.4", - "otp_version": "26.0.2" + "otp_version": "24.3.4.15" } - ] + ], + "exclude": [] } diff --git a/.github/erlang-test-matrix.json b/.github/erlang-test-matrix.json index db0f43b1..1ca56254 100644 --- a/.github/erlang-test-matrix.json +++ b/.github/erlang-test-matrix.json @@ -1,5 +1,5 @@ { - "otp_version": ["26.0.2", "25.3.2.6", "24.3.4.13", "23.3.4.19"], - "rebar3_version": ["3.20.0"], + "otp_version": ["26.1.2", "25.3.2.8", "24.3.4.15"], + "rebar3_version": ["3.22.1"], "os": ["ubuntu-20.04"] } diff --git a/.github/hex-packages.json b/.github/hex-packages.json new file mode 100644 index 00000000..23ff6cf8 --- /dev/null +++ b/.github/hex-packages.json @@ -0,0 +1,155 @@ +{ + "aws_xray": { + "workingDirectory": "utilities/opentelemetry_aws_xray", + "name": "AWS Xray Utility", + "packageName": "opentelemetry_aws_xray", + "tagPrefix": "opentelemetry-aws-xray-v", + "buildTool": "rebar3", + "language": "erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "cowboy": { + "workingDirectory": "instrumentation/opentelemetry_cowboy", + "name": "Cowboy Instrumentation", + "packageName": "opentelemetry_cowboy", + "tagPrefix": "opentelemetry-cowboy-v", + "buildTool": "rebar3", + "language": "erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "dataloader": { + "workingDirectory": "instrumentation/opentelemetry_dataloader", + "name": "Dataloader Instrumentation", + "packageName": "opentelemetry_dataloader", + "tagPrefix": "opentelemetry-dataloader-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "ecto": { + "workingDirectory": "instrumentation/opentelemetry_ecto", + "name": "Ecto Instrumentation", + "packageName": "opentelemetry_ecto", + "tagPrefix": "opentelemetry-ecto-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "elli": { + "workingDirectory": "instrumentation/opentelemetry_elli", + "name": "Elli Instrumentation", + "packageName": "opentelemetry_elli", + "tagPrefix": "opentelemetry-elli-v", + "buildTool": "rebar3", + "language": "erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "finch": { + "workingDirectory": "instrumentation/opentelemetry_finch", + "name": "Finch Instrumentation", + "packageName": "opentelemetry_finch", + "tagPrefix": "opentelemetry-finch-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "grpcbox": { + "workingDirectory": "instrumentation/opentelemetry_grpcbox", + "name": "GRPCBox Instrumentation", + "packageName": "opentelemetry_grpcbox", + "tagPrefix": "opentelemetry-grpcbox-v", + "buildTool": "rebar3", + "language": "erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "http_instrumentation": { + "workingDirectory": "utilities/opentelemetry_instrumentation_http", + "name": "HTTP Utilities", + "packageName": "opentelemetry_instrumentation_http", + "tagPrefix": "opentelemetry-instrumentation-http-v", + "buildTool": "rebar3", + "language": "erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "httpoison": { + "workingDirectory": "instrumentation/opentelemetry_httpoison", + "name": "HTTPoison Instrumentation", + "packageName": "opentelemetry_httpoison", + "tagPrefix": "opentelemetry-httpoison-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "nebulex": { + "workingDirectory": "instrumentation/opentelemetry_nebulex", + "name": "Nebulex Instrumentation", + "packageName": "opentelemetry_nebulex", + "tagPrefix": "opentelemetry-nebulex-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "oban": { + "workingDirectory": "instrumentation/opentelemetry_oban", + "name": "Oban Instrumentation", + "packageName": "opentelemetry_oban", + "tagPrefix": "opentelemetry-oban-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "opentelemetry_telemetry": { + "workingDirectory": "utilities/opentelemetry_telemetry", + "name": "Opentelemetry Telemetry", + "packageName": "opentelemetry_telemetry", + "tagPrefix": "opentelemetry-telemetry-v", + "buildTool": "mix", + "language": "elixir-erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "phoenix": { + "workingDirectory": "instrumentation/opentelemetry_phoenix", + "name": "Phoenix Instrumentation", + "packageName": "opentelemetry_phoenix", + "tagPrefix": "opentelemetry-phoenix-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "redix": { + "workingDirectory": "instrumentation/opentelemetry_redix", + "name": "Redix Instrumentation", + "packageName": "opentelemetry_redix", + "tagPrefix": "opentelemetry-redix-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "req": { + "workingDirectory": "instrumentation/opentelemetry_req", + "name": "Req Instrumentation", + "packageName": "opentelemetry_req", + "tagPrefix": "opentelemetry-req-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "tesla": { + "workingDirectory": "instrumentation/opentelemetry_tesla", + "name": "Tesla Instrumentation", + "packageName": "opentelemetry_tesla", + "tagPrefix": "opentelemetry-tesla-v", + "buildTool": "mix", + "language": "elixir", + "authorizedUsers": ["bryannaegele","tsloughter"] + }, + "process_propagator": { + "workingDirectory": "propagators/opentelemetry_process_propagator", + "name": "Opentelemetry Process Propagator", + "packageName": "opentelemetry_process_propagator", + "tagPrefix": "opentelemetry-process-propagator-v", + "buildTool": "mix", + "language": "elixir-erlang", + "authorizedUsers": ["bryannaegele","tsloughter"] + } +} diff --git a/.github/labeler.yml b/.github/labeler.yml index 8242f301..3832379b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,4 +1,5 @@ elixir: + - .github/elixir-test-matrix.json - instrumentation/**/*.ex - instrumentation/**/*.exs - instrumentation/**/mix.lock @@ -16,6 +17,7 @@ elixir: - utilities/**/mix.lock erlang: + - .github/erlang-test-matrix.json - instrumentation/**/*.erl - instrumentation/**/*.hrl - instrumentation/**/rebar.* @@ -83,6 +85,9 @@ opentelemetry_oban: opentelemetry_phoenix: - instrumentation/opentelemetry_phoenix/**/* +opentelemetry_bandit: + - instrumentation/opentelemetry_bandit/**/* + opentelemetry_process_propagator: - propagators/opentelemetry_process_propagator/**/* diff --git a/.github/release-drafter-templates/opentelemetry-aws-xray.yml b/.github/release-drafter-templates/opentelemetry-aws-xray.yml index 6ec2d5a6..7045ae21 100644 --- a/.github/release-drafter-templates/opentelemetry-aws-xray.yml +++ b/.github/release-drafter-templates/opentelemetry-aws-xray.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry AWS X-Ray - v$RESOLVED_VERSION' tag-template: 'opentelemetry-aws-xray-v$RESOLVED_VERSION' tag-prefix: opentelemetry-aws-xray-v include-paths: - - utilities/opentelemetry_aws_xray/src/**/* - - utilities/opentelemetry_aws_xray/rebar.* + - utilities/opentelemetry_aws_xray/ diff --git a/.github/release-drafter-templates/opentelemetry-bandit.yml b/.github/release-drafter-templates/opentelemetry-bandit.yml new file mode 100644 index 00000000..a13245bd --- /dev/null +++ b/.github/release-drafter-templates/opentelemetry-bandit.yml @@ -0,0 +1,11 @@ +_extends: opentelemetry-erlang-contrib:.github/release-drafter.yml +name-template: 'Opentelemetry Bandit - v$RESOLVED_VERSION' +tag-template: 'opentelemetry-bandit-v$RESOLVED_VERSION' +tag-prefix: opentelemetry-bandit-v +include-paths: + - instrumentation/opentelemetry_bandit/ + +footer: | + + --- + [Changelog](https://$REPOSITORY/blob/main/instrumentation/opentelemetry_bandit/CHANGELOG.MD) diff --git a/.github/release-drafter-templates/opentelemetry-cowboy.yml b/.github/release-drafter-templates/opentelemetry-cowboy.yml index 6ed3564c..dd4771b0 100644 --- a/.github/release-drafter-templates/opentelemetry-cowboy.yml +++ b/.github/release-drafter-templates/opentelemetry-cowboy.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Cowboy - v$RESOLVED_VERSION' tag-template: 'opentelemetry-cowboy-v$RESOLVED_VERSION' tag-prefix: opentelemetry-cowboy-v include-paths: - - instrumentation/opentelemetry_cowboy/src/**/* - - instrumentation/opentelemetry_cowboy/rebar.* + - instrumentation/opentelemetry_cowboy/ diff --git a/.github/release-drafter-templates/opentelemetry-dataloader.yml b/.github/release-drafter-templates/opentelemetry-dataloader.yml index bfa29e68..542d3ee4 100644 --- a/.github/release-drafter-templates/opentelemetry-dataloader.yml +++ b/.github/release-drafter-templates/opentelemetry-dataloader.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Dataloader - v$RESOLVED_VERSION' tag-template: 'opentelemetry-dataloader-v$RESOLVED_VERSION' tag-prefix: opentelemetry-dataloader-v include-paths: - - instrumentation/opentelemetry_dataloader/lib/**/* - - instrumentation/opentelemetry_dataloader/lib/mix.* + - instrumentation/opentelemetry_dataloader/ diff --git a/.github/release-drafter-templates/opentelemetry-ecto.yml b/.github/release-drafter-templates/opentelemetry-ecto.yml index 33c12f6a..86a69493 100644 --- a/.github/release-drafter-templates/opentelemetry-ecto.yml +++ b/.github/release-drafter-templates/opentelemetry-ecto.yml @@ -2,6 +2,10 @@ _extends: opentelemetry-erlang-contrib:.github/release-drafter.yml name-template: 'Opentelemetry Ecto - v$RESOLVED_VERSION' tag-template: 'opentelemetry-ecto-v$RESOLVED_VERSION' tag-prefix: opentelemetry-ecto-v +footer: | + + --- + [Changelog](https://$REPOSITORY/blob/main/instrumentation/opentelemetry_ecto/CHANGELOG.MD) + include-paths: - - instrumentation/opentelemetry_ecto/lib/**/* - - instrumentation/opentelemetry_ecto/lib/mix.* + - instrumentation/opentelemetry_ecto/ diff --git a/.github/release-drafter-templates/opentelemetry-elli.yml b/.github/release-drafter-templates/opentelemetry-elli.yml index 88a69463..fc52f020 100644 --- a/.github/release-drafter-templates/opentelemetry-elli.yml +++ b/.github/release-drafter-templates/opentelemetry-elli.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Elli - v$RESOLVED_VERSION' tag-template: 'opentelemetry-elli-v$RESOLVED_VERSION' tag-prefix: opentelemetry-elli-v include-paths: - - instrumentation/opentelemetry_elli/src/**/* - - instrumentation/opentelemetry_elli/rebar.* + - instrumentation/opentelemetry_elli/ diff --git a/.github/release-drafter-templates/opentelemetry-finch.yml b/.github/release-drafter-templates/opentelemetry-finch.yml index 1f355129..55d3ad01 100644 --- a/.github/release-drafter-templates/opentelemetry-finch.yml +++ b/.github/release-drafter-templates/opentelemetry-finch.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Finch - v$RESOLVED_VERSION' tag-template: 'opentelemetry-finch-v$RESOLVED_VERSION' tag-prefix: opentelemetry-finch-v include-paths: - - instrumentation/opentelemetry_finch/lib/**/* - - instrumentation/opentelemetry_finch/lib/mix.* + - instrumentation/opentelemetry_finch/ diff --git a/.github/release-drafter-templates/opentelemetry-grpcbox.yml b/.github/release-drafter-templates/opentelemetry-grpcbox.yml index 08519df0..8c06db6b 100644 --- a/.github/release-drafter-templates/opentelemetry-grpcbox.yml +++ b/.github/release-drafter-templates/opentelemetry-grpcbox.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry GRPCBox - v$RESOLVED_VERSION' tag-template: 'opentelemetry-grpcbox-v$RESOLVED_VERSION' tag-prefix: opentelemetry-grpcbox-v include-paths: - - instrumentation/opentelemetry_grpcbox/src/**/* - - instrumentation/opentelemetry_grpcbox/rebar.* + - instrumentation/opentelemetry_grpcbox/ diff --git a/.github/release-drafter-templates/opentelemetry-httpoison.yml b/.github/release-drafter-templates/opentelemetry-httpoison.yml index 5a3850e8..23b4d77a 100644 --- a/.github/release-drafter-templates/opentelemetry-httpoison.yml +++ b/.github/release-drafter-templates/opentelemetry-httpoison.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry HTTPoison - v$RESOLVED_VERSION' tag-template: 'opentelemetry-httpoison-v$RESOLVED_VERSION' tag-prefix: opentelemetry-httpoison-v include-paths: - - instrumentation/opentelemetry_httpoison/lib/**/* - - instrumentation/opentelemetry_httpoison/lib/mix.* + - instrumentation/opentelemetry_httpoison/ diff --git a/.github/release-drafter-templates/opentelemetry-instrumentation-http.yml b/.github/release-drafter-templates/opentelemetry-instrumentation-http.yml index 9520a06d..ec28e84b 100644 --- a/.github/release-drafter-templates/opentelemetry-instrumentation-http.yml +++ b/.github/release-drafter-templates/opentelemetry-instrumentation-http.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Instrumentation HTTP - v$RESOLVED_VERSION' tag-template: 'opentelemetry-instrumentation-http-v$RESOLVED_VERSION' tag-prefix: opentelemetry-instrumentation-http-v include-paths: - - utilities/opentelemetry_instrumentation-http/src/**/* - - utilities/opentelemetry_instrumentation-http/rebar.* + - utilities/opentelemetry_instrumentation-http/ diff --git a/.github/release-drafter-templates/opentelemetry-nebulex.yml b/.github/release-drafter-templates/opentelemetry-nebulex.yml index 5bd7fbca..f0844461 100644 --- a/.github/release-drafter-templates/opentelemetry-nebulex.yml +++ b/.github/release-drafter-templates/opentelemetry-nebulex.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Nebulex - v$RESOLVED_VERSION' tag-template: 'opentelemetry-nebulex-v$RESOLVED_VERSION' tag-prefix: opentelemetry-nebulex-v include-paths: - - instrumentation/opentelemetry_nebulex/lib/**/* - - instrumentation/opentelemetry_nebulex/lib/mix.* + - instrumentation/opentelemetry_nebulex/ diff --git a/.github/release-drafter-templates/opentelemetry-oban.yml b/.github/release-drafter-templates/opentelemetry-oban.yml index bd848106..4620f399 100644 --- a/.github/release-drafter-templates/opentelemetry-oban.yml +++ b/.github/release-drafter-templates/opentelemetry-oban.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Oban - v$RESOLVED_VERSION' tag-template: 'opentelemetry-oban-v$RESOLVED_VERSION' tag-prefix: opentelemetry-oban-v include-paths: - - instrumentation/opentelemetry_oban/lib/**/* - - instrumentation/opentelemetry_oban/lib/mix.* + - instrumentation/opentelemetry_oban/ diff --git a/.github/release-drafter-templates/opentelemetry-phoenix.yml b/.github/release-drafter-templates/opentelemetry-phoenix.yml index c95ad91e..698c5054 100644 --- a/.github/release-drafter-templates/opentelemetry-phoenix.yml +++ b/.github/release-drafter-templates/opentelemetry-phoenix.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Phoenix - v$RESOLVED_VERSION' tag-template: 'opentelemetry-phoenix-v$RESOLVED_VERSION' tag-prefix: opentelemetry-phoenix-v include-paths: - - instrumentation/opentelemetry_phoenix/lib/**/* - - instrumentation/opentelemetry_phoenix/lib/mix.* + - instrumentation/opentelemetry_phoenix/ diff --git a/.github/release-drafter-templates/opentelemetry-process-propagator.yml b/.github/release-drafter-templates/opentelemetry-process-propagator.yml index 0b3e3c55..267f097e 100644 --- a/.github/release-drafter-templates/opentelemetry-process-propagator.yml +++ b/.github/release-drafter-templates/opentelemetry-process-propagator.yml @@ -3,7 +3,9 @@ name-template: 'Opentelemetry Process Propagator - v$RESOLVED_VERSION' tag-template: 'opentelemetry-process-propagator-v$RESOLVED_VERSION' tag-prefix: opentelemetry-process-propagator-v include-paths: - - propagators/opentelemetry_process_propagator/src/**/* - - propagators/opentelemetry_process_propagator/rebar.* - - propagators/opentelemetry_process_propagator/lib/**/* - - propagators/opentelemetry_process_propagator/lib/mix.* + - propagators/opentelemetry_process_propagator/ + +footer: | + + --- + [Changelog](https://$REPOSITORY/blob/main/propagators/opentelemetry_process_propagator/CHANGELOG.MD) diff --git a/.github/release-drafter-templates/opentelemetry-redix.yml b/.github/release-drafter-templates/opentelemetry-redix.yml index abd6d48b..df77b0eb 100644 --- a/.github/release-drafter-templates/opentelemetry-redix.yml +++ b/.github/release-drafter-templates/opentelemetry-redix.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Redix - v$RESOLVED_VERSION' tag-template: 'opentelemetry-redix-v$RESOLVED_VERSION' tag-prefix: opentelemetry-redix-v include-paths: - - instrumentation/opentelemetry_redix/lib/**/* - - instrumentation/opentelemetry_redix/lib/mix.* + - instrumentation/opentelemetry_redix/ diff --git a/.github/release-drafter-templates/opentelemetry-req.yml b/.github/release-drafter-templates/opentelemetry-req.yml index 1e1a9fe4..f48f491f 100644 --- a/.github/release-drafter-templates/opentelemetry-req.yml +++ b/.github/release-drafter-templates/opentelemetry-req.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Req - v$RESOLVED_VERSION' tag-template: 'opentelemetry-req-v$RESOLVED_VERSION' tag-prefix: opentelemetry-req-v include-paths: - - instrumentation/opentelemetry_req/lib/**/* - - instrumentation/opentelemetry_req/lib/mix.* + - instrumentation/opentelemetry_req/ diff --git a/.github/release-drafter-templates/opentelemetry-telemetry.yml b/.github/release-drafter-templates/opentelemetry-telemetry.yml index 06963e8a..c87f0283 100644 --- a/.github/release-drafter-templates/opentelemetry-telemetry.yml +++ b/.github/release-drafter-templates/opentelemetry-telemetry.yml @@ -3,7 +3,4 @@ name-template: 'Opentelemetry Telemetry - v$RESOLVED_VERSION' tag-template: 'opentelemetry-telemetry-v$RESOLVED_VERSION' tag-prefix: opentelemetry-telemetry-v include-paths: - - utilities/opentelemetry_telemetry/src/**/* - - utilities/opentelemetry_telemetry/rebar.* - - utilities/opentelemetry_telemetry/lib/**/* - - utilities/opentelemetry_telemetry/lib/mix.* + - utilities/opentelemetry_telemetry/ diff --git a/.github/release-drafter-templates/opentelemetry-tesla.yml b/.github/release-drafter-templates/opentelemetry-tesla.yml index b0924e22..d8559f49 100644 --- a/.github/release-drafter-templates/opentelemetry-tesla.yml +++ b/.github/release-drafter-templates/opentelemetry-tesla.yml @@ -3,5 +3,4 @@ name-template: 'Opentelemetry Tesla - v$RESOLVED_VERSION' tag-template: 'opentelemetry-tesla-v$RESOLVED_VERSION' tag-prefix: opentelemetry-tesla-v include-paths: - - instrumentation/opentelemetry_tesla/lib/**/* - - instrumentation/opentelemetry_tesla/lib/mix.* + - instrumentation/opentelemetry_tesla/ diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index ca8f7c0f..4e8620a4 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,7 @@ categories: + - title: '❗️ Breaking Changes' + labels: + - 'breaking-change' - title: '🚀 Features' labels: - 'feature' @@ -9,6 +12,7 @@ categories: - 'bug' - title: '🧰 Maintenance' label: 'chore' +category-template: '### $TITLE' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. version-resolver: @@ -21,10 +25,10 @@ version-resolver: patch: labels: - 'patch' - default: patch + default: minor exclude-labels: - 'skip-changelog' template: | - ## Changes - + ## What's Changed + $CHANGES diff --git a/.github/repository-settings.md b/.github/repository-settings.md new file mode 100644 index 00000000..67fa99a7 --- /dev/null +++ b/.github/repository-settings.md @@ -0,0 +1,15 @@ +# Repository Settings Changes + +Tracks changes to this repository's settings by admins/maintainers per [community guidelines](https://github.com/open-telemetry/community/blob/main/docs/how-to-configure-new-repository.md#collaborators-and-teams). + +## Changelog + +### 2023-11-04 + +Updating settings to follow the community guidelines + +* General + * Disabled wikis + * Automatically delete head branches - checked +* Branches + * Added rule for `renovate/**/**` diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 35932d3e..bfc68249 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -20,7 +20,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read file id: set-matrix run: | @@ -35,14 +35,14 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Dataloader test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} services: postgres: - image: circleci/postgres:13.3-ram + image: circleci/postgres:13.5-ram ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: @@ -51,7 +51,7 @@ jobs: POSTGRES_DB: opentelemetry_dataloader_test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -59,7 +59,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -84,14 +84,14 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Ecto test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} services: postgres: - image: circleci/postgres:13.3-ram + image: circleci/postgres:13.5-ram ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: @@ -99,7 +99,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: opentelemetry_ecto_test steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -107,7 +107,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/deps @@ -132,13 +132,13 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Finch test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -146,7 +146,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -171,13 +171,13 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Opentelemetry HTTPoison test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -185,7 +185,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -210,13 +210,13 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Nebulex test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -224,7 +224,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -249,14 +249,14 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Oban test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} services: postgres: - image: circleci/postgres:13.3-ram + image: circleci/postgres:13.5-ram ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: @@ -264,7 +264,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: opentelemetry_oban_test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -272,7 +272,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -297,13 +297,52 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Phoenix test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + version-type: strict + otp-version: ${{ matrix.otp_version }} + elixir-version: ${{ matrix.elixir_version }} + rebar3-version: ${{ matrix.rebar3_version }} + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/deps + ~/_build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }} + - name: Fetch deps + if: steps.deps-cache.outputs.cache-hit != 'true' + run: mix deps.get + - name: Compile project + run: mix compile --warnings-as-errors + - name: Check formatting + run: mix format --check-formatted + if: matrix.check_formatted + - name: Test + run: mix test + + opentelemetry-bandit: + needs: [test-matrix] + if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_bandit')) + env: + app: "opentelemetry_bandit" + defaults: + run: + working-directory: instrumentation/${{ env.app }} + runs-on: ${{ matrix.os }} + name: Opentelemetry Bandit test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} + steps: + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -311,7 +350,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -336,7 +375,7 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Redix test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false @@ -346,7 +385,7 @@ jobs: image: redis:alpine ports: ["6379:6379"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -354,7 +393,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -379,13 +418,13 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Req test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -393,7 +432,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -418,13 +457,13 @@ jobs: defaults: run: working-directory: utilities/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Telemetry test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -432,7 +471,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -457,13 +496,13 @@ jobs: defaults: run: working-directory: propagators/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Process Propagator test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -471,7 +510,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps @@ -496,13 +535,13 @@ jobs: defaults: run: working-directory: instrumentation/${{ env.app }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-22.04 name: Opentelemetry Tesla test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) strategy: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict @@ -510,7 +549,7 @@ jobs: elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/deps diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 46fcf90a..9719545a 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -20,7 +20,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read file id: set-matrix run: | @@ -41,14 +41,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build @@ -73,14 +73,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build @@ -105,14 +105,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build @@ -137,14 +137,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build @@ -169,14 +169,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build @@ -201,14 +201,14 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: version-type: strict otp-version: ${{ matrix.otp_version }} rebar3-version: ${{ matrix.rebar3_version }} - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/_build diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index e0137549..6e2f46ab 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -5,6 +5,6 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/labeler@main + - uses: actions/labeler@v4 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/publish-mix-hex-release.yml b/.github/workflows/publish-mix-hex-release.yml new file mode 100644 index 00000000..585b261d --- /dev/null +++ b/.github/workflows/publish-mix-hex-release.yml @@ -0,0 +1,264 @@ +name: "Publish Hex Release" + +on: + workflow_dispatch: + inputs: + package: + description: "Package" + type: choice + options: + - "aws_xray" + - "cowboy" + - "dataloader" + - "ecto" + - "elli" + - "finch" + - "grpcbox" + - "http_instrumentation" + - "httpoison" + - "nebulex" + - "oban" + - "opentelemetry_telemetry" + - "phoenix" + - "process_propagator" + - "redix" + - "req" + - "tesla" + required: true + action: + description: "Publish release" + required: true + type: choice + options: + - prep + - publish + +jobs: + config: + runs-on: ubuntu-latest + outputs: + authorized_users: ${{ steps.set-config.outputs.authorized_users }} + build_tool: ${{ steps.set-config.outputs.build_tool }} + language: ${{ steps.set-config.outputs.language }} + name: ${{ steps.set-config.outputs.name }} + package_name: ${{ steps.set-config.outputs.package_name }} + tag_prefix: ${{ steps.set-config.outputs.tag_prefix}} + working_directory: ${{ steps.set-config.outputs.working_directory }} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Read file + id: set-config + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + env: + package: ${{ inputs.package }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + const steps = ${{ toJson(steps) }}; + + const configFile = JSON.parse(fs.readFileSync('.github/hex-packages.json', 'UTF8')) + const packageConfig = configFile[process.env.package] + + const workingDir = packageConfig['workingDirectory'] + switch(workingDir) { + case undefined: + case '': + core.setOutput('working_directory', './') + break; + default: + core.setOutput('working_directory', workingDir) + } + + core.setOutput('name', packageConfig.name) + core.setOutput('package_name', packageConfig.packageName) + core.setOutput('tag_prefix', packageConfig.tagPrefix) + core.setOutput('build_tool', packageConfig.buildTool) + core.setOutput('language', packageConfig.language) + core.setOutput('authorized_users', packageConfig.authorizedUsers) + + authorized_publisher: + needs: config + runs-on: ubuntu-latest + steps: + - run: ${{ contains(fromJson(needs.config.outputs.authorized_users), github.actor) }} + + publish: + needs: [authorized_publisher, config] + runs-on: ubuntu-latest + + permissions: + # write permission is required to create a github release + contents: write + pull-requests: write + steps: + - name: "Fetch Github Draft Release" + id: fetch-release + run: | + release="$(gh api repos/${{ github.repository }}/releases --jq '.[] | select(.draft == true) | select(.tag_name | test("^${{ needs.config.outputs.tag_prefix }}"))')" + + echo "gh_release=$release" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - run: npm install semver + - name: "Update Files" + id: update-files + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + const semver = require('semver'); + const needs = ${{ toJson(needs) }}; + const steps = ${{ toJson(steps) }}; + + const ghRelease = JSON.parse(steps["fetch-release"]["outputs"]["gh_release"]) + + const semverRegex = /v(?\d+\.\d+\.\d+)$/; + + let match = ghRelease.tag_name.match(semverRegex); + let version = match.groups.tagvsn; + + core.exportVariable('package_version', version); + core.exportVariable('gh_release_tag_name', ghRelease.tag_name) + + core.info(`Draft release tag to be created: ${version}`) + + var srcFilePath = ""; + var srcVersionRegex = ""; + var vsnLineTemplate = ""; + + core.debug(`Language: ${needs.config.outputs.language}`) + + switch(needs.config.outputs.language) { + case 'elixir': + srcFilePath = `${needs.config.outputs.working_directory}/mix.exs`; + core.debug(`Source file path: ${srcFilePath}`) + + srcVersionRegex = /@version\s+"[^"]+"/; + core.debug(`Source version regex: ${srcVersionRegex}`) + + vsnLineTemplate = `@version "${version}"`; + core.debug(`Version line template: ${vsnLineTemplate}`) + + core.setOutput('srcFilePath', srcFilePath); + break; + case 'elixir-erlang': + case 'erlang': + srcFilePath = `${needs.config.outputs.working_directory}/src/${needs.config.outputs.package_name}.app.src`; + core.debug(`Source file path: ${srcFilePath}`) + + srcVersionRegex = /{vsn,\s+"[^"]+"},/; + core.debug(`Source version regex: ${srcVersionRegex}`) + + vsnLineTemplate = `{vsn, "${version}"},`; + core.debug(`Version line template: ${vsnLineTemplate}`) + + core.setOutput('srcFilePath', srcFilePath); + break; + default: + core.setFailed('Language not recognized'); + } + + core.info(`srcFilePath: ${srcFilePath}`) + + let srcFile = fs.readFileSync(srcFilePath, 'UTF8') + + var srcVersion = srcFile.match(srcVersionRegex)[0].split('"')[1] + core.exportVariable('src_file_version', srcVersion) + core.info(`Source file version: ${srcVersion}`) + + core.exportVariable('releasePrepped', true) + core.setOutput('srcFileUpdated', false) + + if (!semver.eq(version, srcVersion)) { + core.exportVariable('releasePrepped', false) + core.exportVariable('published', false) + + if (semver.lt(version, srcVersion)) { + core.setFailed(`Proposed package version does not increment the current version`) + } else { + core.setOutput('prRequired') + core.notice('Release not ready. Creating PR.') + + let updatedSrcFile = srcFile.replace(srcVersionRegex, vsnLineTemplate); + fs.writeFileSync(srcFilePath, updatedSrcFile); + + core.setOutput('srcFileUpdated', true) + } + } + + - uses: erlef/setup-beam@a23b1fc4452a892cf3e92cbc2c405256cd6c27ec # v1 + with: + version-type: strict + otp-version: "25.3.2.5" + elixir-version: "1.14.5" + rebar3-version: "3.22.1" + + - name: "Mix Hex Publish Dry-run" + if: ${{ needs.config.outputs.build_tool == 'mix' }} + working-directory: ${{ needs.config.outputs.working_directory }} + env: + HEX_API_KEY: ${{ secrets.OTEL_HEX_KEY }} + run: | + mix deps.get + mix hex.publish --dry-run --yes + + - name: "Rebar3 Hex Publish Dry-run" + if: ${{ needs.config.outputs.build_tool == 'rebar3' }} + working-directory: ${{ needs.config.outputs.working_directory }} + env: + HEX_API_KEY: ${{ secrets.OTEL_HEX_KEY }} + run: | + rebar3 upgrade + rebar3 hex publish --dry-run --yes + + - name: "Open a Version Update PR" + if: ${{ env.releasePrepped == 'false' }} + id: version-update-pr + uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6 + with: + add-paths: | + ${{ steps.update-files.outputs.srcFilePath }} + base: main + branch: "${{ needs.config.outputs.tag_prefix }}${{ env.package_version }}-release" + commit-message: "Prep release v${{ env.package_version }}" + body: | + Prepare hex release v${{ env.package_version }} + labels: | + automated-pr + release + skip-changelog + title: "${{ needs.config.outputs.name }} v${{ env.package_version }}" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: "Publish Github Release" + if: ${{ env.releasePrepped == 'true' && inputs.action == 'publish' }} + id: publish-gh-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release edit ${{ env.gh_release_tag_name }} --draft=false --latest + + - name: "Mix Publish to Hex" + id: mix-hex-publish + if: ${{ env.releasePrepped == 'true' && inputs.action == 'publish' && needs.config.outputs.build_tool == 'mix' }} + working-directory: ${{ needs.config.outputs.working_directory }} + env: + HEX_API_KEY: ${{ secrets.OTEL_HEX_KEY }} + run: | + mix hex.publish --yes + echo "published=true" >> $GITHUB_ENV + + - name: "Rebar3 Publish to Hex" + id: rebar3-hex-publish + if: ${{ env.releasePrepped == 'true' && inputs.action == 'publish' && needs.config.outputs.build_tool == 'rebar3' }} + working-directory: ${{ needs.config.outputs.working_directory }} + env: + HEX_API_KEY: ${{ secrets.OTEL_HEX_KEY }} + run: | + rebar3 upgrade + rebar3 hex publish --yes + echo "published=true" >> $GITHUB_ENV diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f164c12d..55ae514a 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -8,9 +8,9 @@ on: jobs: opentelemetry-aws-xray-release: name: '[opentelemetry-aws-xray-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-aws-xray.yml env: @@ -18,9 +18,9 @@ jobs: opentelemetry-cowboy-release: name: '[opentelemetry-cowboy-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-cowboy.yml env: @@ -28,9 +28,9 @@ jobs: opentelemetry-dataloader-release: name: '[opentelemetry-dataloader-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-dataloader.yml env: @@ -38,9 +38,9 @@ jobs: opentelemetry-ecto-release: name: '[opentelemetry-ecto-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-ecto.yml env: @@ -48,9 +48,9 @@ jobs: opentelemetry-elli-release: name: '[opentelemetry-elli-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-elli.yml env: @@ -58,9 +58,9 @@ jobs: opentelemetry-finch-release: name: '[opentelemetry-finch-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-finch.yml env: @@ -68,9 +68,9 @@ jobs: opentelemetry-grpcbox-release: name: '[opentelemetry-grpcbox-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-grpcbox.yml env: @@ -78,9 +78,9 @@ jobs: opentelemetry-httpoison-release: name: '[opentelemetry-httpoison-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-httpoison.yml env: @@ -88,9 +88,9 @@ jobs: opentelemetry-instrumentation-http-release: name: '[opentelemetry-instrument-http-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-instrumentation-http.yml env: @@ -98,9 +98,9 @@ jobs: opentelemetry-nebulex-release: name: '[opentelemetry-nebulex-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-nebulex.yml env: @@ -108,9 +108,9 @@ jobs: opentelemetry-oban-release: name: '[opentelemetry-oban-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-oban.yml env: @@ -118,19 +118,29 @@ jobs: opentelemetry-phoenix-release: name: '[opentelemetry-phoenix-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-phoenix.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + opentelemetry-bandit-release: + name: '[opentelemetry-bandit-release] Draft release' + runs-on: ubuntu-22.04 + steps: + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter-templates/opentelemetry-bandit.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + opentelemetry-process-propagator-release: name: '[opentelemetry-process-propagator-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-process-propagator.yml env: @@ -138,9 +148,9 @@ jobs: opentelemetry-redix-release: name: '[opentelemetry-redix-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-redix.yml env: @@ -148,9 +158,9 @@ jobs: opentelemetry-req-release: name: '[opentelemetry-req-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-req.yml env: @@ -158,9 +168,9 @@ jobs: opentelemetry-telemetry-release: name: '[opentelemetry-telemetry-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-telemetry.yml env: @@ -168,9 +178,9 @@ jobs: opentelemetry-tesla-release: name: '[opentelemetry-tesla-release] Draft release' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter-templates/opentelemetry-tesla.yml env: diff --git a/README.md b/README.md index 8b8f0082..983523b1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@   •   Propagators   •   + Utilities +   •   Examples

@@ -25,7 +27,7 @@ ## About this project -This is a repository for OpenTelemetry Erlang & Elixir contributions that are not part of the +This is a repository for OpenTelemetry Erlang & Elixir contribution libraries that are not part of the [core repository](https://github.com/open-telemetry/opentelemetry-erlang) and core distribution of the API and SDK. @@ -40,9 +42,15 @@ OpenTelemetry can collect tracing data using instrumentation. Vendors/Users can ## Supported Runtimes -OpenTelemetry requires OTP v21.3 and above. +OpenTelemetry Contribution libraries are verified to support the last 3 OTP versions +to match the supported runtimes of the OpenTelemetry API and SDK. + +For Elixir libraries, all versions that support the last 3 OTP versions are verified. + +See [Elixir OTP Compatibility](https://hexdocs.pm/elixir/1.16/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp) for supported OTP/Elixir combinations. -See [Elixir OTP Compatibility](https://hexdocs.pm/elixir/1.12/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp) for supported OTP/Elixir combinations. +Elixir libraries should aim for the minimum supported version to be the lowest possible +it can for the code in the library, but must at least support versions outlined above. ## Contributing @@ -54,7 +62,7 @@ We'd love your help!. Use tags [up-for-grabs][up-for-grabs-issues] and - For more information on OpenTelemetry, see [opentelemetry.io](https://opentelemetry.io). - For conventions used in OpenTelemetry traces, see the following [readme](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/README.md). -- For help or feedback on this project, join us in [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-erlang-contrib/discussions), `#otel-erlang-elixir` channel in the [CNCF slack](https://slack.cncf.io/), and `#opentelemetry` channel in the [Elixir Lang slack](https://elixir-slackin.herokuapp.com/) +- For help or feedback on this project, join us in [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-erlang-contrib/discussions), `#otel-erlang-elixir` channel in the [CNCF slack](https://slack.cncf.io/), and `#opentelemetry` channel in the [Elixir Lang slack](https://elixir-slack.community/) - Erlang SIG [community page](https://github.com/open-telemetry/community#special-interest-groups) ## License diff --git a/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex b/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex index f844bd8d..d10b3d2a 100644 --- a/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex +++ b/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex @@ -31,7 +31,7 @@
Twitter @elixirphoenix
  • - Elixir on Slack + Elixir on Slack
  • Elixir on Discord diff --git a/examples/roll_dice/.formatter.exs b/examples/roll_dice/.formatter.exs new file mode 100644 index 00000000..47616780 --- /dev/null +++ b/examples/roll_dice/.formatter.exs @@ -0,0 +1,4 @@ +[ + import_deps: [:phoenix], + inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/examples/roll_dice/.gitignore b/examples/roll_dice/.gitignore new file mode 100644 index 00000000..1c80add7 --- /dev/null +++ b/examples/roll_dice/.gitignore @@ -0,0 +1,27 @@ +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where 3rd-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez + +# Temporary files, for example, from tests. +/tmp/ + +# Ignore package tarball (built via "mix hex.build"). +roll_dice-*.tar + diff --git a/examples/roll_dice/README.md b/examples/roll_dice/README.md new file mode 100644 index 00000000..04e761a2 --- /dev/null +++ b/examples/roll_dice/README.md @@ -0,0 +1,84 @@ +# RollDice + +The following example uses a basic [Phoenix](https://www.phoenixframework.org/) +web application. For more elaborate examples, see [examples](/docs/instrumentation/erlang/examples/). + +To start your Phoenix server: + + * Run `mix setup` to install and setup dependencies + * Start the opentelemetry collector and Jaeger front-end with `docker-compose up -d` + * Set your service name `export OTEL_SERVICE_NAME="roll_dice"` + * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` + +To generate and view traces: + + * Visit the new API endpoint with `curl http://localhost:4000/api/rolldice` or in your browser + * Visit [`localhost:16686`](http://localhost:16686) to see the traces in Jaeger + +For more information on the OpenTelemetry instrumentation in this example, check out the guide for getting started with [OpenTelemetry](https://opentelemetry.io/docs/instrumentation/erlang/getting-started/) + +## How did we get here? + +To begin, use the `phx` generator to create a new project. To keep things simple we'll leave out the database and html for now with the `--no-ecto` and `--no-html` flags. +In a real app, you'll probably want to include ecto configured for your preferred database with the `--database` flag (`postgres` by default). + +```shell +mix phx.new --no-ecto --no-html roll_dice +``` + +### Rolling The Dice + +Now we'll add an API endpoint that will let us roll the dice and return a random +number between 1 and 6. + +To start, we'll add a route to the `/api` scope in your router + +```elixir +# lib/roll_dice_web/router.ex +scope "/api", DiceGameWeb do + pipe_through :api + + get "/rolldice", DiceController, :roll +end +``` + +Then we'll create a new file in the controllers folder for that module. We told +the router that we will define a roll function, so we'll do that. It will return +a `200` response code and the result of a `dice_roll` function, which we will +emit a span for. We also want to set the value of the generated roll as an +attribute on the span. + +```elixir +# lib/roll_dice_web/controllers/dice_controller.ex +defmodule DiceGameWeb.DiceController do + use DiceGameWeb, :controller + require OpenTelemetry.Tracer, as: Tracer + + def roll(conn, _params) do + send_resp(conn, 200, roll_dice()) + end + + defp roll_dice do + Tracer.with_span("roll_dice") do + roll = Enum.random(1..6) + + Tracer.set_attribute("roll.value", roll) + + to_string(roll) + end + end +end + +``` + +If you point your browser/curl/etc. to [`localhost:4000/api/rolldice`](http://localhost:4000/api/rolldice) you should get a random number in response. + +Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). + +## Learn more + + * Official website: https://www.phoenixframework.org/ + * Guides: https://hexdocs.pm/phoenix/overview.html + * Docs: https://hexdocs.pm/phoenix + * Forum: https://elixirforum.com/c/phoenix-forum + * Source: https://github.com/phoenixframework/phoenix diff --git a/examples/roll_dice/config/config.exs b/examples/roll_dice/config/config.exs new file mode 100644 index 00000000..1cdc9bd7 --- /dev/null +++ b/examples/roll_dice/config/config.exs @@ -0,0 +1,30 @@ +# This file is responsible for configuring your application +# and its dependencies with the aid of the Config module. +# +# This configuration file is loaded before any dependency and +# is restricted to this project. + +# General application configuration +import Config + +# Configures the endpoint +config :roll_dice, RollDiceWeb.Endpoint, + url: [host: "localhost"], + render_errors: [ + formats: [json: RollDiceWeb.ErrorJSON], + layout: false + ], + pubsub_server: RollDice.PubSub, + live_view: [signing_salt: "F/DlUt0K"] + +# Configures Elixir's Logger +config :logger, :console, + format: "$time $metadata[$level] $message\n", + metadata: [:request_id] + +# Use Jason for JSON parsing in Phoenix +config :phoenix, :json_library, Jason + +# Import environment specific config. This must remain at the bottom +# of this file so it overrides the configuration defined above. +import_config "#{config_env()}.exs" diff --git a/examples/roll_dice/config/dev.exs b/examples/roll_dice/config/dev.exs new file mode 100644 index 00000000..8254ab7a --- /dev/null +++ b/examples/roll_dice/config/dev.exs @@ -0,0 +1,53 @@ +import Config + +# For development, we disable any cache and enable +# debugging and code reloading. +# +# The watchers configuration can be used to run external +# watchers to your application. For example, we can use it +# to bundle .js and .css sources. +config :roll_dice, RollDiceWeb.Endpoint, + # Binding to loopback ipv4 address prevents access from other machines. + # Change to `ip: {0, 0, 0, 0}` to allow access from other machines. + http: [ip: {127, 0, 0, 1}, port: 4000], + check_origin: false, + code_reloader: true, + debug_errors: true, + secret_key_base: "4zhqnz+sDpekY/MD3u0QNJpzg8PRWarEI0u+NfSqzwtKp/byfGUWwka4ALZ36yqz", + watchers: [] + +# ## SSL Support +# +# In order to use HTTPS in development, a self-signed +# certificate can be generated by running the following +# Mix task: +# +# mix phx.gen.cert +# +# Run `mix help phx.gen.cert` for more information. +# +# The `http:` config above can be replaced with: +# +# https: [ +# port: 4001, +# cipher_suite: :strong, +# keyfile: "priv/cert/selfsigned_key.pem", +# certfile: "priv/cert/selfsigned.pem" +# ], +# +# If desired, both `http:` and `https:` keys can be +# configured to run both http and https servers on +# different ports. + +# Enable dev routes for dashboard and mailbox +config :roll_dice, dev_routes: true + +# Do not include metadata nor timestamps in development logs +config :logger, :console, format: "[$level] $message\n" + +# Set a higher stacktrace during development. Avoid configuring such +# in production as building large stacktraces may be expensive. +config :phoenix, :stacktrace_depth, 20 + +# Initialize plugs at runtime for faster development compilation +config :phoenix, :plug_init_mode, :runtime diff --git a/examples/roll_dice/config/prod.exs b/examples/roll_dice/config/prod.exs new file mode 100644 index 00000000..1fe2d9e8 --- /dev/null +++ b/examples/roll_dice/config/prod.exs @@ -0,0 +1,7 @@ +import Config + +# Do not print debug messages in production +config :logger, level: :info + +# Runtime production configuration, including reading +# of environment variables, is done on config/runtime.exs. diff --git a/examples/roll_dice/config/runtime.exs b/examples/roll_dice/config/runtime.exs new file mode 100644 index 00000000..77074a33 --- /dev/null +++ b/examples/roll_dice/config/runtime.exs @@ -0,0 +1,91 @@ +import Config + +# config/runtime.exs is executed for all environments, including +# during releases. It is executed after compilation and before the +# system starts, so it is typically used to load production configuration +# and secrets from environment variables or elsewhere. Do not define +# any compile-time configuration in here, as it won't be applied. +# The block below contains prod specific runtime configuration. + +# ## Using releases +# +# If you use `mix release`, you need to explicitly enable the server +# by passing the PHX_SERVER=true when you start it: +# +# PHX_SERVER=true bin/roll_dice start +# +# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server` +# script that automatically sets the env var above. +if System.get_env("PHX_SERVER") do + config :roll_dice, RollDiceWeb.Endpoint, server: true +end + +if config_env() == :prod do + # The secret key base is used to sign/encrypt cookies and other secrets. + # A default value is used in config/dev.exs and config/test.exs but you + # want to use a different value for prod and you most likely don't want + # to check this value into version control, so we use an environment + # variable instead. + secret_key_base = + System.get_env("SECRET_KEY_BASE") || + raise """ + environment variable SECRET_KEY_BASE is missing. + You can generate one by calling: mix phx.gen.secret + """ + + host = System.get_env("PHX_HOST") || "example.com" + port = String.to_integer(System.get_env("PORT") || "4000") + + config :roll_dice, RollDiceWeb.Endpoint, + url: [host: host, port: 443, scheme: "https"], + http: [ + # Enable IPv6 and bind on all interfaces. + # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access. + # See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html + # for details about using IPv6 vs IPv4 and loopback vs public addresses. + ip: {0, 0, 0, 0, 0, 0, 0, 0}, + port: port + ], + secret_key_base: secret_key_base + + config :opentelemetry, + span_processor: :batch, + traces_exporter: :otlp + + config :opentelemetry_exporter, + otlp_protocol: :http_protobuf, + otlp_endpoint: "http://localhost:4317" + + + # ## SSL Support + # + # To get SSL working, you will need to add the `https` key + # to your endpoint configuration: + # + # config :roll_dice, RollDiceWeb.Endpoint, + # https: [ + # ..., + # port: 443, + # cipher_suite: :strong, + # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"), + # certfile: System.get_env("SOME_APP_SSL_CERT_PATH") + # ] + # + # The `cipher_suite` is set to `:strong` to support only the + # latest and more secure SSL ciphers. This means old browsers + # and clients may not be supported. You can set it to + # `:compatible` for wider support. + # + # `:keyfile` and `:certfile` expect an absolute path to the key + # and cert in disk or a relative path inside priv, for example + # "priv/ssl/server.key". For all supported SSL configuration + # options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1 + # + # We also recommend setting `force_ssl` in your endpoint, ensuring + # no data is ever sent via http, always redirecting to https: + # + # config :roll_dice, RollDiceWeb.Endpoint, + # force_ssl: [hsts: true] + # + # Check `Plug.SSL` for all available options in `force_ssl`. +end diff --git a/examples/roll_dice/config/test.exs b/examples/roll_dice/config/test.exs new file mode 100644 index 00000000..8b6a3144 --- /dev/null +++ b/examples/roll_dice/config/test.exs @@ -0,0 +1,14 @@ +import Config + +# We don't run a server during test. If one is required, +# you can enable the server option below. +config :roll_dice, RollDiceWeb.Endpoint, + http: [ip: {127, 0, 0, 1}, port: 4002], + secret_key_base: "ZclS6l1Z5RRwC1QKG8uIr4zgwQGkUYMB1AARGv3iaiC4GGRbATFBgKGKURgWPAMa", + server: false + +# Print only warnings and errors during test +config :logger, level: :warning + +# Initialize plugs at runtime for faster test compilation +config :phoenix, :plug_init_mode, :runtime diff --git a/examples/roll_dice/docker-compose.yml b/examples/roll_dice/docker-compose.yml new file mode 100644 index 00000000..ed5d7853 --- /dev/null +++ b/examples/roll_dice/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3" +services: + otel: + image: otel/opentelemetry-collector-contrib:0.76.1 + command: ["--config=/conf/otel-collector-config.yaml"] + privileged: true + ports: + - 4317:4317 + - 4318:4318 + - 55679:55679 + volumes: + - ./otel-collector-config.yaml:/conf/otel-collector-config.yaml + links: + - jaeger-all-in-one + + jaeger-all-in-one: + image: jaegertracing/all-in-one:1.45 + restart: always + environment: + COLLECTOR_OTLP_ENABLED: true + ports: + - "16686:16686" + - "4317" diff --git a/examples/roll_dice/lib/roll_dice.ex b/examples/roll_dice/lib/roll_dice.ex new file mode 100644 index 00000000..0db696a4 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice.ex @@ -0,0 +1,9 @@ +defmodule RollDice do + @moduledoc """ + RollDice keeps the contexts that define your domain + and business logic. + + Contexts are also responsible for managing your data, regardless + if it comes from the database, an external API or others. + """ +end diff --git a/examples/roll_dice/lib/roll_dice/application.ex b/examples/roll_dice/lib/roll_dice/application.ex new file mode 100644 index 00000000..7ee347a1 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice/application.ex @@ -0,0 +1,37 @@ +defmodule RollDice.Application do + # See https://hexdocs.pm/elixir/Application.html + # for more information on OTP Applications + @moduledoc false + + use Application + + @impl true + def start(_type, _args) do + :opentelemetry_cowboy.setup() + OpentelemetryPhoenix.setup(adapter: :cowboy2) + + children = [ + # Start the Telemetry supervisor + RollDiceWeb.Telemetry, + # Start the PubSub system + {Phoenix.PubSub, name: RollDice.PubSub}, + # Start the Endpoint (http/https) + RollDiceWeb.Endpoint + # Start a worker by calling: RollDice.Worker.start_link(arg) + # {RollDice.Worker, arg} + ] + + # See https://hexdocs.pm/elixir/Supervisor.html + # for other strategies and supported options + opts = [strategy: :one_for_one, name: RollDice.Supervisor] + Supervisor.start_link(children, opts) + end + + # Tell Phoenix to update the endpoint configuration + # whenever the application is updated. + @impl true + def config_change(changed, _new, removed) do + RollDiceWeb.Endpoint.config_change(changed, removed) + :ok + end +end diff --git a/examples/roll_dice/lib/roll_dice_web.ex b/examples/roll_dice/lib/roll_dice_web.ex new file mode 100644 index 00000000..de1af221 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web.ex @@ -0,0 +1,66 @@ +defmodule RollDiceWeb do + @moduledoc """ + The entrypoint for defining your web interface, such + as controllers, components, channels, and so on. + + This can be used in your application as: + + use RollDiceWeb, :controller + use RollDiceWeb, :html + + The definitions below will be executed for every controller, + component, etc, so keep them short and clean, focused + on imports, uses and aliases. + + Do NOT define functions inside the quoted expressions + below. Instead, define additional modules and import + those modules here. + """ + + def static_paths, do: ~w(assets fonts images favicon.ico robots.txt) + + def router do + quote do + use Phoenix.Router, helpers: false + + # Import common connection and controller functions to use in pipelines + import Plug.Conn + import Phoenix.Controller + end + end + + def channel do + quote do + use Phoenix.Channel + end + end + + def controller do + quote do + use Phoenix.Controller, + formats: [:html, :json], + layouts: [html: RollDiceWeb.Layouts] + + import Plug.Conn + import RollDiceWeb.Gettext + + unquote(verified_routes()) + end + end + + def verified_routes do + quote do + use Phoenix.VerifiedRoutes, + endpoint: RollDiceWeb.Endpoint, + router: RollDiceWeb.Router, + statics: RollDiceWeb.static_paths() + end + end + + @doc """ + When used, dispatch to the appropriate controller/view/etc. + """ + defmacro __using__(which) when is_atom(which) do + apply(__MODULE__, which, []) + end +end diff --git a/examples/roll_dice/lib/roll_dice_web/controllers/dice_controller.ex b/examples/roll_dice/lib/roll_dice_web/controllers/dice_controller.ex new file mode 100644 index 00000000..a2f4e612 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/controllers/dice_controller.ex @@ -0,0 +1,18 @@ +defmodule RollDiceWeb.DiceController do + use RollDiceWeb, :controller + require OpenTelemetry.Tracer, as: Tracer + + def roll(conn, _params) do + send_resp(conn, 200, roll_dice()) + end + + defp roll_dice do + Tracer.with_span "roll_dice" do + roll = Enum.random(1..6) + + Tracer.set_attribute("roll.value", roll) + + to_string(roll) + end + end +end diff --git a/examples/roll_dice/lib/roll_dice_web/controllers/error_json.ex b/examples/roll_dice/lib/roll_dice_web/controllers/error_json.ex new file mode 100644 index 00000000..8e508898 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/controllers/error_json.ex @@ -0,0 +1,15 @@ +defmodule RollDiceWeb.ErrorJSON do + # If you want to customize a particular status code, + # you may add your own clauses, such as: + # + # def render("500.json", _assigns) do + # %{errors: %{detail: "Internal Server Error"}} + # end + + # By default, Phoenix returns the status message from + # the template name. For example, "404.json" becomes + # "Not Found". + def render(template, _assigns) do + %{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}} + end +end diff --git a/examples/roll_dice/lib/roll_dice_web/endpoint.ex b/examples/roll_dice/lib/roll_dice_web/endpoint.ex new file mode 100644 index 00000000..e59df0a6 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/endpoint.ex @@ -0,0 +1,44 @@ +defmodule RollDiceWeb.Endpoint do + use Phoenix.Endpoint, otp_app: :roll_dice + + # The session will be stored in the cookie and signed, + # this means its contents can be read but not tampered with. + # Set :encryption_salt if you would also like to encrypt it. + @session_options [ + store: :cookie, + key: "_roll_dice_key", + signing_salt: "A5RXaafk", + same_site: "Lax" + ] + + # socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]] + + # Serve at "/" the static files from "priv/static" directory. + # + # You should set gzip to true if you are running phx.digest + # when deploying your static files in production. + plug Plug.Static, + at: "/", + from: :roll_dice, + gzip: false, + only: RollDiceWeb.static_paths() + + # Code reloading can be explicitly enabled under the + # :code_reloader configuration of your endpoint. + if code_reloading? do + plug Phoenix.CodeReloader + end + + plug Plug.RequestId + plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint] + + plug Plug.Parsers, + parsers: [:urlencoded, :multipart, :json], + pass: ["*/*"], + json_decoder: Phoenix.json_library() + + plug Plug.MethodOverride + plug Plug.Head + plug Plug.Session, @session_options + plug RollDiceWeb.Router +end diff --git a/examples/roll_dice/lib/roll_dice_web/gettext.ex b/examples/roll_dice/lib/roll_dice_web/gettext.ex new file mode 100644 index 00000000..af0ce56d --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/gettext.ex @@ -0,0 +1,24 @@ +defmodule RollDiceWeb.Gettext do + @moduledoc """ + A module providing Internationalization with a gettext-based API. + + By using [Gettext](https://hexdocs.pm/gettext), + your module gains a set of macros for translations, for example: + + import RollDiceWeb.Gettext + + # Simple translation + gettext("Here is the string to translate") + + # Plural translation + ngettext("Here is the string to translate", + "Here are the strings to translate", + 3) + + # Domain-based translation + dgettext("errors", "Here is the error message to translate") + + See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. + """ + use Gettext, otp_app: :roll_dice +end diff --git a/examples/roll_dice/lib/roll_dice_web/router.ex b/examples/roll_dice/lib/roll_dice_web/router.ex new file mode 100644 index 00000000..ccbe7510 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/router.ex @@ -0,0 +1,13 @@ +defmodule RollDiceWeb.Router do + use RollDiceWeb, :router + + pipeline :api do + plug :accepts, ["json"] + end + + scope "/api", RollDiceWeb do + pipe_through :api + + get "/rolldice", DiceController, :roll + end +end diff --git a/examples/roll_dice/lib/roll_dice_web/telemetry.ex b/examples/roll_dice/lib/roll_dice_web/telemetry.ex new file mode 100644 index 00000000..111d9b54 --- /dev/null +++ b/examples/roll_dice/lib/roll_dice_web/telemetry.ex @@ -0,0 +1,69 @@ +defmodule RollDiceWeb.Telemetry do + use Supervisor + import Telemetry.Metrics + + def start_link(arg) do + Supervisor.start_link(__MODULE__, arg, name: __MODULE__) + end + + @impl true + def init(_arg) do + children = [ + # Telemetry poller will execute the given period measurements + # every 10_000ms. Learn more here: https://hexdocs.pm/telemetry_metrics + {:telemetry_poller, measurements: periodic_measurements(), period: 10_000} + # Add reporters as children of your supervision tree. + # {Telemetry.Metrics.ConsoleReporter, metrics: metrics()} + ] + + Supervisor.init(children, strategy: :one_for_one) + end + + def metrics do + [ + # Phoenix Metrics + summary("phoenix.endpoint.start.system_time", + unit: {:native, :millisecond} + ), + summary("phoenix.endpoint.stop.duration", + unit: {:native, :millisecond} + ), + summary("phoenix.router_dispatch.start.system_time", + tags: [:route], + unit: {:native, :millisecond} + ), + summary("phoenix.router_dispatch.exception.duration", + tags: [:route], + unit: {:native, :millisecond} + ), + summary("phoenix.router_dispatch.stop.duration", + tags: [:route], + unit: {:native, :millisecond} + ), + summary("phoenix.socket_connected.duration", + unit: {:native, :millisecond} + ), + summary("phoenix.channel_joined.duration", + unit: {:native, :millisecond} + ), + summary("phoenix.channel_handled_in.duration", + tags: [:event], + unit: {:native, :millisecond} + ), + + # VM Metrics + summary("vm.memory.total", unit: {:byte, :kilobyte}), + summary("vm.total_run_queue_lengths.total"), + summary("vm.total_run_queue_lengths.cpu"), + summary("vm.total_run_queue_lengths.io") + ] + end + + defp periodic_measurements do + [ + # A module, function and arguments to be invoked periodically. + # This function must call :telemetry.execute/3 and a metric must be added above. + # {RollDiceWeb, :count_users, []} + ] + end +end diff --git a/examples/roll_dice/mix.exs b/examples/roll_dice/mix.exs new file mode 100644 index 00000000..6e201818 --- /dev/null +++ b/examples/roll_dice/mix.exs @@ -0,0 +1,65 @@ +defmodule RollDice.MixProject do + use Mix.Project + + def project do + [ + app: :roll_dice, + version: "0.1.0", + elixir: "~> 1.14", + elixirc_paths: elixirc_paths(Mix.env()), + start_permanent: Mix.env() == :prod, + aliases: aliases(), + deps: deps(), + releases: [ + roll_dice: [ + applications: [opentelemetry_exporter: :permanent, opentelemetry: :temporary] + ] + ] + ] + end + + # Configuration for the OTP application. + # + # Type `mix help compile.app` for more information. + def application do + [ + mod: {RollDice.Application, []}, + extra_applications: [:logger, :runtime_tools] + ] + end + + # Specifies which paths to compile per environment. + defp elixirc_paths(:test), do: ["lib", "test/support"] + defp elixirc_paths(_), do: ["lib"] + + # Specifies your project dependencies. + # + # Type `mix help deps` for examples and options. + defp deps do + [ + {:phoenix, "~> 1.7.7"}, + {:telemetry_metrics, "~> 0.6"}, + {:telemetry_poller, "~> 1.0"}, + {:gettext, "~> 0.20"}, + {:jason, "~> 1.2"}, + {:plug_cowboy, "~> 2.5"}, + {:opentelemetry_exporter, "~> 1.5"}, + {:opentelemetry, "~> 1.3"}, + {:opentelemetry_api, "~> 1.2"}, + {:opentelemetry_phoenix, "~> 1.1"}, + {:opentelemetry_cowboy, "~> 0.2"}, + ] + end + + # Aliases are shortcuts or tasks specific to the current project. + # For example, to install project dependencies and perform other setup tasks, run: + # + # $ mix setup + # + # See the documentation for `Mix` for more info on aliases. + defp aliases do + [ + setup: ["deps.get"] + ] + end +end diff --git a/examples/roll_dice/mix.lock b/examples/roll_dice/mix.lock new file mode 100644 index 00000000..2b1eca76 --- /dev/null +++ b/examples/roll_dice/mix.lock @@ -0,0 +1,40 @@ +%{ + "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, + "castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"}, + "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, + "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, + "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, + "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, + "expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"}, + "gettext": {:hex, :gettext, "0.23.1", "821e619a240e6000db2fc16a574ef68b3bd7fe0167ccc264a81563cc93e67a31", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "19d744a36b809d810d610b57c27b934425859d158ebd56561bc41f7eeb8795db"}, + "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, + "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, + "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "nimble_options": {:hex, :nimble_options, "1.0.2", "92098a74df0072ff37d0c12ace58574d26880e522c22801437151a159392270e", [:mix], [], "hexpm", "fd12a8db2021036ce12a309f26f564ec367373265b53e25403f0ee697380f1b8"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_cowboy": {:hex, :opentelemetry_cowboy, "0.2.1", "feb09d4abe48c6d983fd46ea7b500cdf31b0f77c80702e175fe1fd86f8a52445", [:rebar3], [{:cowboy_telemetry, "~> 0.4", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_telemetry, "~> 1.0", [hex: :opentelemetry_telemetry, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "21ba198dd51294211a498dee720a30d2c2cb4d35ddc843d84f2d4e0a9681be49"}, + "opentelemetry_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, + "opentelemetry_phoenix": {:hex, :opentelemetry_phoenix, "1.1.1", "b6ab632d39138c2cc9b6e52b65d560545904f659c42647856d669e593110521f", [:mix], [{:nimble_options, "~> 0.5 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}, {:opentelemetry_telemetry, "~> 1.0", [hex: :opentelemetry_telemetry, repo: "hexpm", optional: false]}, {:plug, ">= 1.11.0", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "942850ce28fe21f98d98a743b94163820ce5ba6488333a806dbd1e8161a653d8"}, + "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.2", "85244a49f0c32ae1e2f3d58c477c265bd6125ee3480ade82b0fa9324b85ed3f0", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "04db13302a34bea8350a13ed9d49c22dfd32c4bc590d8aa88b6b4b7e4f346c61"}, + "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, + "phoenix": {:hex, :phoenix, "1.7.7", "4cc501d4d823015007ba3cdd9c41ecaaf2ffb619d6fb283199fa8ddba89191e0", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "8966e15c395e5e37591b6ed0bd2ae7f48e961f0f60ac4c733f9566b519453085"}, + "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, + "phoenix_template": {:hex, :phoenix_template, "1.0.3", "32de561eefcefa951aead30a1f94f1b5f0379bc9e340bb5c667f65f1edfa4326", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "16f4b6588a4152f3cc057b9d0c0ba7e82ee23afa65543da535313ad8d25d8e2c"}, + "plug": {:hex, :plug, "1.15.1", "b7efd81c1a1286f13efb3f769de343236bd8b7d23b4a9f40d3002fc39ad8f74c", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "459497bd94d041d98d948054ec6c0b76feacd28eec38b219ca04c0de13c79d30"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, + "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.1", "315d9163a1d4660aedc3fee73f33f1d355dcc76c5c3ab3d59e76e3edf80eef1f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7be9e0871c41732c233be71e4be11b96e56177bf15dde64a8ac9ce72ac9834c6"}, + "telemetry_poller": {:hex, :telemetry_poller, "1.0.0", "db91bb424e07f2bb6e73926fcafbfcbcb295f0193e0a00e825e589a0a47e8453", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b3a24eafd66c3f42da30fc3ca7dda1e9d546c12250a2d60d7b81d264fbec4f6e"}, + "telemetry_registry": {:hex, :telemetry_registry, "0.3.1", "14a3319a7d9027bdbff7ebcacf1a438f5f5c903057b93aee484cca26f05bdcba", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6d0ca77b691cf854ed074b459a93b87f4c7f5512f8f7743c635ca83da81f939e"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.20.0", "1ac0c53f95e201feb8d398ef9d764ae74175231289d89f166ba88a7f50cd8e73", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "ab57b74b1a63dc5775650699a3ec032ec0065005eff1f020818742b7312a8426"}, + "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, + "websock_adapter": {:hex, :websock_adapter, "0.5.4", "7af8408e7ed9d56578539594d1ee7d8461e2dd5c3f57b0f2a5352d610ddde757", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d2c238c79c52cbe223fcdae22ca0bb5007a735b9e933870e241fce66afb4f4ab"}, +} diff --git a/examples/roll_dice/otel-collector-config.yaml b/examples/roll_dice/otel-collector-config.yaml new file mode 100644 index 00000000..d4605163 --- /dev/null +++ b/examples/roll_dice/otel-collector-config.yaml @@ -0,0 +1,47 @@ +# OpenTelemetry Collector config that receives OTLP and exports to Zipkin +receivers: + otlp: + protocols: + grpc: + endpoint: "0.0.0.0:4317" + http: + cors: + allowed_origins: + - "http://localhost:4000" + endpoint: "0.0.0.0:4318" +processors: + batch: + send_batch_size: 1024 + timeout: 5s +exporters: + otlp: + endpoint: jaeger-all-in-one:4317 + tls: + insecure: true + + logging: + loglevel: debug + sampling_initial: 1 + sampling_thereafter: 1 + +extensions: + zpages: {} + +service: + telemetry: + logs: + level: "debug" + extensions: [zpages] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [logging, otlp] + metrics: + receivers: [otlp] + processors: [batch] + exporters: [logging] + logs: + receivers: [otlp] + processors: [batch] + exporters: [logging] diff --git a/examples/roll_dice/priv/gettext/en/LC_MESSAGES/errors.po b/examples/roll_dice/priv/gettext/en/LC_MESSAGES/errors.po new file mode 100644 index 00000000..cdec3a11 --- /dev/null +++ b/examples/roll_dice/priv/gettext/en/LC_MESSAGES/errors.po @@ -0,0 +1,11 @@ +## `msgid`s in this file come from POT (.pot) files. +## +## Do not add, change, or remove `msgid`s manually here as +## they're tied to the ones in the corresponding POT file +## (with the same domain). +## +## Use `mix gettext.extract --merge` or `mix gettext.merge` +## to merge POT files into PO files. +msgid "" +msgstr "" +"Language: en\n" diff --git a/examples/roll_dice/priv/gettext/errors.pot b/examples/roll_dice/priv/gettext/errors.pot new file mode 100644 index 00000000..d6f47fa8 --- /dev/null +++ b/examples/roll_dice/priv/gettext/errors.pot @@ -0,0 +1,10 @@ +## This is a PO Template file. +## +## `msgid`s here are often extracted from source code. +## Add new translations manually only if they're dynamic +## translations that can't be statically extracted. +## +## Run `mix gettext.extract` to bring this file up to +## date. Leave `msgstr`s empty as changing them here has no +## effect: edit them in PO (`.po`) files instead. + diff --git a/examples/roll_dice/priv/static/favicon.ico b/examples/roll_dice/priv/static/favicon.ico new file mode 100644 index 00000000..73de524a Binary files /dev/null and b/examples/roll_dice/priv/static/favicon.ico differ diff --git a/examples/roll_dice/priv/static/robots.txt b/examples/roll_dice/priv/static/robots.txt new file mode 100644 index 00000000..26e06b5f --- /dev/null +++ b/examples/roll_dice/priv/static/robots.txt @@ -0,0 +1,5 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/examples/roll_dice/test/roll_dice_web/controllers/error_json_test.exs b/examples/roll_dice/test/roll_dice_web/controllers/error_json_test.exs new file mode 100644 index 00000000..b0a9fb1d --- /dev/null +++ b/examples/roll_dice/test/roll_dice_web/controllers/error_json_test.exs @@ -0,0 +1,12 @@ +defmodule RollDiceWeb.ErrorJSONTest do + use RollDiceWeb.ConnCase, async: true + + test "renders 404" do + assert RollDiceWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}} + end + + test "renders 500" do + assert RollDiceWeb.ErrorJSON.render("500.json", %{}) == + %{errors: %{detail: "Internal Server Error"}} + end +end diff --git a/examples/roll_dice/test/support/conn_case.ex b/examples/roll_dice/test/support/conn_case.ex new file mode 100644 index 00000000..1f12f5ff --- /dev/null +++ b/examples/roll_dice/test/support/conn_case.ex @@ -0,0 +1,37 @@ +defmodule RollDiceWeb.ConnCase do + @moduledoc """ + This module defines the test case to be used by + tests that require setting up a connection. + + Such tests rely on `Phoenix.ConnTest` and also + import other functionality to make it easier + to build common data structures and query the data layer. + + Finally, if the test case interacts with the database, + we enable the SQL sandbox, so changes done to the database + are reverted at the end of every test. If you are using + PostgreSQL, you can even run database tests asynchronously + by setting `use RollDiceWeb.ConnCase, async: true`, although + this option is not recommended for other databases. + """ + + use ExUnit.CaseTemplate + + using do + quote do + # The default endpoint for testing + @endpoint RollDiceWeb.Endpoint + + use RollDiceWeb, :verified_routes + + # Import conveniences for testing with connections + import Plug.Conn + import Phoenix.ConnTest + import RollDiceWeb.ConnCase + end + end + + setup _tags do + {:ok, conn: Phoenix.ConnTest.build_conn()} + end +end diff --git a/examples/roll_dice/test/test_helper.exs b/examples/roll_dice/test/test_helper.exs new file mode 100644 index 00000000..869559e7 --- /dev/null +++ b/examples/roll_dice/test/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start() diff --git a/examples/roll_dice_elli/package-lock.json b/examples/roll_dice_elli/package-lock.json index 73af200d..b94c2c0c 100644 --- a/examples/roll_dice_elli/package-lock.json +++ b/examples/roll_dice_elli/package-lock.json @@ -806,9 +806,9 @@ } }, "node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, diff --git a/instrumentation/opentelemetry_bandit/.formatter.exs b/instrumentation/opentelemetry_bandit/.formatter.exs new file mode 100644 index 00000000..d2cda26e --- /dev/null +++ b/instrumentation/opentelemetry_bandit/.formatter.exs @@ -0,0 +1,4 @@ +# Used by "mix format" +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/instrumentation/opentelemetry_bandit/.gitignore b/instrumentation/opentelemetry_bandit/.gitignore new file mode 100644 index 00000000..96dbe8d8 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/.gitignore @@ -0,0 +1,27 @@ +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez + +# Ignore package tarball (built via "mix hex.build"). +*.tar + +# Temporary files, for example, from tests. +/tmp/ +.DS_Store diff --git a/instrumentation/opentelemetry_bandit/CHANGELOG.md b/instrumentation/opentelemetry_bandit/CHANGELOG.md new file mode 100644 index 00000000..0d9bfb4b --- /dev/null +++ b/instrumentation/opentelemetry_bandit/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## [0.1.4] - 2023-12-14 +### Changed +- Prepare to the public release diff --git a/instrumentation/opentelemetry_bandit/LICENSE b/instrumentation/opentelemetry_bandit/LICENSE new file mode 100644 index 00000000..4947287f --- /dev/null +++ b/instrumentation/opentelemetry_bandit/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/instrumentation/opentelemetry_bandit/README.md b/instrumentation/opentelemetry_bandit/README.md new file mode 100644 index 00000000..d22d80db --- /dev/null +++ b/instrumentation/opentelemetry_bandit/README.md @@ -0,0 +1,37 @@ +# OpentelemetryBandit + +[![EEF Observability WG project](https://img.shields.io/badge/EEF-Observability-black)](https://github.com/erlef/eef-observability-wg) +[![Hex.pm](https://img.shields.io/hexpm/v/opentelemetry_bandit)](https://hex.pm/packages/opentelemetry_bandit) +![Build Status](https://github.com/opentelemetry-beam/opentelemetry_bandit/workflows/Tests/badge.svg) + +Telemetry handler that creates Opentelemetry spans from [Bandit events](https://hexdocs.pm/bandit/Bandit.Telemetry.html#content). + +After installing, setup the handler in your application behaviour before your top-level supervisor starts. + +```elixir +OpentelemetryBandit.setup() +``` + +When phoenix is used, setup telemetry this way: + +```elixir +OpentelemetryBandit.setup() +OpentelemetryPhoenix.setup(adapter: :bandit) +``` + +## Compatibility Matrix + +| OpentelemetryPhoenix Version | Otel Version | Notes | +| :--------------------------- | :----------- | :---- | +| | | | +| v0.1.4 | v1.0 | | + +## Installation + +```elixir +def deps do + [ + {:opentelemetry_bandit, "~> 0.1.4"} + ] +end +``` diff --git a/instrumentation/opentelemetry_bandit/config/config.exs b/instrumentation/opentelemetry_bandit/config/config.exs new file mode 100644 index 00000000..30930170 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/config/config.exs @@ -0,0 +1,7 @@ +import Config + +try do + import_config "#{Mix.env()}.exs" +rescue + _ -> :ok +end diff --git a/instrumentation/opentelemetry_bandit/config/test.exs b/instrumentation/opentelemetry_bandit/config/test.exs new file mode 100644 index 00000000..6a57e7b0 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/config/test.exs @@ -0,0 +1,6 @@ +import Config + +config :opentelemetry, + processors: [{:otel_simple_processor, %{}}] + +config :logger, level: :error diff --git a/instrumentation/opentelemetry_bandit/lib/opentelemetry_bandit.ex b/instrumentation/opentelemetry_bandit/lib/opentelemetry_bandit.ex new file mode 100644 index 00000000..7dec6d7c --- /dev/null +++ b/instrumentation/opentelemetry_bandit/lib/opentelemetry_bandit.ex @@ -0,0 +1,177 @@ +defmodule OpentelemetryBandit do + @moduledoc """ + OpentelemetryBandit uses [telemetry](https://hexdocs.pm/telemetry/) handlers to create `OpenTelemetry` spans. + + Supported: + 1. :bandit, :request, :stop + 2. :bandit, :request, :exception + 3. :bandit, :websocket, :stop + """ + + alias OpenTelemetry.SemanticConventions.Trace + require Trace + require OpenTelemetry.Tracer + + @doc """ + Initializes and configures the telemetry handlers. + """ + @spec setup(any) :: :ok + def setup(_opts \\ []) do + :telemetry.attach( + {__MODULE__, :request_stop}, + [:bandit, :request, :stop], + &__MODULE__.handle_request_stop/4, + %{} + ) + + :telemetry.attach( + {__MODULE__, :request_exception}, + [:bandit, :request, :exception], + &__MODULE__.handle_request_exception/4, + %{} + ) + + :telemetry.attach( + {__MODULE__, :websocket_stop}, + [:bandit, :websocket, :stop], + &__MODULE__.handle_websocket_stop/4, + %{} + ) + end + + def handle_request_stop(_event, measurements, meta, _config) do + conn = Map.get(meta, :conn) + duration = measurements.duration + end_time = :opentelemetry.timestamp() + start_time = end_time - duration + + url = extract_url(meta, conn) + request_path = extract_request_path(meta, conn) + + attributes = + if Map.has_key?(meta, :error) do + %{ + Trace.http_url() => url, + Trace.http_method() => meta.method, + Trace.net_transport() => :"IP.TCP", + Trace.http_response_content_length() => measurements.resp_body_bytes, + Trace.http_status_code() => meta.status + } + else + %{ + Trace.http_url() => url, + Trace.http_client_ip() => client_ip(conn), + Trace.http_scheme() => conn.scheme, + Trace.net_peer_name() => conn.host, + Trace.net_peer_port() => conn.port, + Trace.http_target() => conn.request_path, + Trace.http_method() => meta.method, + Trace.http_status_code() => meta.status, + Trace.http_response_content_length() => measurements.resp_body_bytes, + Trace.net_transport() => :"IP.TCP", + Trace.http_user_agent() => user_agent(conn) + } + end + + span_kind = if Map.has_key?(meta, :error), do: :error, else: :server + + span_id = "HTTP #{meta.method} #{request_path}" |> String.trim() + + OpenTelemetry.Tracer.start_span(span_id, %{ + attributes: attributes, + start_time: start_time, + end_time: end_time, + kind: span_kind + }) + |> set_span_status(meta, Map.get(meta, :error, "")) + |> OpenTelemetry.Span.end_span() + + OpenTelemetry.Ctx.clear() + end + + def handle_request_exception(_event, _measurements, meta, _config) do + OpenTelemetry.Tracer.start_span("HTTP exception #{inspect(meta.exception.__struct__)}", %{ + kind: :error, + status: :error + }) + |> set_span_status(meta, inspect(meta.stacktrace)) + |> OpenTelemetry.Span.end_span() + + OpenTelemetry.Ctx.clear() + end + + def handle_websocket_stop(_event, measurements, meta, _config) do + duration = measurements.duration + end_time = :opentelemetry.timestamp() + start_time = end_time - duration + + attributes = %{ + :"websocket.recv.binary.frame.bytes" => Map.get(measurements, :send_binary_frame_bytes, 0), + :"websocket.send.binary.frame.bytes" => Map.get(measurements, :recv_binary_frame_bytes, 0), + Trace.net_transport() => :websocket + } + + span_kind = if Map.has_key?(meta, :error), do: :error, else: :server + + OpenTelemetry.Tracer.start_span("Websocket", %{ + attributes: attributes, + start_time: start_time, + end_time: end_time, + kind: span_kind + }) + |> set_span_status(meta, Map.get(meta, :error, "")) + |> OpenTelemetry.Span.end_span() + + OpenTelemetry.Ctx.clear() + end + + defp set_span_status(span, meta, message) do + status = if Map.has_key?(meta, :error) || message != "", do: :error, else: :ok + + OpenTelemetry.Span.set_status(span, OpenTelemetry.status(status, message)) + span + end + + defp extract_url(%{error: _} = meta, _conn) do + case Map.get(meta, :request_target) do + nil -> "" + {scheme, host, port, path} -> build_url(scheme, host, port, path) + end + end + + defp extract_url(_meta, conn) do + build_url(conn.scheme, conn.host, conn.port, conn.request_path) + end + + defp extract_request_path(%{error: _} = meta, _conn) do + case Map.get(meta, :request_target) do + nil -> "" + {_, _, _, path} -> path || "" + end + end + + defp extract_request_path(_meta, conn) do + conn.request_path + end + + defp build_url(scheme, host, port, path), do: "#{scheme}://#{host}:#{port}#{path}" + + defp user_agent(conn) do + case Plug.Conn.get_req_header(conn, "user-agent") do + [] -> "" + [head | _] -> head + end + end + + defp client_ip(%{remote_ip: remote_ip} = conn) do + case Plug.Conn.get_req_header(conn, "x-forwarded-for") do + [] -> + remote_ip + |> :inet_parse.ntoa() + |> to_string() + + [ip_address | _] -> + ip_address + end + end +end diff --git a/instrumentation/opentelemetry_bandit/mix.exs b/instrumentation/opentelemetry_bandit/mix.exs new file mode 100644 index 00000000..cf48e3b3 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/mix.exs @@ -0,0 +1,88 @@ +defmodule OpentelemetryBandit.MixProject do + use Mix.Project + + @version "0.1.4" + + def project do + [ + app: :opentelemetry_bandit, + version: @version, + elixir: "~> 1.14", + aliases: aliases(), + start_permanent: Mix.env() == :prod, + description: description(), + package: package(), + elixirc_paths: elixirc_path(Mix.env()), + deps: deps(), + test_coverage: [tool: ExCoveralls], + preferred_cli_env: [ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.post": :test, + "coveralls.html": :test, + "coveralls.cobertura": :test + ], + docs: [ + main: "readme", + extras: ["README.md"] + ] + ] + end + + # Run "mix help compile.app" to learn about applications. + def application do + [ + extra_applications: [:logger] + ] + end + + defp description do + """ + Telemetry handler that creates Opentelemetry spans from Bandit events. + """ + end + + defp package do + [ + files: ~w(lib .formatter.exs mix.exs LICENSE* README* CHANGELOG*), + maintainers: ["Artem Solomatin"], + licenses: ["Apache-2.0"], + + links: %{ + "GitHub" => + "https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_bandit", + "OpenTelemetry Erlang" => "https://github.com/open-telemetry/opentelemetry-erlang", + "OpenTelemetry Erlang Contrib" => + "https://github.com/open-telemetry/opentelemetry-erlang-contrib", + "OpenTelemetry.io" => "https://opentelemetry.io" + } + ] + end + + defp elixirc_path(:test), do: ["lib/", "test/support"] + defp elixirc_path(_), do: ["lib/"] + + # Run "mix help deps" to learn about dependencies. + defp deps do + [ + {:opentelemetry_api, "~> 1.2"}, + {:opentelemetry_semantic_conventions, "~> 0.2"}, + {:opentelemetry_telemetry, "~> 1.0"}, + {:plug, ">= 1.15.0"}, + {:telemetry, "~> 1.2"}, + + # dev dependencies + {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, + {:excoveralls, "~> 0.18", only: :test}, + {:bandit, "~> 1.0", only: [:dev, :test], runtime: false}, + {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}, + {:opentelemetry, "~> 1.0", only: [:dev, :test]}, + {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, + {:req, "~> 0.4", only: [:dev, :test]} + ] + end + + defp aliases do + ["test.coverage": ["coveralls.cobertura"]] + end +end diff --git a/instrumentation/opentelemetry_bandit/mix.lock b/instrumentation/opentelemetry_bandit/mix.lock new file mode 100644 index 00000000..35138cee --- /dev/null +++ b/instrumentation/opentelemetry_bandit/mix.lock @@ -0,0 +1,41 @@ +%{ + "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, + "bandit": {:hex, :bandit, "1.0.0", "2bd87bbf713d0eed0090f2fa162cd1676198122e6c2b68a201c706e354a6d5e5", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "32acf6ac030fee1f99fd9c3fcf81671911ae8637e0a61c98111861b466efafdb"}, + "castore": {:hex, :castore, "1.0.5", "9eeebb394cc9a0f3ae56b813459f990abb0a3dedee1be6b27fdb50301930502f", [:mix], [], "hexpm", "8d7c597c3e4a64c395980882d4bca3cebb8d74197c590dc272cfd3b6a6310578"}, + "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, + "dialyxir": {:hex, :dialyxir, "1.4.1", "a22ed1e7bd3a3e3f197b68d806ef66acb61ee8f57b3ac85fc5d57354c5482a93", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "84b795d6d7796297cca5a3118444b80c7d94f7ce247d49886e7c291e1ae49801"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, + "ex_doc": {:hex, :ex_doc, "0.31.0", "06eb1dfd787445d9cab9a45088405593dd3bb7fe99e097eaa71f37ba80c7a676", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5350cafa6b7f77bdd107aa2199fe277acf29d739aba5aee7e865fc680c62a110"}, + "excoveralls": {:hex, :excoveralls, "0.18.0", "b92497e69465dc51bc37a6422226ee690ab437e4c06877e836f1c18daeb35da9", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1109bb911f3cb583401760be49c02cbbd16aed66ea9509fc5479335d284da60b"}, + "finch": {:hex, :finch, "0.17.0", "17d06e1d44d891d20dbd437335eebe844e2426a0cd7e3a3e220b461127c73f70", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8d014a661bb6a437263d4b5abf0bcbd3cf0deb26b1e8596f2a271d22e48934c7"}, + "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, + "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, + "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, + "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_ownership": {:hex, :nimble_ownership, "0.2.1", "3e44c72ebe8dd213db4e13aff4090aaa331d158e72ce1891d02e0ffb05a1eb2d", [:mix], [], "hexpm", "bf38d2ef4fb990521a4ecf112843063c1f58a5c602484af4c7977324042badee"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, + "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, + "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, + "req": {:hex, :req, "0.4.9", "d079876e952f28b60fb0f595ae6492d1bc5b727b376746776014d541b9b56187", [:mix], [{:aws_signature, "~> 0.3.0", [hex: :aws_signature, repo: "hexpm", optional: true]}, {:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17.0", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:nimble_ownership, "~> 0.2.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "c8c2bff52a336586b63ee9f047078637e2e91073bf948e312f84caade28b521b"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "telemetry_registry": {:hex, :telemetry_registry, "0.3.1", "14a3319a7d9027bdbff7ebcacf1a438f5f5c903057b93aee484cca26f05bdcba", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6d0ca77b691cf854ed074b459a93b87f4c7f5512f8f7743c635ca83da81f939e"}, + "thousand_island": {:hex, :thousand_island, "1.0.0", "63fc8807d8607c9d74fa670996897c8c8a1f2022c8c68d024182e45249acd756", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "996320c72ba8f34d7be9b02900622e44341649f24359e0f67643e4dda8f23995"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.20.0", "1ac0c53f95e201feb8d398ef9d764ae74175231289d89f166ba88a7f50cd8e73", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "ab57b74b1a63dc5775650699a3ec032ec0065005eff1f020818742b7312a8426"}, + "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, +} diff --git a/instrumentation/opentelemetry_bandit/test/bandit/opentelemetry_bandit_test.exs b/instrumentation/opentelemetry_bandit/test/bandit/opentelemetry_bandit_test.exs new file mode 100644 index 00000000..b00533d7 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/test/bandit/opentelemetry_bandit_test.exs @@ -0,0 +1,245 @@ +defmodule OpentelemetryBanditTest do + use ExUnit.Case, async: true + + require OpenTelemetry.Tracer + require OpenTelemetry.Span + require Record + + use ServerHelper + + for {name, spec} <- Record.extract_all(from_lib: "opentelemetry/include/otel_span.hrl") do + Record.defrecord(name, spec) + end + + describe "http integration" do + test "default span generation for 200" do + Req.get("http://localhost:4000/hello") + + assert_receive {:span, + span( + name: "HTTP GET /hello", + kind: :server, + status: {:status, :ok, _}, + attributes: attributes + )} + + assert %{ + "net.peer.name": "localhost", + "http.method": "GET", + "http.target": "/hello", + "http.scheme": :http, + "http.status_code": 200 + } = :otel_attributes.map(attributes) + end + + test "default span generation for 200 without user-agent" do + {:ok, {{_, 200, _}, _, _}} = + :httpc.request(:get, {~c"http://localhost:4000/hello", []}, [], []) + + assert_receive {:span, + span( + name: "HTTP GET /hello", + kind: :server, + status: {:status, :ok, _}, + attributes: attributes + )} + + assert %{ + "net.peer.name": "localhost", + "http.method": "GET", + "http.target": "/hello", + "http.scheme": :http, + "http.status_code": 200, + "http.client_ip": "127.0.0.1" + } = :otel_attributes.map(attributes) + end + + test "default span generation for 200 with x-forwarded-for" do + Req.get("http://localhost:4000/hello", headers: %{x_forwarded_for: "127.0.0.1"}) + + assert_receive {:span, + span( + name: "HTTP GET /hello", + kind: :server, + status: {:status, :ok, _}, + attributes: attributes + )} + + assert %{ + "net.peer.name": "localhost", + "http.method": "GET", + "http.target": "/hello", + "http.scheme": :http, + "http.status_code": 200, + "http.client_ip": "127.0.0.1" + } = :otel_attributes.map(attributes) + end + + test "default span generation for halted connection" do + Req.get("http://localhost:4000/fail", retry: false) + + assert_receive {:span, + span( + name: "HTTP GET /fail", + kind: :server, + status: {:status, :ok, _}, + attributes: attributes + )} + + assert %{ + "net.peer.name": "localhost", + "http.method": "GET", + "http.target": "/fail", + "http.scheme": :http, + "http.status_code": 500 + } = :otel_attributes.map(attributes) + end + + test "default span generation for 500 response" do + :telemetry.execute( + [:bandit, :request, :stop], + %{duration: 444, resp_body_bytes: 10}, + %{ + conn: nil, + status: 500, + error: "Internal Server Error", + method: "GET", + request_target: {nil, nil, nil, "/not_existing_route"} + } + ) + + assert_receive {:span, + span( + name: "HTTP GET /not_existing_route", + kind: :error, + status: {:status, :error, "Internal Server Error"}, + attributes: attributes + )} + + assert %{ + "http.url": _, + "http.method": "GET", + "http.status_code": 500, + "http.response_content_length": 10, + "net.transport": :"IP.TCP" + } = :otel_attributes.map(attributes) + end + + test "span when request_target is empty" do + :telemetry.execute( + [:bandit, :request, :stop], + %{duration: 444, resp_body_bytes: 10}, + %{ + conn: nil, + status: 500, + error: "Internal Server Error", + method: "GET", + request_target: nil + } + ) + + assert_receive {:span, + span( + name: "HTTP GET", + kind: :error, + status: {:status, :error, "Internal Server Error"}, + attributes: attributes + )} + + assert %{ + "http.url": _, + "http.method": "GET", + "http.status_code": 500, + "http.response_content_length": 10, + "net.transport": :"IP.TCP" + } = :otel_attributes.map(attributes) + end + + test "exception catch span" do + Req.get("http://localhost:4000/exception", retry: false) + + assert_receive {:span, + span( + name: "HTTP exception RuntimeError", + kind: :error, + status: {:status, :error, _} + )} + end + end + + describe "websocket integration" do + test "span when request finished successfully" do + :telemetry.execute( + [:bandit, :websocket, :stop], + %{ + duration: 444, + send_binary_frame_bytes: 10, + recv_binary_frame_bytes: 15 + }, + %{} + ) + + assert_receive {:span, + span( + name: "Websocket", + kind: :server, + status: {:status, :ok, _}, + attributes: attributes + )} + + assert %{ + "net.transport": :websocket, + "websocket.recv.binary.frame.bytes": 10, + "websocket.send.binary.frame.bytes": 15 + } = :otel_attributes.map(attributes) + end + + test "span when error is set" do + :telemetry.execute( + [:bandit, :websocket, :stop], + %{ + duration: 444, + send_binary_frame_bytes: 10, + recv_binary_frame_bytes: 15 + }, + %{error: "Internal Server Error"} + ) + + assert_receive {:span, + span( + name: "Websocket", + kind: :error, + status: {:status, :error, _}, + attributes: attributes + )} + + assert %{ + "net.transport": :websocket, + "websocket.recv.binary.frame.bytes": 10, + "websocket.send.binary.frame.bytes": 15 + } = :otel_attributes.map(attributes) + end + end + + setup do + :otel_simple_processor.set_exporter(:otel_exporter_pid, self()) + + {:ok, _} = start_supervised({Bandit, plug: __MODULE__, port: 4000, startup_log: false}) + + OpentelemetryBandit.setup() + + :ok + end + + def hello(conn) do + conn |> send_resp(200, "OK") + end + + def fail(conn) do + conn |> send_resp(500, "Internal Server Error") |> halt() + end + + def exception(_conn) do + raise "boom" + end +end diff --git a/instrumentation/opentelemetry_bandit/test/support/server_helper.ex b/instrumentation/opentelemetry_bandit/test/support/server_helper.ex new file mode 100644 index 00000000..c357940b --- /dev/null +++ b/instrumentation/opentelemetry_bandit/test/support/server_helper.ex @@ -0,0 +1,18 @@ +defmodule ServerHelper do + defmacro __using__(_) do + quote location: :keep do + import Plug.Conn + + def init(opts) do + opts + end + + def call(conn, []) do + function = String.to_atom(List.first(conn.path_info)) + apply(__MODULE__, function, [conn]) + end + + defoverridable init: 1, call: 2 + end + end +end diff --git a/instrumentation/opentelemetry_bandit/test/test_helper.exs b/instrumentation/opentelemetry_bandit/test/test_helper.exs new file mode 100644 index 00000000..869559e7 --- /dev/null +++ b/instrumentation/opentelemetry_bandit/test/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start() diff --git a/instrumentation/opentelemetry_cowboy/CHANGELOG.md b/instrumentation/opentelemetry_cowboy/CHANGELOG.md index b1b30283..9508d0ea 100644 --- a/instrumentation/opentelemetry_cowboy/CHANGELOG.md +++ b/instrumentation/opentelemetry_cowboy/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.3.0 + +### Changed + +* Dependency maintenance release + ## v0.2.1 ### Fixes diff --git a/instrumentation/opentelemetry_cowboy/README.md b/instrumentation/opentelemetry_cowboy/README.md index 928451a0..035bb868 100644 --- a/instrumentation/opentelemetry_cowboy/README.md +++ b/instrumentation/opentelemetry_cowboy/README.md @@ -21,21 +21,13 @@ There is no additional prerequisite setup for [plug_cowboy](https://hex.pm/packa ```erlang {deps, [ - {opentelemetry_cowboy, "~> 0.2"} + {opentelemetry_cowboy, "~> 0.3"} ]} ``` ```elixir def deps do [ - {:opentelemetry_cowboy, "~> 0.2"} + {:opentelemetry_cowboy, "~> 0.3"} ] end ``` - -## Compatibility Matrix - -| opentelemetry_cowboy Version | Otel Version | Notes | -| :--------------------------- | :------------ | :---- | -| | | | -| v0.1.0 | v.1.0.0-rc.3 | | -| v0.2 | v.1.0 | | diff --git a/instrumentation/opentelemetry_cowboy/docs.config b/instrumentation/opentelemetry_cowboy/docs.config deleted file mode 100644 index b52230e0..00000000 --- a/instrumentation/opentelemetry_cowboy/docs.config +++ /dev/null @@ -1,4 +0,0 @@ -{source_url, <<"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_cowboy">>}. -{extras, [<<"LICENSE">>]}. -{main, <<"opentelemetry_cowboy">>}. -{proglang, erlang}. \ No newline at end of file diff --git a/instrumentation/opentelemetry_cowboy/docs.sh b/instrumentation/opentelemetry_cowboy/docs.sh deleted file mode 100755 index 5c0f7350..00000000 --- a/instrumentation/opentelemetry_cowboy/docs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e - -# Setup: -# -# mix escript.install github elixir-lang/ex_doc -# asdf install erlang 24.0.2 -# asdf local erlang 24.0.2 - -rebar3 compile -rebar3 as docs edoc -version=0.1.0 -ex_doc "opentelemetry_cowboy" $version "_build/default/lib/opentelemetry_cowboy/ebin" \ - --source-ref v${version} \ - --config docs.config $@ diff --git a/instrumentation/opentelemetry_cowboy/rebar.config b/instrumentation/opentelemetry_cowboy/rebar.config index 4205cf49..4a4784ee 100644 --- a/instrumentation/opentelemetry_cowboy/rebar.config +++ b/instrumentation/opentelemetry_cowboy/rebar.config @@ -1,27 +1,31 @@ {erl_opts, [debug_info]}. {deps, [ {cowboy_telemetry, "~> 0.4"}, - {opentelemetry_api, "~> 1.0"}, + {opentelemetry_api, "~> 1.2"}, {opentelemetry_telemetry, "~> 1.0"}, {telemetry, "~> 1.0"} ]}. {project_plugins, [covertool, erlfmt, + rebar3_ex_doc, rebar3_hex]}. + +{hex, [ + {doc, #{provider => ex_doc}} +]}. + +{ex_doc, [ + {source_url, "https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_cowboy"}, + {extras, ["README.md", "LICENSE"]}, + {main, "README.md"}]}. + {profiles, - [{docs, [{deps, [edown]}, - {edoc_opts, - [{preprocess, true}, - {doclet, edoc_doclet_chunks}, - {layout, edoc_layout_chunks}, - {dir, "_build/default/lib/opentelemetry_cowboy/doc"}, - {subpackages, true}]}]}, - {test, [{erl_opts, [nowarn_export_all]}, + [{test, [{erl_opts, [nowarn_export_all]}, {deps, [ - {opentelemetry, "~> 1.0"}, - {opentelemetry_exporter, "~> 1.0"}, - {cowboy, "~> 2.7"} + {opentelemetry, "~> 1.3"}, + {opentelemetry_exporter, "~> 1.6"}, + {cowboy, "~> 2.10"} ]}, {paths, ["src", "test/support"]}, {ct_opts, [{ct_hooks, [cth_surefire]}]}]}]}. diff --git a/instrumentation/opentelemetry_cowboy/rebar.lock b/instrumentation/opentelemetry_cowboy/rebar.lock index b5907fa1..e7276c56 100644 --- a/instrumentation/opentelemetry_cowboy/rebar.lock +++ b/instrumentation/opentelemetry_cowboy/rebar.lock @@ -1,31 +1,33 @@ {"1.2.0", -[{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},1}, +[{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.10.0">>},1}, {<<"cowboy_telemetry">>,{pkg,<<"cowboy_telemetry">>,<<"0.4.0">>},0}, - {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.11.0">>},2}, - {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.1.1">>},0}, + {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.12.1">>},2}, + {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.2.2">>},0}, + {<<"opentelemetry_semantic_conventions">>, + {pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>}, + 1}, {<<"opentelemetry_telemetry">>, - {pkg,<<"opentelemetry_telemetry">>,<<"1.0.0">>}, + {pkg,<<"opentelemetry_telemetry">>,<<"1.1.1">>}, 0}, {<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},2}, - {<<"telemetry">>,{pkg,<<"telemetry">>,<<"1.1.0">>},0}, - {<<"telemetry_registry">>,{pkg,<<"telemetry_registry">>,<<"0.3.0">>},1}]}. + {<<"telemetry">>,{pkg,<<"telemetry">>,<<"1.2.1">>},0}]}. [ {pkg_hash,[ - {<<"cowboy">>, <<"865DD8B6607E14CF03282E10E934023A1BD8BE6F6BACF921A7E2A96D800CD452">>}, + {<<"cowboy">>, <<"FF9FFEFF91DAE4AE270DD975642997AFE2A1179D94B1887863E43F681A203E26">>}, {<<"cowboy_telemetry">>, <<"F239F68B588EFA7707ABCE16A84D0D2ACF3A0F50571F8BB7F56A15865AAE820C">>}, - {<<"cowlib">>, <<"0B9FF9C346629256C42EBE1EEB769A83C6CB771A6EE5960BD110AB0B9B872063">>}, - {<<"opentelemetry_api">>, <<"3B43877C456C8A7F5448A95D9BF4FB4BB8CC2ABBBEA2C62D5F8E8C538B4AF14F">>}, - {<<"opentelemetry_telemetry">>, <<"D5982A319E725FCD2305B306B65C18A86AFDCF7D96821473CF0649FF88877615">>}, + {<<"cowlib">>, <<"A9FA9A625F1D2025FE6B462CB865881329B5CAFF8F1854D1CBC9F9533F00E1E1">>}, + {<<"opentelemetry_api">>, <<"693F47B0D8C76DA2095FE858204CFD6350C27FE85D00E4B763DEECC9588CF27A">>}, + {<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>}, + {<<"opentelemetry_telemetry">>, <<"4A73BFA29D7780FFE33DB345465919CEF875034854649C37AC789EB8E8F38B21">>}, {<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>}, - {<<"telemetry">>, <<"A589817034A27EAB11144AD24D5C0F9FAB1F58173274B1E9BAE7074AF9CBEE51">>}, - {<<"telemetry_registry">>, <<"6768F151EA53FC0FBCA70DBFF5B20A8D663EE4E0C0B2AE589590E08658E76F1E">>}]}, + {<<"telemetry">>, <<"68FDFE8D8F05A8428483A97D7AAB2F268AAFF24B49E0F599FAA091F1D4E7F61C">>}]}, {pkg_hash_ext,[ - {<<"cowboy">>, <<"2C729F934B4E1AA149AFF882F57C6372C15399A20D54F65C8D67BEF583021BDE">>}, + {<<"cowboy">>, <<"3AFDCCB7183CC6F143CB14D3CF51FA00E53DB9EC80CDCD525482F5E99BC41D6B">>}, {<<"cowboy_telemetry">>, <<"7D98BAC1EE4565D31B62D59F8823DFD8356A169E7FCBB83831B8A5397404C9DE">>}, - {<<"cowlib">>, <<"2B3E9DA0B21C4565751A6D4901C20D1B4CC25CBB7FD50D91D2AB6DD287BC86A9">>}, - {<<"opentelemetry_api">>, <<"A9554B3208B60A70043318D051EA78FBBC7A1B8F4C418EBC16CCB40015995675">>}, - {<<"opentelemetry_telemetry">>, <<"3401D13A1D4B7AA941A77E6B3EC074F0AE77F83B5B2206766CE630123A9291A9">>}, + {<<"cowlib">>, <<"163B73F6367A7341B33C794C4E88E7DBFE6498AC42DCD69EF44C5BC5507C8DB0">>}, + {<<"opentelemetry_api">>, <<"DC77B9A00F137A858E60A852F14007BB66EDA1FFBEB6C05D5FE6C9E678B05E9D">>}, + {<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>}, + {<<"opentelemetry_telemetry">>, <<"EE43B14E6866123A3EE1344E3C0D3D7591F4537542C2A925FCDBF46249C9B50B">>}, {<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>}, - {<<"telemetry">>, <<"B727B2A1F75614774CFF2D7565B64D0DFA5BD52BA517F16543E6FC7EFCC0DF48">>}, - {<<"telemetry_registry">>, <<"492E2ADBC609F3E79ECE7F29FEC363A97A2C484AC78A83098535D6564781E917">>}]} + {<<"telemetry">>, <<"DAD9CE9D8EFFC621708F99EAC538EF1CBE05D6A874DD741DE2E689C47FEAFED5">>}]} ]. diff --git a/instrumentation/opentelemetry_cowboy/src/opentelemetry_cowboy.app.src b/instrumentation/opentelemetry_cowboy/src/opentelemetry_cowboy.app.src index 242f543f..0dac1d31 100644 --- a/instrumentation/opentelemetry_cowboy/src/opentelemetry_cowboy.app.src +++ b/instrumentation/opentelemetry_cowboy/src/opentelemetry_cowboy.app.src @@ -1,17 +1,17 @@ {application, opentelemetry_cowboy, [{description, "OpenTelemetry Cowboy Instrumentation"}, - {vsn, "0.2.1"}, + {vsn, "0.3.0"}, {registered, []}, {applications, [kernel, stdlib, opentelemetry_api, - telemetry, - telemetry_registry + opentelemetry_telemetry, + telemetry ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, - {doc, "doc"}, {licenses, ["Apache 2.0"]}, {links, [{"GitHub", "https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_cowboy"}]} diff --git a/instrumentation/opentelemetry_cowboy/test/opentelemetry_cowboy_SUITE.erl b/instrumentation/opentelemetry_cowboy/test/opentelemetry_cowboy_SUITE.erl index 6dffe526..a1b629a9 100644 --- a/instrumentation/opentelemetry_cowboy/test/opentelemetry_cowboy_SUITE.erl +++ b/instrumentation/opentelemetry_cowboy/test/opentelemetry_cowboy_SUITE.erl @@ -126,7 +126,7 @@ failed_request(_Config) -> receive {span, #span{name=Name,events=Events,attributes=Attributes,parent_span_id=undefined,kind=Kind}} -> [Event] = otel_events:list(Events), - #event{name= <<"exception">>} = Event, + #event{name=exception} = Event, ?assertEqual(<<"HTTP GET">>, Name), ?assertEqual(?SPAN_KIND_SERVER, Kind), ExpectedAttrs = #{ diff --git a/instrumentation/opentelemetry_dataloader/docker-compose.yml b/instrumentation/opentelemetry_dataloader/docker-compose.yml index 4adc986d..b826667e 100644 --- a/instrumentation/opentelemetry_dataloader/docker-compose.yml +++ b/instrumentation/opentelemetry_dataloader/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: postgres: - image: postgres:13.3 + image: postgres:16.2 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres diff --git a/instrumentation/opentelemetry_dataloader/mix.exs b/instrumentation/opentelemetry_dataloader/mix.exs index f0e919c7..fa9f7fcf 100644 --- a/instrumentation/opentelemetry_dataloader/mix.exs +++ b/instrumentation/opentelemetry_dataloader/mix.exs @@ -1,12 +1,14 @@ defmodule OpentelemetryDataloader.MixProject do use Mix.Project + @version "1.0.0" + def project do [ app: :opentelemetry_dataloader, description: "Trace Dataloader with OpenTelemetry.", - version: "1.0.0", - elixir: "~> 1.14", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), @@ -52,17 +54,17 @@ defmodule OpentelemetryDataloader.MixProject do # Run "mix help deps" to learn about dependencies. defp deps do [ - {:telemetry, "~> 0.4 or ~> 1.0"}, - {:opentelemetry_api, "~> 1.0"}, + {:telemetry, "~> 1.0"}, + {:opentelemetry_api, "~> 1.2"}, {:opentelemetry_telemetry, "~> 1.0"}, - {:dataloader, "~> 1.0.8"}, + {:dataloader, "~> 2.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, - {:ex_doc, "~> 0.29", only: [:dev], runtime: false}, + {:ex_doc, "~> 0.31", only: [:dev], runtime: false}, {:ecto_sql, ">= 3.0.0", only: [:dev, :test]}, {:postgrex, ">= 0.15.0", only: [:dev, :test]}, {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}, - {:opentelemetry_process_propagator, "~> 0.2"} + {:opentelemetry_process_propagator, "~> 0.2.1"} ] end end diff --git a/instrumentation/opentelemetry_dataloader/mix.lock b/instrumentation/opentelemetry_dataloader/mix.lock index 3475e72e..a4bdef10 100644 --- a/instrumentation/opentelemetry_dataloader/mix.lock +++ b/instrumentation/opentelemetry_dataloader/mix.lock @@ -1,33 +1,31 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, - "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, + "dataloader": {:hex, :dataloader, "2.0.0", "49b42d60b9bb06d761a71d7b034c4b34787957e713d4fae15387a25fcd639112", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:opentelemetry_process_propagator, "~> 0.2.1", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "09d61781b76ce216e395cdbc883ff00d00f46a503e215c22722dba82507dfef0"}, + "db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, - "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ecto": {:hex, :ecto, "3.11.1", "4b4972b717e7ca83d30121b12998f5fcdc62ba0ed4f20fd390f16f3270d85c3e", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ebd3d3772cd0dfcd8d772659e41ed527c28b2a8bde4b00fe03e0463da0f1983b"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.1", "e9abf28ae27ef3916b43545f9578b4750956ccea444853606472089e7d169470", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ce14063ab3514424276e7e360108ad6c2308f6d88164a076aac8a387e1fea634"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.1", "b1c652fa5f92ee9cf15c75271168027f92039b3877094290a75abcaac82a9f77", [: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", "b7745fa6374a36daf484e2a2012274950e084815b936b1319aeebcf7809574f6"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, - "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.1", "20ac37648faf7175cade16fda8d58e6f1ff1b7f2a50a8ef9d70a032c41aba315", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "f317237e39636d4f6140afa5d419e85ed3dc9e9a57072e7cd442df42af7b8aac"}, + "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.2", "85244a49f0c32ae1e2f3d58c477c265bd6125ee3480ade82b0fa9324b85ed3f0", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "04db13302a34bea8350a13ed9d49c22dfd32c4bc590d8aa88b6b4b7e4f346c61"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, - "postgrex": {:hex, :postgrex, "0.17.2", "a3ec9e3239d9b33f1e5841565c4eb200055c52cc0757a22b63ca2d529bbe764c", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "80a918a9e9531d39f7bd70621422f3ebc93c01618c645f2d91306f50041ed90c"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.1.1", "4a73bfa29d7780ffe33db345465919cef875034854649c37ac789eb8e8f38b21", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ee43b14e6866123a3ee1344e3c0d3d7591f4537542c2a925fcdbf46249c9b50b"}, + "postgrex": {:hex, :postgrex, "0.17.4", "5777781f80f53b7c431a001c8dad83ee167bcebcf3a793e3906efff680ab62b3", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "6458f7d5b70652bc81c3ea759f91736c16a31be000f306d3c64bcdfe9a18b3cc"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_ecto/CHANGELOG.md b/instrumentation/opentelemetry_ecto/CHANGELOG.md index 60dc1e7c..ef8efce2 100644 --- a/instrumentation/opentelemetry_ecto/CHANGELOG.md +++ b/instrumentation/opentelemetry_ecto/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.2.0 + +### Breaking Changes + +* `db.statement` attribute is now marked as optional. Add `db_statement: enabled` when calling `setup` + +### Fixes + +* Don't record DB statements without sanitizaiton + +### Changed + +* Add support for Elixir 1.15 and OTP 26 +* Add required `db.system` attribute + ## 1.1.1 ### Changed diff --git a/instrumentation/opentelemetry_ecto/docker-compose.yml b/instrumentation/opentelemetry_ecto/docker-compose.yml index 041b330f..ecc27b7a 100644 --- a/instrumentation/opentelemetry_ecto/docker-compose.yml +++ b/instrumentation/opentelemetry_ecto/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: postgres: - image: postgres:13.3 + image: postgres:16.2 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres diff --git a/instrumentation/opentelemetry_ecto/mix.exs b/instrumentation/opentelemetry_ecto/mix.exs index 3dcfec56..061404ad 100644 --- a/instrumentation/opentelemetry_ecto/mix.exs +++ b/instrumentation/opentelemetry_ecto/mix.exs @@ -1,12 +1,14 @@ defmodule OpentelemetryEcto.MixProject do use Mix.Project + @version "1.2.0" + def project do [ app: :opentelemetry_ecto, description: description(), - version: "1.1.1", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), @@ -58,11 +60,11 @@ defmodule OpentelemetryEcto.MixProject do {:opentelemetry_api, "~> 1.0"}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, - {:ex_doc, "~> 0.29", only: [:dev], runtime: false}, + {:ex_doc, "~> 0.31", only: [:dev], runtime: false}, {:ecto_sql, ">= 3.0.0", only: [:dev, :test]}, {:postgrex, ">= 0.15.0", only: [:dev, :test]}, {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}, - {:opentelemetry_process_propagator, "~> 0.2"} + {:opentelemetry_process_propagator, "~> 0.3"} ] end end diff --git a/instrumentation/opentelemetry_ecto/mix.lock b/instrumentation/opentelemetry_ecto/mix.lock index 0d6fc2f0..178ccdf7 100644 --- a/instrumentation/opentelemetry_ecto/mix.lock +++ b/instrumentation/opentelemetry_ecto/mix.lock @@ -1,29 +1,29 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, + "db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, - "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ecto": {:hex, :ecto, "3.11.1", "4b4972b717e7ca83d30121b12998f5fcdc62ba0ed4f20fd390f16f3270d85c3e", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ebd3d3772cd0dfcd8d772659e41ed527c28b2a8bde4b00fe03e0463da0f1983b"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.1", "e9abf28ae27ef3916b43545f9578b4750956ccea444853606472089e7d169470", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ce14063ab3514424276e7e360108ad6c2308f6d88164a076aac8a387e1fea634"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, - "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.0", "d549f257fc7e20f0ff8674efb46f0dba1b3c5fe4ee6e4bd38d9873c7e18c6be1", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "4062d3e982c5c7cd01b8b7189fc5c53dfacd666e47797483bc2310e5f0fa7f9c"}, + "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.3.0", "ef5b2059403a1e2b2d2c65914e6962e56371570b8c3ab5323d7a8d3444fb7f84", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "7243cb6de1523c473cba5b1aefa3f85e1ff8cc75d08f367104c1e11919c8c029"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "postgrex": {:hex, :postgrex, "0.17.2", "a3ec9e3239d9b33f1e5841565c4eb200055c52cc0757a22b63ca2d529bbe764c", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "80a918a9e9531d39f7bd70621422f3ebc93c01618c645f2d91306f50041ed90c"}, + "postgrex": {:hex, :postgrex, "0.17.4", "5777781f80f53b7c431a001c8dad83ee167bcebcf3a793e3906efff680ab62b3", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "6458f7d5b70652bc81c3ea759f91736c16a31be000f306d3c64bcdfe9a18b3cc"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_elli/README.md b/instrumentation/opentelemetry_elli/README.md index 7923ada8..92ae2313 100644 --- a/instrumentation/opentelemetry_elli/README.md +++ b/instrumentation/opentelemetry_elli/README.md @@ -73,7 +73,7 @@ be added to `sys.config` to exclude the URLs `/health` and `/metrics`: ``` erlang -{opentelemetry_elli, [{excluded_urls, ["/health", "/metrics"]}]} +{opentelemetry_elli, [{excluded_paths, ["/health", "/metrics"]}]} ``` An OS environment variable, `OTEL_ELLI_EXCLUDED_URLS`, is also read and is a diff --git a/instrumentation/opentelemetry_elli/rebar.config b/instrumentation/opentelemetry_elli/rebar.config index 6a76e2de..f1d1dcb5 100644 --- a/instrumentation/opentelemetry_elli/rebar.config +++ b/instrumentation/opentelemetry_elli/rebar.config @@ -1,12 +1,12 @@ {erl_opts, [debug_info]}. {deps, [elli, - {opentelemetry_api, "~> 1.0"}]}. + {opentelemetry_api, "~> 1.2"}]}. {project_plugins, [{rebar_covertool, "1.1.0"}]}. {profiles, [{test, [{erl_opts, [nowarn_export_all]}, - {deps, [{opentelemetry, "~> 1.0"}]}]}]}. + {deps, [{opentelemetry, "~> 1.3"}]}]}]}. {cover_enabled, true}. {cover_opts, [verbose]}. diff --git a/instrumentation/opentelemetry_elli/rebar.lock b/instrumentation/opentelemetry_elli/rebar.lock index 6588f11e..6e8c71ff 100644 --- a/instrumentation/opentelemetry_elli/rebar.lock +++ b/instrumentation/opentelemetry_elli/rebar.lock @@ -1,11 +1,16 @@ {"1.2.0", [{<<"elli">>,{pkg,<<"elli">>,<<"3.3.0">>},0}, - {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.0.2">>},0}]}. + {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.2.2">>},0}, + {<<"opentelemetry_semantic_conventions">>, + {pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>}, + 1}]}. [ {pkg_hash,[ {<<"elli">>, <<"089218762A7FF3D20AE81C8E911BD0F73EE4EE0ED85454226D1FC6B4FFF3B4F6">>}, - {<<"opentelemetry_api">>, <<"91353EE40583B1D4F07D7B13ED62642ABFEC6AAA0D8A2114F07EDAFB2DF781C5">>}]}, + {<<"opentelemetry_api">>, <<"693F47B0D8C76DA2095FE858204CFD6350C27FE85D00E4B763DEECC9588CF27A">>}, + {<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>}]}, {pkg_hash_ext,[ {<<"elli">>, <<"698B13B33D05661DB9FE7EFCBA41B84825A379CCE86E486CF6AFF9285BE0CCF8">>}, - {<<"opentelemetry_api">>, <<"2A8247F85C44216B883900067478D59955D11E58E5CFCA7C884CD4F203ACE3AC">>}]} + {<<"opentelemetry_api">>, <<"DC77B9A00F137A858E60A852F14007BB66EDA1FFBEB6C05D5FE6C9E678B05E9D">>}, + {<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>}]} ]. diff --git a/instrumentation/opentelemetry_elli/src/opentelemetry_elli.app.src b/instrumentation/opentelemetry_elli/src/opentelemetry_elli.app.src index e7f347ee..8b26517b 100644 --- a/instrumentation/opentelemetry_elli/src/opentelemetry_elli.app.src +++ b/instrumentation/opentelemetry_elli/src/opentelemetry_elli.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_elli, [{description, "Elli middleware for tracing and stats with OpenTelemetry"}, - {vsn, "0.2.0"}, + {vsn, "0.3.0"}, {registered, []}, {applications, [kernel, diff --git a/instrumentation/opentelemetry_finch/mix.exs b/instrumentation/opentelemetry_finch/mix.exs index a196feab..3e776ea5 100644 --- a/instrumentation/opentelemetry_finch/mix.exs +++ b/instrumentation/opentelemetry_finch/mix.exs @@ -1,12 +1,14 @@ defmodule OpentelemetryFinch.MixProject do use Mix.Project + @version "0.2.0" + def project do [ app: :opentelemetry_finch, description: description(), - version: "0.2.0", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), @@ -57,8 +59,8 @@ defmodule OpentelemetryFinch.MixProject do {:opentelemetry_semantic_conventions, "~> 0.2"}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, - {:ex_doc, "~> 0.29.0", only: [:dev], runtime: false}, - {:finch, "~> 0.13", only: [:dev, :test]}, + {:ex_doc, "~> 0.31.0", only: [:dev], runtime: false}, + {:finch, "~> 0.18", only: [:dev, :test]}, {:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false}, {:bypass, "~> 2.0", only: :test} ] diff --git a/instrumentation/opentelemetry_finch/mix.lock b/instrumentation/opentelemetry_finch/mix.lock index 89871711..54d9861c 100644 --- a/instrumentation/opentelemetry_finch/mix.lock +++ b/instrumentation/opentelemetry_finch/mix.lock @@ -1,38 +1,38 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, - "castore": {:hex, :castore, "0.1.19", "a2c3e46d62b7f3aa2e6f88541c21d7400381e53704394462b9fd4f06f6d42bb6", [:mix], [], "hexpm", "e96e0161a5dc82ef441da24d5fa74aefc40d920f3a6645d15e1f9f3e66bb2109"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, - "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, + "castore": {:hex, :castore, "1.0.5", "9eeebb394cc9a0f3ae56b813459f990abb0a3dedee1be6b27fdb50301930502f", [:mix], [], "hexpm", "8d7c597c3e4a64c395980882d4bca3cebb8d74197c590dc272cfd3b6a6310578"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, + "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, + "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, - "finch": {:hex, :finch, "0.13.0", "c881e5460ec563bf02d4f4584079e62201db676ed4c0ef3e59189331c4eddf7b", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "49957dcde10dcdc042a123a507a9c5ec5a803f53646d451db2f7dea696fba6cc"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, - "mint": {:hex, :mint, "1.4.2", "50330223429a6e1260b2ca5415f69b0ab086141bc76dc2fbf34d7c389a6675b2", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "ce75a5bbcc59b4d7d8d70f8b2fc284b1751ffb35c7b6a6302b5192f8ab4ddd80"}, - "nimble_options": {:hex, :nimble_options, "0.4.0", "c89babbab52221a24b8d1ff9e7d838be70f0d871be823165c94dd3418eea728f", [:mix], [], "hexpm", "e6701c1af326a11eea9634a3b1c62b475339ace9456c1a23ec3bc9a847bca02d"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "nimble_pool": {:hex, :nimble_pool, "0.2.6", "91f2f4c357da4c4a0a548286c84a3a28004f68f05609b4534526871a22053cde", [:mix], [], "hexpm", "1c715055095d3f2705c4e236c18b618420a35490da94149ff8b580a2144f653f"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "plug": {:hex, :plug, "1.14.0", "ba4f558468f69cbd9f6b356d25443d0b796fbdc887e03fa89001384a9cac638f", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bf020432c7d4feb7b3af16a0c2701455cbbbb95e5b6866132cb09eb0c29adc14"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.0", "d1cf12ff96a1ca4f52207c5271a6c351a4733f413803488d75b70ccf44aebec2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "073cf20b753ce6682ed72905cd62a2d4bd9bad1bf9f7feb02a1b8e525bd94fa6"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.3", "8f77d13aeb32bfd9e654cb68f0af517b371fb34c56c9f2b58fe3df1235c1251a", [:mix], [], "hexpm", "b5672099c6ad5c202c45f5a403f21a3411247f164e4a8fab056e5cd8a290f4a2"}, + "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.0", "3ae9369c60641084363b08fe90267cbdd316df57e3557ea522114b30b63256ea", [:mix], [{:cowboy, "~> 2.7.0 or ~> 2.8.0 or ~> 2.9.0 or ~> 2.10.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d85444fb8aa1f2fc62eabe83bbe387d81510d773886774ebdcb429b3da3c1a4a"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_grpcbox/rebar.config b/instrumentation/opentelemetry_grpcbox/rebar.config index 3e0e1718..97960e30 100644 --- a/instrumentation/opentelemetry_grpcbox/rebar.config +++ b/instrumentation/opentelemetry_grpcbox/rebar.config @@ -1,7 +1,7 @@ {erl_opts, [debug_info]}. {deps, [grpcbox, - {opentelemetry_api, "~> 1.0"}, + {opentelemetry_api, "~> 1.2"}, {opentelemetry_semantic_conventions, "~> 0.2.0"}]}. {project_plugins, [{rebar_covertool, "1.1.0"}, @@ -16,7 +16,7 @@ {descriptor, true}, {module_name_suffix, "_pb"}]}]}, - {deps, [{opentelemetry, "~> 1.0"}, + {deps, [{opentelemetry, "~> 1.3"}, {opentelemetry_semantic_conventions, "~> 0.2.0"}, jsx]}]}]}. diff --git a/instrumentation/opentelemetry_grpcbox/rebar.lock b/instrumentation/opentelemetry_grpcbox/rebar.lock index d5d7f731..617780c9 100644 --- a/instrumentation/opentelemetry_grpcbox/rebar.lock +++ b/instrumentation/opentelemetry_grpcbox/rebar.lock @@ -1,31 +1,31 @@ {"1.2.0", [{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},1}, - {<<"chatterbox">>,{pkg,<<"ts_chatterbox">>,<<"0.11.0">>},1}, + {<<"chatterbox">>,{pkg,<<"ts_chatterbox">>,<<"0.15.1">>},1}, {<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},1}, - {<<"gproc">>,{pkg,<<"gproc">>,<<"0.8.0">>},1}, - {<<"grpcbox">>,{pkg,<<"grpcbox">>,<<"0.14.0">>},0}, - {<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.2.3">>},2}, - {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.0.2">>},0}, + {<<"gproc">>,{pkg,<<"gproc">>,<<"0.9.1">>},1}, + {<<"grpcbox">>,{pkg,<<"grpcbox">>,<<"0.17.1">>},0}, + {<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.3.0">>},2}, + {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.2.2">>},0}, {<<"opentelemetry_semantic_conventions">>, {pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>}, 0}]}. [ {pkg_hash,[ {<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>}, - {<<"chatterbox">>, <<"B8F372C706023EB0DE5BF2976764EDB27C70FE67052C88C1F6A66B3A5626847F">>}, + {<<"chatterbox">>, <<"5CAC4D15DD7AD61FC3C4415CE4826FC563D4643DEE897A558EC4EA0B1C835C9C">>}, {<<"ctx">>, <<"8FF88B70E6400C4DF90142E7F130625B82086077A45364A78D208ED3ED53C7FE">>}, - {<<"gproc">>, <<"CEA02C578589C61E5341FCE149EA36CCEF236CC2ECAC8691FBA408E7EA77EC2F">>}, - {<<"grpcbox">>, <<"3EB321BCD2275BAF8B54CF381FEB7B0559A50C02544DE28FDA039C7F2F9D1A7A">>}, - {<<"hpack">>, <<"17670F83FF984AE6CD74B1C456EDDE906D27FF013740EE4D9EFAA4F1BF999633">>}, - {<<"opentelemetry_api">>, <<"91353EE40583B1D4F07D7B13ED62642ABFEC6AAA0D8A2114F07EDAFB2DF781C5">>}, + {<<"gproc">>, <<"F1DF0364423539CF0B80E8201C8B1839E229E5F9B3CCB944C5834626998F5B8C">>}, + {<<"grpcbox">>, <<"6E040AB3EF16FE699FFB513B0EF8E2E896DA7B18931A1EF817143037C454BCCE">>}, + {<<"hpack">>, <<"2461899CC4AB6A0EF8E970C1661C5FC6A52D3C25580BC6DD204F84CE94669926">>}, + {<<"opentelemetry_api">>, <<"693F47B0D8C76DA2095FE858204CFD6350C27FE85D00E4B763DEECC9588CF27A">>}, {<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>}]}, {pkg_hash_ext,[ {<<"acceptor_pool">>, <<"0CBCD83FDC8B9AD2EEE2067EF8B91A14858A5883CB7CD800E6FCD5803E158788">>}, - {<<"chatterbox">>, <<"722FE2BAD52913AB7E87D849FC6370375F0C961FFB2F0B5E6D647C9170C382A6">>}, + {<<"chatterbox">>, <<"4F75B91451338BC0DA5F52F3480FA6EF6E3A2AEECFC33686D6B3D0A0948F31AA">>}, {<<"ctx">>, <<"A14ED2D1B67723DBEBBE423B28D7615EB0BDCBA6FF28F2D1F1B0A7E1D4AA5FC2">>}, - {<<"gproc">>, <<"580ADAFA56463B75263EF5A5DF4C86AF321F68694E7786CB057FD805D1E2A7DE">>}, - {<<"grpcbox">>, <<"E24159B7B6D3F9869BBE528845C0125FED2259366BA908FD04A1F45FE81D0660">>}, - {<<"hpack">>, <<"06F580167C4B8B8A6429040DF36CC93BBA6D571FAEAEC1B28816523379CBB23A">>}, - {<<"opentelemetry_api">>, <<"2A8247F85C44216B883900067478D59955D11E58E5CFCA7C884CD4F203ACE3AC">>}, + {<<"gproc">>, <<"905088E32E72127ED9466F0BAC0D8E65704CA5E73EE5A62CB073C3117916D507">>}, + {<<"grpcbox">>, <<"4A3B5D7111DAABC569DC9CBD9B202A3237D81C80BF97212FBC676832CB0CEB17">>}, + {<<"hpack">>, <<"D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0">>}, + {<<"opentelemetry_api">>, <<"DC77B9A00F137A858E60A852F14007BB66EDA1FFBEB6C05D5FE6C9E678B05E9D">>}, {<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>}]} ]. diff --git a/instrumentation/opentelemetry_grpcbox/src/opentelemetry_grpcbox.app.src b/instrumentation/opentelemetry_grpcbox/src/opentelemetry_grpcbox.app.src index b79f63d4..b2475b6e 100644 --- a/instrumentation/opentelemetry_grpcbox/src/opentelemetry_grpcbox.app.src +++ b/instrumentation/opentelemetry_grpcbox/src/opentelemetry_grpcbox.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_grpcbox, [{description, "grpcbox interceptor for OpenTelemetry instrumentation"}, - {vsn, "0.2.0"}, + {vsn, "0.3.0"}, {registered, []}, {applications, [kernel, diff --git a/instrumentation/opentelemetry_httpoison/mix.lock b/instrumentation/opentelemetry_httpoison/mix.lock index ff7544f9..082bef22 100644 --- a/instrumentation/opentelemetry_httpoison/mix.lock +++ b/instrumentation/opentelemetry_httpoison/mix.lock @@ -1,43 +1,43 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, - "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, - "credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"}, + "credo": {:hex, :credo, "1.7.4", "68ca5cf89071511c12fd9919eb84e388d231121988f6932756596195ccf7fd35", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9cf776d062c78bbe0f0de1ecaee183f18f2c3ec591326107989b054b7dddefc2"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.31", "a93921cdc6b9b869f519213d5bc79d9e218ba768d7270d46fdcf1c01bacff9e2", [:mix], [], "hexpm", "317d367ee0335ef037a87e46c91a2269fef6306413f731e8ec11fc45a7efd059"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [: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", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"}, - "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~> 2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "httpoison": {:hex, :httpoison, "2.1.0", "655fd9a7b0b95ee3e9a3b535cf7ac8e08ef5229bab187fa86ac4208b122d934b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "fc455cb4306b43827def4f57299b2d5ac8ac331cb23f517e734a4b78210a160c"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "httpoison": {:hex, :httpoison, "2.2.1", "87b7ed6d95db0389f7df02779644171d7319d319178f6680438167d7b69b1f3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "51364e6d2f429d80e14fe4b5f8e39719cacd03eb3f9a9286e61e216feac2d2df"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, - "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"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "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"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.3.0", "9e18a119d9efc3370a3ef2a937bf0b24c088d9c4bf0ba9d7c3751d49d347d035", [:mix], [], "hexpm", "7977f183127a7cbe9346981e2f480dc04c55ffddaef746bd58debd566070eef8"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, - "plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, + "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, + "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.0", "3ae9369c60641084363b08fe90267cbdd316df57e3557ea522114b30b63256ea", [:mix], [{:cowboy, "~> 2.7.0 or ~> 2.8.0 or ~> 2.9.0 or ~> 2.10.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d85444fb8aa1f2fc62eabe83bbe387d81510d773886774ebdcb429b3da3c1a4a"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, } diff --git a/instrumentation/opentelemetry_nebulex/mix.exs b/instrumentation/opentelemetry_nebulex/mix.exs index 1eff004a..28a7d46a 100644 --- a/instrumentation/opentelemetry_nebulex/mix.exs +++ b/instrumentation/opentelemetry_nebulex/mix.exs @@ -1,11 +1,13 @@ defmodule OpentelemetryNebulex.MixProject do use Mix.Project + @version "0.1.0" + def project do [ app: :opentelemetry_nebulex, description: description(), - version: "0.1.0", + version: @version, elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), @@ -53,7 +55,7 @@ defmodule OpentelemetryNebulex.MixProject do defp deps do [ {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}, - {:ex_doc, "~> 0.28.0", only: [:dev], runtime: false}, + {:ex_doc, "~> 0.31.0", only: [:dev], runtime: false}, {:nebulex, "~> 2.1", only: [:dev, :test]}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_api, "~> 1.0"}, diff --git a/instrumentation/opentelemetry_nebulex/mix.lock b/instrumentation/opentelemetry_nebulex/mix.lock index 2888b0c9..e6e586f0 100644 --- a/instrumentation/opentelemetry_nebulex/mix.lock +++ b/instrumentation/opentelemetry_nebulex/mix.lock @@ -1,26 +1,26 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.25", "2024618731c55ebfcc5439d756852ec4e85978a39d0d58593763924d9a15916f", [:mix], [], "hexpm", "56749c5e1c59447f7b7a23ddb235e4b3defe276afc220a6227237f3efe83f51e"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [: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", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nebulex": {:hex, :nebulex, "2.3.2", "74d8b54e867ca58930edf14de7cc35056cf1ae802bdbc64b3c8c5336234cb1ca", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.0", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "09e7c2e687a9d4da2cb6bdde90de74170450f17684f7cc5691faa213c5aa5b13"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "nebulex": {:hex, :nebulex, "2.6.0", "6e581c0b53aab80a1431488d367a41c6a8ee53763f86e7a7a6754ee571ecfdab", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.1", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "cf4a0040bd6d58b8d0204f668641973520fdbd78bd8618e1cdb7a11e7bc560cf"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.1.1", "4a73bfa29d7780ffe33db345465919cef875034854649c37ac789eb8e8f38b21", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ee43b14e6866123a3ee1344e3c0d3d7591f4537542c2a925fcdbf46249c9b50b"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_oban/CHANGELOG.md b/instrumentation/opentelemetry_oban/CHANGELOG.md index fbea7abc..b193ff43 100644 --- a/instrumentation/opentelemetry_oban/CHANGELOG.md +++ b/instrumentation/opentelemetry_oban/CHANGELOG.md @@ -4,7 +4,35 @@ ### Changed -* Add measurements as attributes on span. +* Improve `OpentelemetryOban.PluginHandler` Tracer span attributes. + The Plugin's span introduce a set of attributes prefixed with `oban.`. + Previously, no attributes were added to the span. The new attributes are: + + * All Plugin: + * `oban.plugin` + * `Oban.Plugins.Cron` Plugin: + * `oban.jobs_count` + * `Oban.Plugins.Gossip` Plugin: + * `oban.gossip_count` + * `Oban.Plugins.Lifeline` Plugin: + * `oban.discarded_count` + * `oban.rescued_count` + * `Oban.Plugins.Pruner` Plugin: + * `oban.pruned_count` + * `Oban.Pro.Plugins.DynamicCron` Plugin: + * `oban.jobs_count` + * `Oban.Pro.Plugins.DynamicLifeline` Plugin: + * `oban.discarded_count` + * `oban.rescued_count` + * `Oban.Pro.Plugins.DynamicPrioritizer` Plugin: + * `oban.reprioritized_count` + * `Oban.Pro.Plugins.DynamicPruner` Plugin: + * `oban.pruned_count` + * `Oban.Pro.Plugins.DynamicScaler` Plugin: + * `oban.scaler.last_scaled_to` + * `oban.scaler.last_scaled_at` + +* Added measurements as attributes on span. ## 1.0.0 diff --git a/instrumentation/opentelemetry_oban/README.md b/instrumentation/opentelemetry_oban/README.md index d87f46d0..6d7ca4ad 100644 --- a/instrumentation/opentelemetry_oban/README.md +++ b/instrumentation/opentelemetry_oban/README.md @@ -11,7 +11,7 @@ dependencies in `mix.exs`: ```elixir def deps do [ - {:opentelemetry_oban, "~> 0.2"} + {:opentelemetry_oban, "~> 1.0"} ] end ``` @@ -49,6 +49,5 @@ After: |> OpentelemetryOban.insert() ``` -Oban also supports inserting jobs using `Oban.insert/4`, `Oban.insert_all/2` -and `Oban.insert_all/4`. These are currently not supported by OpentelemetryOban -and are just proxied through to Oban. +Oban also supports inserting jobs using `Oban.insert/4` and `Oban.insert_all/4`. +These are currently not supported by OpentelemetryOban and are just proxied through to Oban. diff --git a/instrumentation/opentelemetry_oban/docker-compose.yml b/instrumentation/opentelemetry_oban/docker-compose.yml index 27117093..418dbde8 100644 --- a/instrumentation/opentelemetry_oban/docker-compose.yml +++ b/instrumentation/opentelemetry_oban/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: postgres: - image: postgres:13.3 + image: postgres:16.2 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres diff --git a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex index a6af0c08..7a4a41a5 100644 --- a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex +++ b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex @@ -53,7 +53,7 @@ defmodule OpentelemetryOban do def insert(name \\ Oban, %Changeset{} = changeset) do attributes = attributes_before_insert(changeset) - worker = Changeset.get_field(changeset, :worker, "unknown") + worker = Changeset.get_field(changeset, :worker) OpenTelemetry.Tracer.with_span "#{worker} send", attributes: attributes, kind: :producer do changeset = add_tracing_information_to_meta(changeset) @@ -75,7 +75,7 @@ defmodule OpentelemetryOban do def insert!(name \\ Oban, %Changeset{} = changeset) do attributes = attributes_before_insert(changeset) - worker = Changeset.get_field(changeset, :worker, "unknown") + worker = Changeset.get_field(changeset, :worker) OpenTelemetry.Tracer.with_span "#{worker} send", attributes: attributes, kind: :producer do changeset = add_tracing_information_to_meta(changeset) @@ -126,22 +126,22 @@ defmodule OpentelemetryOban do end defp attributes_before_insert(changeset) do - queue = Changeset.get_field(changeset, :queue, "unknown") - worker = Changeset.get_field(changeset, :worker, "unknown") + queue = Changeset.get_field(changeset, :queue) + worker = Changeset.get_field(changeset, :worker) %{ Trace.messaging_system() => :oban, Trace.messaging_destination() => queue, Trace.messaging_destination_kind() => :queue, - :"messaging.oban.worker" => worker + :"oban.job.worker" => worker } end defp attributes_after_insert(job) do %{ - "messaging.oban.job_id": job.id, - "messaging.oban.priority": job.priority, - "messaging.oban.max_attempts": job.max_attempts + "oban.job.job_id": job.id, + "oban.job.priority": job.priority, + "oban.job.max_attempts": job.max_attempts } end end diff --git a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/job_handler.ex b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/job_handler.ex index 19a9200f..2b613802 100644 --- a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/job_handler.ex +++ b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/job_handler.ex @@ -64,14 +64,13 @@ defmodule OpentelemetryOban.JobHandler do Trace.messaging_destination() => queue, Trace.messaging_destination_kind() => :queue, Trace.messaging_operation() => :process, - :"messaging.oban.job_id" => id, - :"messaging.oban.worker" => worker, - :"messaging.oban.priority" => priority, - :"messaging.oban.attempt" => attempt, - :"messaging.oban.max_attempts" => max_attempts, - :"messaging.oban.inserted_at" => - if(inserted_at, do: DateTime.to_iso8601(inserted_at), else: nil), - :"messaging.oban.scheduled_at" => DateTime.to_iso8601(scheduled_at) + :"oban.job.job_id" => id, + :"oban.job.worker" => worker, + :"oban.job.priority" => priority, + :"oban.job.attempt" => attempt, + :"oban.job.max_attempts" => max_attempts, + :"oban.job.inserted_at" => DateTime.to_iso8601(inserted_at), + :"oban.job.scheduled_at" => DateTime.to_iso8601(scheduled_at) } span_name = "#{worker} process" diff --git a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/plugin_handler.ex b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/plugin_handler.ex index dfc94c12..c86e09b9 100644 --- a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/plugin_handler.ex +++ b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban/plugin_handler.ex @@ -1,4 +1,5 @@ defmodule OpentelemetryOban.PluginHandler do + alias OpenTelemetry.Tracer alias OpenTelemetry.Span @tracer_id __MODULE__ @@ -41,11 +42,12 @@ defmodule OpentelemetryOban.PluginHandler do @tracer_id, "#{plugin} process", metadata, - %{} + %{attributes: %{"oban.plugin": plugin}} ) end def handle_plugin_stop(_event, _measurements, metadata, _config) do + Tracer.set_attributes(end_span_plugin_attrs(metadata)) OpentelemetryTelemetry.end_telemetry_span(@tracer_id, metadata) end @@ -63,4 +65,54 @@ defmodule OpentelemetryOban.PluginHandler do OpentelemetryTelemetry.end_telemetry_span(@tracer_id, metadata) end + + defp end_span_plugin_attrs(%{plugin: Oban.Plugins.Cron} = metadata) do + %{"oban.plugins.cron.jobs_count": length(metadata[:jobs])} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Plugins.Gossip} = metadata) do + %{"oban.plugins.gossip.gossip_count": metadata[:gossip_count]} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Plugins.Lifeline} = metadata) do + %{ + "oban.plugins.lifeline.discarded_count": metadata[:discarded_count], + "oban.plugins.lifeline.rescued_count": metadata[:rescued_count] + } + end + + defp end_span_plugin_attrs(%{plugin: Oban.Plugins.Pruner} = metadata) do + %{"oban.plugins.pruner.pruned_count": metadata[:pruned_count]} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Pro.Plugins.DynamicCron} = metadata) do + %{"oban.pro.plugins.dynamic_cron.jobs_count": length(metadata[:jobs])} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Pro.Plugins.DynamicLifeline} = metadata) do + %{ + "oban.pro.plugins.dynamic_lifeline.discarded_count": metadata[:discarded_count], + "oban.pro.plugins.dynamic_lifeline.rescued_count": metadata[:rescued_count] + } + end + + defp end_span_plugin_attrs(%{plugin: Oban.Pro.Plugins.DynamicPrioritizer} = metadata) do + %{"oban.pro.plugins.dynamic_prioritizer.reprioritized_count": metadata[:reprioritized_count]} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Pro.Plugins.DynamicPruner} = metadata) do + %{"oban.pro.plugins.dynamic_pruner.pruned_count": metadata[:pruned_count]} + end + + defp end_span_plugin_attrs(%{plugin: Oban.Pro.Plugins.DynamicScaler} = metadata) do + %{ + "oban.pro.plugins.dynamic_scaler.scaler.last_scaled_to": metadata[:scaler][:last_scaled_to], + "oban.pro.plugins.dynamic_scaler.scaler.last_scaled_at": + DateTime.to_iso8601(metadata[:scaler][:last_scaled_at]) + } + end + + defp end_span_plugin_attrs(_) do + %{} + end end diff --git a/instrumentation/opentelemetry_oban/mix.exs b/instrumentation/opentelemetry_oban/mix.exs index 57a18db8..d175bdbd 100644 --- a/instrumentation/opentelemetry_oban/mix.exs +++ b/instrumentation/opentelemetry_oban/mix.exs @@ -1,11 +1,13 @@ defmodule OpentelemetryOban.MixProject do use Mix.Project + @version "1.1.0" + def project do [ app: :opentelemetry_oban, - version: "1.1.0", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), docs: [ @@ -43,13 +45,14 @@ defmodule OpentelemetryOban.MixProject do defp deps do [ {:oban, "~> 2.0"}, - {:opentelemetry_api, "~> 1.0"}, - {:opentelemetry_telemetry, "~> 1.0.0"}, + {:opentelemetry_api, "~> 1.2"}, + {:opentelemetry_telemetry, "~> 1.1"}, {:opentelemetry_semantic_conventions, "~> 0.2"}, {:opentelemetry, "~> 1.0", only: [:test]}, {:opentelemetry_exporter, "~> 1.0", only: [:test]}, {:telemetry, "~> 0.4 or ~> 1.0"}, - {:ex_doc, "~> 0.28", only: [:dev], runtime: false} + {:ex_doc, "~> 0.31", only: [:dev], runtime: false}, + {:postgrex, ">= 0.0.0", only: [:dev, :test]} ] end diff --git a/instrumentation/opentelemetry_oban/mix.lock b/instrumentation/opentelemetry_oban/mix.lock index 709878f3..1b10478a 100644 --- a/instrumentation/opentelemetry_oban/mix.lock +++ b/instrumentation/opentelemetry_oban/mix.lock @@ -1,31 +1,29 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, - "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, + "db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, - "ecto": {:hex, :ecto, "3.9.6", "2f420c173efcb2e22fa4f8fc41e75e02b3c5bd4cffef12085cae5418c12e530d", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "df17bc06ba6f78a7b764e4a14ef877fe5f4499332c5a105ace11fe7013b72c84"}, - "ecto_sql": {:hex, :ecto_sql, "3.9.0", "2bb21210a2a13317e098a420a8c1cc58b0c3421ab8e3acfa96417dab7817918c", [:mix], [{:db_connection, "~> 2.5 or ~> 2.4.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.9.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a8f3f720073b8b1ac4c978be25fa7960ed7fd44997420c304a4a2e200b596453"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ecto": {:hex, :ecto, "3.11.1", "4b4972b717e7ca83d30121b12998f5fcdc62ba0ed4f20fd390f16f3270d85c3e", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ebd3d3772cd0dfcd8d772659e41ed527c28b2a8bde4b00fe03e0463da0f1983b"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.1", "e9abf28ae27ef3916b43545f9578b4750956ccea444853606472089e7d169470", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ce14063ab3514424276e7e360108ad6c2308f6d88164a076aac8a387e1fea634"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "oban": {:hex, :oban, "2.13.5", "6ba77f96bf8d8c57dd95c31292c76dd50104ac110c0bee8345cdf5e42f8afe89", [:mix], [{:ecto_sql, "~> 3.6", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e5d93843377c7aa6417a6e89dfa63cb3043a4d959b9e946cb1d0018cafc0219b"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "oban": {:hex, :oban, "2.17.4", "3ebe79dc0cad16f23e5feea418f9bc5b07d453b8fb7caf376d812be96157a5c5", [:mix], [{:ecto_sql, "~> 3.6", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:ecto_sqlite3, "~> 0.9", [hex: :ecto_sqlite3, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "71a804abea3bb7e104782a5b5337cbab76c1a56b9689a6d5159a3873c93898b6"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, - "postgrex": {:hex, :postgrex, "0.16.5", "fcc4035cc90e23933c5d69a9cd686e329469446ef7abba2cf70f08e2c4b69810", [:mix], [{:connection, "~> 1.1", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "edead639dc6e882618c01d8fc891214c481ab9a3788dfe38dd5e37fd1d5fb2e8"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.1.1", "4a73bfa29d7780ffe33db345465919cef875034854649c37ac789eb8e8f38b21", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ee43b14e6866123a3ee1344e3c0d3d7591f4537542c2a925fcdbf46249c9b50b"}, + "postgrex": {:hex, :postgrex, "0.17.4", "5777781f80f53b7c431a001c8dad83ee167bcebcf3a793e3906efff680ab62b3", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "6458f7d5b70652bc81c3ea759f91736c16a31be000f306d3c64bcdfe9a18b3cc"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_oban/test/opentelemetry_oban/plugin_handler_test.exs b/instrumentation/opentelemetry_oban/test/opentelemetry_oban/plugin_handler_test.exs index 81d596ff..3b1a4f6d 100644 --- a/instrumentation/opentelemetry_oban/test/opentelemetry_oban/plugin_handler_test.exs +++ b/instrumentation/opentelemetry_oban/test/opentelemetry_oban/plugin_handler_test.exs @@ -109,4 +109,127 @@ defmodule OpentelemetryOban.PluginHandlerTest do assert [:"exception.message", :"exception.stacktrace", :"exception.type"] == Enum.sort(Map.keys(:otel_attributes.map(event_attributes))) end + + describe "[:oban, :plugin, :stop] spans" do + test "Oban.Plugins.Cron plugin" do + execute_plugin(Oban.Plugins.Cron, %{jobs: [1, 3, 4]}) + + assert %{ + "oban.plugin": Elixir.Oban.Plugins.Cron, + "oban.plugins.cron.jobs_count": 3 + } == + receive_span_attrs(Oban.Plugins.Cron) + end + + test "Oban.Plugins.Gossip plugin" do + execute_plugin(Oban.Plugins.Gossip, %{gossip_count: 3}) + + assert %{ + "oban.plugin": Elixir.Oban.Plugins.Gossip, + "oban.plugins.gossip.gossip_count": 3 + } == + receive_span_attrs(Oban.Plugins.Gossip) + end + + test "Oban.Plugins.Lifeline plugin" do + execute_plugin(Oban.Plugins.Lifeline, %{discarded_count: 3, rescued_count: 2}) + + assert %{ + "oban.plugin": Elixir.Oban.Plugins.Lifeline, + "oban.plugins.lifeline.discarded_count": 3, + "oban.plugins.lifeline.rescued_count": 2 + } == + receive_span_attrs(Oban.Plugins.Lifeline) + end + + test "Oban.Plugins.Pruner plugin" do + execute_plugin(Oban.Plugins.Pruner, %{pruned_count: 3}) + + assert %{ + "oban.plugin": Elixir.Oban.Plugins.Pruner, + "oban.plugins.pruner.pruned_count": 3 + } == + receive_span_attrs(Oban.Plugins.Pruner) + end + + test "Oban.Pro.Plugins.DynamicCron plugin" do + execute_plugin(Oban.Pro.Plugins.DynamicCron, %{jobs: [1, 3, 4]}) + + assert %{ + "oban.plugin": Elixir.Oban.Pro.Plugins.DynamicCron, + "oban.pro.plugins.dynamic_cron.jobs_count": 3 + } == + receive_span_attrs(Oban.Pro.Plugins.DynamicCron) + end + + test "Oban.Pro.Plugins.DynamicLifeline plugin" do + execute_plugin(Oban.Pro.Plugins.DynamicLifeline, %{discarded_count: 3, rescued_count: 2}) + + assert %{ + "oban.plugin": Elixir.Oban.Pro.Plugins.DynamicLifeline, + "oban.pro.plugins.dynamic_lifeline.discarded_count": 3, + "oban.pro.plugins.dynamic_lifeline.rescued_count": 2 + } == + receive_span_attrs(Oban.Pro.Plugins.DynamicLifeline) + end + + test "Oban.Pro.Plugins.DynamicPrioritizer plugin" do + execute_plugin(Oban.Pro.Plugins.DynamicPrioritizer, %{reprioritized_count: 3}) + + assert %{ + "oban.plugin": Elixir.Oban.Pro.Plugins.DynamicPrioritizer, + "oban.pro.plugins.dynamic_prioritizer.reprioritized_count": 3 + } == + receive_span_attrs(Oban.Pro.Plugins.DynamicPrioritizer) + end + + test "Oban.Pro.Plugins.DynamicPruner plugin" do + execute_plugin(Oban.Pro.Plugins.DynamicPruner, %{pruned_count: 3}) + + assert %{ + "oban.plugin": Elixir.Oban.Pro.Plugins.DynamicPruner, + "oban.pro.plugins.dynamic_pruner.pruned_count": 3 + } == + receive_span_attrs(Oban.Pro.Plugins.DynamicPruner) + end + + test "Oban.Pro.Plugins.DynamicScaler plugin" do + execute_plugin(Oban.Pro.Plugins.DynamicScaler, %{ + scaler: %{last_scaled_to: 3, last_scaled_at: ~U[2021-08-01 12:00:00Z]} + }) + + assert %{ + "oban.plugin": Elixir.Oban.Pro.Plugins.DynamicScaler, + "oban.pro.plugins.dynamic_scaler.scaler.last_scaled_to": 3, + "oban.pro.plugins.dynamic_scaler.scaler.last_scaled_at": "2021-08-01T12:00:00Z" + } == + receive_span_attrs(Oban.Pro.Plugins.DynamicScaler) + end + end + + defp receive_span_attrs(name) do + name = "#{name} process" + + assert_receive( + {:span, span(name: ^name, attributes: attributes)}, + 100, + "expected span with name #{name} to be received" + ) + + elem(attributes, 4) + end + + defp execute_plugin(plugin_name, metadata) do + :telemetry.execute( + [:oban, :plugin, :start], + %{system_time: System.system_time()}, + %{plugin: plugin_name} + ) + + :telemetry.execute( + [:oban, :plugin, :stop], + %{duration: 42069}, + Map.merge(metadata, %{plugin: plugin_name}) + ) + end end diff --git a/instrumentation/opentelemetry_oban/test/opentelemetry_oban_test.exs b/instrumentation/opentelemetry_oban/test/opentelemetry_oban_test.exs index 5590966e..2fa3dc00 100644 --- a/instrumentation/opentelemetry_oban/test/opentelemetry_oban_test.exs +++ b/instrumentation/opentelemetry_oban/test/opentelemetry_oban_test.exs @@ -47,10 +47,10 @@ defmodule OpentelemetryObanTest do assert %{ "messaging.destination": "events", "messaging.destination_kind": :queue, - "messaging.oban.job_id": _job_id, - "messaging.oban.max_attempts": 1, - "messaging.oban.priority": 0, - "messaging.oban.worker": "TestJob", + "oban.job.job_id": _job_id, + "oban.job.max_attempts": 1, + "oban.job.priority": 0, + "oban.job.worker": "TestJob", "messaging.system": :oban } = :otel_attributes.map(attributes) end @@ -145,17 +145,17 @@ defmodule OpentelemetryObanTest do )} assert %{ - "messaging.destination_kind": :queue, "messaging.destination": "events", - "messaging.oban.attempt": 1, - "messaging.oban.duration_us": _duration, - "messaging.oban.inserted_at": _inserted_at, - "messaging.oban.job_id": _job_id, - "messaging.oban.max_attempts": 1, - "messaging.oban.priority": 0, - "messaging.oban.queue_time_us": _queue_time, - "messaging.oban.scheduled_at": _scheduled_at, - "messaging.oban.worker": "TestJob", + "messaging.destination_kind": :queue, + "oban.job.attempt": 1, + "oban.job.duration_us": _duration, + "oban.job.inserted_at": _inserted_at, + "oban.job.job_id": _job_id, + "oban.job.max_attempts": 1, + "oban.job.priority": 0, + "oban.job.queue_time_us": _queue_time, + "oban.job.scheduled_at": _scheduled_at, + "oban.job.worker": "TestJob", "messaging.operation": :process, "messaging.system": :oban } = :otel_attributes.map(attributes) @@ -177,17 +177,17 @@ defmodule OpentelemetryObanTest do )} assert %{ - "messaging.destination_kind": :queue, "messaging.destination": "events", - "messaging.oban.attempt": 1, - "messaging.oban.duration_us": _duration, - "messaging.oban.inserted_at": _inserted_at, - "messaging.oban.job_id": _job_id, - "messaging.oban.max_attempts": 1, - "messaging.oban.priority": 0, - "messaging.oban.queue_time_us": _queue_time, - "messaging.oban.scheduled_at": _scheduled_at, - "messaging.oban.worker": "TestJobThatReturnsError", + "messaging.destination_kind": :queue, + "oban.job.attempt": 1, + "oban.job.duration_us": _duration, + "oban.job.inserted_at": _inserted_at, + "oban.job.job_id": _job_id, + "oban.job.max_attempts": 1, + "oban.job.priority": 0, + "oban.job.queue_time_us": _queue_time, + "oban.job.scheduled_at": _scheduled_at, + "oban.job.worker": "TestJobThatReturnsError", "messaging.operation": :process, "messaging.system": :oban } = :otel_attributes.map(attributes) @@ -259,13 +259,13 @@ defmodule OpentelemetryObanTest do assert %{ "messaging.destination": "events", "messaging.destination_kind": :queue, - "messaging.oban.attempt": 1, - "messaging.oban.inserted_at": _inserted_at, - "messaging.oban.job_id": _job_id, - "messaging.oban.max_attempts": 1, - "messaging.oban.priority": 0, - "messaging.oban.scheduled_at": _scheduled_at, - "messaging.oban.worker": "TestJobThatThrowsException", + "oban.job.attempt": 1, + "oban.job.inserted_at": _inserted_at, + "oban.job.job_id": _job_id, + "oban.job.max_attempts": 1, + "oban.job.priority": 0, + "oban.job.scheduled_at": _scheduled_at, + "oban.job.worker": "TestJobThatThrowsException", "messaging.operation": :process, "messaging.system": :oban } = :otel_attributes.map(attributes) diff --git a/instrumentation/opentelemetry_phoenix/CHANGELOG.md b/instrumentation/opentelemetry_phoenix/CHANGELOG.md index d3096485..9d141596 100644 --- a/instrumentation/opentelemetry_phoenix/CHANGELOG.md +++ b/instrumentation/opentelemetry_phoenix/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.2.0 + +### Features + +* Add support for LiveView courtesy of @derekkraan + +### Fixes + +* Do not set a span as errored for exceptions, only based on 5xx HTTP status + +### Changed + +* Minimum supported Elixir version changed to 1.11. + ## 1.1.1 ### Fixes diff --git a/instrumentation/opentelemetry_phoenix/README.md b/instrumentation/opentelemetry_phoenix/README.md index 73f227e8..d7e37642 100644 --- a/instrumentation/opentelemetry_phoenix/README.md +++ b/instrumentation/opentelemetry_phoenix/README.md @@ -22,11 +22,16 @@ may be supplied. ```elixir def deps do [ - {:opentelemetry_phoenix, "~> 1.1"} + {:opentelemetry_phoenix, "~> 1.2"} ] end ``` +It is high recommended to also install [OpentelemetryCowboy](https://hex.pm/packages/opentelemetry_cowboy) to capture the full +request lifecycle. Phoenix only handles part of the request lifecycle which can lead +to incomplete request durations and lost traces for requests terminated at the socket +level or before reaching Phoenix. + ## Compatibility Matrix | OpentelemetryPhoenix Version | Otel Version | Notes | diff --git a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex index c633a37a..559529cb 100644 --- a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex +++ b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex @@ -6,7 +6,7 @@ defmodule OpentelemetryPhoenix do doc: "The endpoint prefix in your endpoint." ], adapter: [ - type: {:in, [:cowboy2, nil]}, + type: {:in, [:cowboy2, :bandit, nil]}, default: nil, doc: "The phoenix server adapter being used.", type_doc: ":atom" @@ -32,8 +32,6 @@ defmodule OpentelemetryPhoenix do span from being started and the existing cowboy span to be continued. This is the recommended setup for measuring accurate latencies. - `Bandit.PhoenixAdapter` is not currently supported. - ## Usage In your application start: @@ -69,7 +67,7 @@ defmodule OpentelemetryPhoenix do @type endpoint_prefix :: {:endpoint_prefix, [atom()]} @typedoc "The phoenix server adapter being used. Optional" - @type adapter :: {:adapter, :cowboy2 | term()} + @type adapter :: {:adapter, :cowboy2 | :bandit | term()} @doc """ Initializes and configures the telemetry handlers. @@ -162,6 +160,9 @@ defmodule OpentelemetryPhoenix do :cowboy2 -> cowboy2_start() + :bandit -> + bandit_start() + _ -> default_start(meta) end @@ -172,6 +173,11 @@ defmodule OpentelemetryPhoenix do |> OpenTelemetry.Ctx.attach() end + defp bandit_start() do + OpentelemetryProcessPropagator.fetch_parent_ctx() + |> OpenTelemetry.Ctx.attach() + end + defp default_start(meta) do %{conn: conn} = meta :otel_propagator_text_map.extract(conn.req_headers) @@ -209,6 +215,9 @@ defmodule OpentelemetryPhoenix do :cowboy2 -> :ok + :bandit -> + :ok + _ -> default_stop(meta) end diff --git a/instrumentation/opentelemetry_phoenix/mix.exs b/instrumentation/opentelemetry_phoenix/mix.exs index d21f93d4..1ac7bea8 100644 --- a/instrumentation/opentelemetry_phoenix/mix.exs +++ b/instrumentation/opentelemetry_phoenix/mix.exs @@ -1,12 +1,14 @@ defmodule OpentelemetryPhoenix.MixProject do use Mix.Project + @version "1.2.0" + def project do [ app: :opentelemetry_phoenix, description: description(), - version: "1.1.1", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, dialyzer: [ plt_add_apps: [:ex_unit, :mix], @@ -63,14 +65,14 @@ defmodule OpentelemetryPhoenix.MixProject do {:nimble_options, "~> 0.5 or ~> 1.0"}, {:opentelemetry_api, "~> 1.0"}, {:opentelemetry_telemetry, "~> 1.0"}, - {:opentelemetry_process_propagator, "~> 0.2"}, + {:opentelemetry_process_propagator, "~> 0.3"}, {:opentelemetry_semantic_conventions, "~> 0.2"}, {:telemetry, "~> 0.4 or ~> 1.0"}, {:plug, ">= 1.11.0"}, {:cowboy_telemetry, "~> 0.4", only: [:dev, :test]}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, - {:ex_doc, "~> 0.28", only: [:dev], runtime: false}, + {:ex_doc, "~> 0.31", only: [:dev], runtime: false}, {:plug_cowboy, "~> 2.4", only: [:dev, :test]}, {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false} ] diff --git a/instrumentation/opentelemetry_phoenix/mix.lock b/instrumentation/opentelemetry_phoenix/mix.lock index 7b4e3be0..ea3c9316 100644 --- a/instrumentation/opentelemetry_phoenix/mix.lock +++ b/instrumentation/opentelemetry_phoenix/mix.lock @@ -1,35 +1,34 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, - "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, + "cowboy": {:hex, :cowboy, "2.11.0", "356bf784599cf6f2cdc6ad12fdcfb8413c2d35dab58404cf000e1feaed3f5645", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "0fa395437f1b0e104e0e00999f39d2ac5f4082ac5049b67a5b6d56ecc31b1403"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, + "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, - "nimble_options": {:hex, :nimble_options, "0.5.1", "5c166f7669e40333191bea38e3bd3811cc13f459f1e4be49e89128a21b5d8c4d", [:mix], [], "hexpm", "d176cf7baa4fef0ceb301ca3eb8b55bd7de3e45f489c4f8b4f2849f1f114ef3e"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, - "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.1", "20ac37648faf7175cade16fda8d58e6f1ff1b7f2a50a8ef9d70a032c41aba315", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "f317237e39636d4f6140afa5d419e85ed3dc9e9a57072e7cd442df42af7b8aac"}, + "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.3.0", "ef5b2059403a1e2b2d2c65914e6962e56371570b8c3ab5323d7a8d3444fb7f84", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "7243cb6de1523c473cba5b1aefa3f85e1ff8cc75d08f367104c1e11919c8c029"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, - "plug": {:hex, :plug, "1.14.0", "ba4f558468f69cbd9f6b356d25443d0b796fbdc887e03fa89001384a9cac638f", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bf020432c7d4feb7b3af16a0c2701455cbbbb95e5b6866132cb09eb0c29adc14"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.0", "d1cf12ff96a1ca4f52207c5271a6c351a4733f413803488d75b70ccf44aebec2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "073cf20b753ce6682ed72905cd62a2d4bd9bad1bf9f7feb02a1b8e525bd94fa6"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.3", "8f77d13aeb32bfd9e654cb68f0af517b371fb34c56c9f2b58fe3df1235c1251a", [:mix], [], "hexpm", "b5672099c6ad5c202c45f5a403f21a3411247f164e4a8fab056e5cd8a290f4a2"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.1.1", "4a73bfa29d7780ffe33db345465919cef875034854649c37ac789eb8e8f38b21", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ee43b14e6866123a3ee1344e3c0d3d7591f4537542c2a925fcdbf46249c9b50b"}, + "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.6.2", "753611b23b29231fb916b0cdd96028084b12aff57bfd7b71781bd04b1dbeb5c9", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "951ed2433df22f4c97b85fdb145d4cee561f36b74854d64c06d896d7cd2921a7"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, - "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs index 757c42ac..ebd415cc 100644 --- a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs @@ -7,6 +7,7 @@ defmodule OpentelemetryPhoenixTest do require Record alias PhoenixMeta, as: Meta + alias PhoenixLiveViewMeta, as: LiveViewMeta for {name, spec} <- Record.extract_all(from_lib: "opentelemetry/include/otel_span.hrl") do Record.defrecord(name, spec) @@ -266,6 +267,168 @@ defmodule OpentelemetryPhoenixTest do Enum.sort(Map.keys(:otel_attributes.map(event_attributes))) end + test "records spans for Phoenix LiveView mount" do + OpentelemetryPhoenix.setup() + + :telemetry.execute( + [:phoenix, :live_view, :mount, :start], + %{system_time: System.system_time()}, + LiveViewMeta.mount_start() + ) + + :telemetry.execute( + [:phoenix, :live_view, :mount, :stop], + %{system_time: System.system_time()}, + LiveViewMeta.mount_stop() + ) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.mount", + attributes: attributes + )} + + assert %{} == :otel_attributes.map(attributes) + end + + test "records spans for Phoenix LiveView handle_params" do + OpentelemetryPhoenix.setup() + + :telemetry.execute( + [:phoenix, :live_view, :handle_params, :start], + %{system_time: System.system_time()}, + LiveViewMeta.handle_params_start() + ) + + :telemetry.execute( + [:phoenix, :live_view, :handle_params, :stop], + %{system_time: System.system_time()}, + LiveViewMeta.handle_params_stop() + ) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.handle_params", + attributes: attributes + )} + + assert %{} == :otel_attributes.map(attributes) + end + + test "records spans for Phoenix LiveView handle_event" do + OpentelemetryPhoenix.setup() + + :telemetry.execute( + [:phoenix, :live_view, :handle_event, :start], + %{system_time: System.system_time()}, + LiveViewMeta.handle_event_start() + ) + + :telemetry.execute( + [:phoenix, :live_view, :handle_event, :stop], + %{system_time: System.system_time()}, + LiveViewMeta.handle_event_stop() + ) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.handle_event#hello", + attributes: attributes + )} + + assert %{} == :otel_attributes.map(attributes) + end + + test "handles exception during Phoenix LiveView handle_params" do + OpentelemetryPhoenix.setup() + + :telemetry.execute( + [:phoenix, :live_view, :mount, :start], + %{system_time: System.system_time()}, + LiveViewMeta.mount_start(:exception) + ) + + :telemetry.execute( + [:phoenix, :live_view, :mount, :stop], + %{system_time: System.system_time()}, + LiveViewMeta.mount_stop(:exception) + ) + + :telemetry.execute( + [:phoenix, :live_view, :handle_params, :start], + %{system_time: System.system_time()}, + LiveViewMeta.handle_params_start(:exception) + ) + + :telemetry.execute( + [:phoenix, :live_view, :handle_params, :exception], + %{system_time: System.system_time()}, + LiveViewMeta.handle_params_exception(:exception) + ) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.mount", + attributes: attributes + )} + + assert %{} == :otel_attributes.map(attributes) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.handle_params", + attributes: attributes, + events: events + )} + + assert %{} == :otel_attributes.map(attributes) + + [ + event( + name: "exception", + attributes: event_attributes + ) + ] = :otel_events.list(events) + + assert [:"exception.message", :"exception.stacktrace", :"exception.type"] == + Enum.sort(Map.keys(:otel_attributes.map(event_attributes))) + end + + test "handles exceptions during Phoenix LiveView handle_event" do + OpentelemetryPhoenix.setup() + + :telemetry.execute( + [:phoenix, :live_view, :handle_event, :start], + %{system_time: System.system_time()}, + LiveViewMeta.handle_event_start(:exception) + ) + + :telemetry.execute( + [:phoenix, :live_view, :handle_event, :exception], + %{system_time: System.system_time()}, + LiveViewMeta.handle_event_exception(:exception) + ) + + assert_receive {:span, + span( + name: "NnnnnWeb.MyTestLive.handle_event#hello", + attributes: attributes, + events: events + )} + + assert %{} == :otel_attributes.map(attributes) + + [ + event( + name: "exception", + attributes: event_attributes + ) + ] = :otel_events.list(events) + + assert [:"exception.message", :"exception.stacktrace", :"exception.type"] == + Enum.sort(Map.keys(:otel_attributes.map(event_attributes))) + end + defp x_forwarded_for_request(x_forwarded_for) do meta = Meta.endpoint_start() diff --git a/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex b/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex new file mode 100644 index 00000000..27521b49 --- /dev/null +++ b/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex @@ -0,0 +1,1495 @@ +defmodule PhoenixLiveViewMeta do + def mount_start() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{}, []}, + connect_params: %{ + "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", + "_mounts" => 5, + "_track_static" => [ + "http://localhost:4000/assets/app.css", + "http://localhost:4000/assets/app.js" + ] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"}, + session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + } + end + + def mount_start(:exception) do + %{ + socket: %{ + id: "phx-F5N4UNBnc7walAAU", + private: %{ + connect_info: %{ + owner: IEx.Helpers.pid(0, 688, 0), + port: 4000, + private: %{ + :phoenix_live_view => + {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], + %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, + NnnnnWeb.Router => [], + :phoenix_endpoint => NnnnnWeb.Endpoint, + :plug_session_fetch => :done, + :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, + :before_send => [], + :phoenix_router => NnnnnWeb.Router, + :phoenix_request_logger => {"request_logger", "request_logger"}, + :phoenix_layout => %{_: false}, + :phoenix_format => "html", + :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} + }, + scheme: :http, + status: nil, + script_name: [], + state: :unset, + host: "localhost", + params: %{"foo" => "bar"}, + __struct__: Plug.Conn, + halted: false, + adapter: + {Plug.Cowboy.Conn, + %{ + pid: IEx.Helpers.pid(0, 540, 0), + port: 4000, + scheme: "http", + version: :"HTTP/1.1", + path: "/live", + host: "localhost", + peer: {{127, 0, 0, 1}, 56258}, + bindings: %{}, + ref: NnnnnWeb.Endpoint.HTTP, + cert: :undefined, + headers: %{ + "accept" => "text/html, + application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "accept-encoding" => "gzip, deflate, br", + "accept-language" => "en-US,en;q=0.5", + "connection" => "keep-alive", + "cookie" => + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "dnt" => "1", + "host" => "localhost:4000", + "referer" => "http://localhost:4000/live?foo=bar", + "sec-fetch-dest" => "document", + "sec-fetch-mode" => "navigate", + "sec-fetch-site" => "same-origin", + "upgrade-insecure-requests" => "1", + "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" + }, + method: "GET", + path_info: :undefined, + host_info: :undefined, + streamid: 7, + body_length: 0, + has_body: false, + qs: "foo=bar", + sock: {{127, 0, 0, 1}, 4000} + }}, + secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", + cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + }, + request_path: "/live", + method: "GET", + assigns: %{flash: %{}}, + remote_ip: {127, 0, 0, 1}, + req_headers: [ + {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, + {"accept-encoding", "gzip, deflate, br"}, + {"accept-language", "en-US,en;q=0.5"}, + {"connection", "keep-alive"}, + {"cookie", + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, + {"dnt", "1"}, + {"host", "localhost:4000"}, + {"referer", "http://localhost:4000/live?foo=bar"}, + {"sec-fetch-dest", "document"}, + {"sec-fetch-mode", "navigate"}, + {"sec-fetch-site", "same-origin"}, + {"upgrade-insecure-requests", "1"}, + {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} + ], + path_info: ["live"], + resp_headers: [ + {"cache-control", "max-age=0, private, must-revalidate"}, + {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, + {"referrer-policy", "strict-origin-when-cross-origin"}, + {"x-content-type-options", "nosniff"}, + {"x-download-options", "noopen"}, + {"x-frame-options", "SAMEORIGIN"}, + {"x-permitted-cross-domain-policies", "none"} + ], + resp_cookies: %{}, + resp_body: nil, + body_params: %{}, + path_params: %{}, + query_params: %{"foo" => "bar"}, + query_string: "foo=bar", + req_cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + } + }, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{flash: %{}}, []}, + connect_params: %{}, + root_view: NnnnnWeb.MyTestLive, + conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: nil, + root_pid: nil, + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"}, + session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + } + end + + def mount_stop() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{}, []}, + connect_params: %{ + "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", + "_mounts" => 5, + "_track_static" => [ + "http://localhost:4000/assets/app.css", + "http://localhost:4000/assets/app.js" + ] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"}, + session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + } + end + + def mount_stop(:exception) do + %{ + socket: %{ + id: "phx-F5N4UNBnc7walAAU", + private: %{ + connect_info: %{ + owner: IEx.Helpers.pid(0, 540, 0), + port: 4000, + private: %{ + :phoenix_live_view => + {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], + %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, + NnnnnWeb.Router => [], + :phoenix_endpoint => NnnnnWeb.Endpoint, + :plug_session_fetch => :done, + :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, + :before_send => [], + :phoenix_router => NnnnnWeb.Router, + :phoenix_request_logger => {"request_logger", "request_logger"}, + :phoenix_layout => %{_: false}, + :phoenix_format => "html", + :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} + }, + scheme: :http, + status: nil, + script_name: [], + state: :unset, + host: "localhost", + params: %{"foo" => "bar"}, + __struct__: Plug.Conn, + halted: false, + adapter: + {Plug.Cowboy.Conn, + %{ + pid: IEx.Helpers.pid(0, 540, 0), + port: 4000, + scheme: "http", + version: :"HTTP/1.1", + path: "/live", + host: "localhost", + peer: {{127, 0, 0, 1}, 56258}, + bindings: %{}, + ref: NnnnnWeb.Endpoint.HTTP, + cert: :undefined, + headers: %{ + "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "accept-encoding" => "gzip, deflate, br", + "accept-language" => "en-US,en;q=0.5", + "connection" => "keep-alive", + "cookie" => + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "dnt" => "1", + "host" => "localhost:4000", + "referer" => "http://localhost:4000/live?foo=bar", + "sec-fetch-dest" => "document", + "sec-fetch-mode" => "navigate", + "sec-fetch-site" => "same-origin", + "upgrade-insecure-requests" => "1", + "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" + }, + method: "GET", + path_info: :undefined, + host_info: :undefined, + streamid: 7, + body_length: 0, + has_body: false, + qs: "foo=bar", + sock: {{127, 0, 0, 1}, 4000} + }}, + secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", + cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + }, + request_path: "/live", + method: "GET", + assigns: %{flash: %{}}, + remote_ip: {127, 0, 0, 1}, + req_headers: [ + {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, + {"accept-encoding", "gzip, deflate, br"}, + {"accept-language", "en-US,en;q=0.5"}, + {"connection", "keep-alive"}, + {"cookie", + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, + {"dnt", "1"}, + {"host", "localhost:4000"}, + {"referer", "http://localhost:4000/live?foo=bar"}, + {"sec-fetch-dest", "document"}, + {"sec-fetch-mode", "navigate"}, + {"sec-fetch-site", "same-origin"}, + {"upgrade-insecure-requests", "1"}, + {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} + ], + path_info: ["live"], + resp_headers: [ + {"cache-control", "max-age=0, private, must-revalidate"}, + {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, + {"referrer-policy", "strict-origin-when-cross-origin"}, + {"x-content-type-options", "nosniff"}, + {"x-download-options", "noopen"}, + {"x-frame-options", "SAMEORIGIN"}, + {"x-permitted-cross-domain-policies", "none"} + ], + resp_cookies: %{}, + resp_body: nil, + body_params: %{}, + path_params: %{}, + query_params: %{"foo" => "bar"}, + query_string: "foo=bar", + req_cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + } + }, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{flash: %{}}, []}, + connect_params: %{}, + root_view: NnnnnWeb.MyTestLive, + conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: nil, + root_pid: nil, + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"}, + session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + } + end + + def handle_params_start() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{}, []}, + connect_params: %{ + "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", + "_mounts" => 5, + "_track_static" => [ + "http://localhost:4000/assets/app.css", + "http://localhost:4000/assets/app.js" + ] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"} + } + end + + def handle_params_start(:exception) do + %{ + socket: %{ + id: "phx-F5N4UNBnc7walAAU", + private: %{ + connect_info: %{ + owner: IEx.Helpers.pid(0, 540, 0), + port: 4000, + private: %{ + :phoenix_live_view => + {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], + %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, + NnnnnWeb.Router => [], + :phoenix_endpoint => NnnnnWeb.Endpoint, + :plug_session_fetch => :done, + :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, + :before_send => [], + :phoenix_router => NnnnnWeb.Router, + :phoenix_request_logger => {"request_logger", "request_logger"}, + :phoenix_layout => %{_: false}, + :phoenix_format => "html", + :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} + }, + scheme: :http, + status: nil, + script_name: [], + state: :unset, + host: "localhost", + params: %{"foo" => "bar"}, + __struct__: Plug.Conn, + halted: false, + adapter: + {Plug.Cowboy.Conn, + %{ + pid: IEx.Helpers.pid(0, 540, 0), + port: 4000, + scheme: "http", + version: :"HTTP/1.1", + path: "/live", + host: "localhost", + peer: {{127, 0, 0, 1}, 56258}, + bindings: %{}, + ref: NnnnnWeb.Endpoint.HTTP, + cert: :undefined, + headers: %{ + "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "accept-encoding" => "gzip, deflate, br", + "accept-language" => "en-US,en;q=0.5", + "connection" => "keep-alive", + "cookie" => + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "dnt" => "1", + "host" => "localhost:4000", + "referer" => "http://localhost:4000/live?foo=bar", + "sec-fetch-dest" => "document", + "sec-fetch-mode" => "navigate", + "sec-fetch-site" => "same-origin", + "upgrade-insecure-requests" => "1", + "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" + }, + method: "GET", + path_info: :undefined, + host_info: :undefined, + streamid: 7, + body_length: 0, + has_body: false, + qs: "foo=bar", + sock: {{127, 0, 0, 1}, 4000} + }}, + secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", + cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + }, + request_path: "/live", + method: "GET", + assigns: %{flash: %{}}, + remote_ip: {127, 0, 0, 1}, + req_headers: [ + {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, + {"accept-encoding", "gzip, deflate, br"}, + {"accept-language", "en-US,en;q=0.5"}, + {"connection", "keep-alive"}, + {"cookie", + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, + {"dnt", "1"}, + {"host", "localhost:4000"}, + {"referer", "http://localhost:4000/live?foo=bar"}, + {"sec-fetch-dest", "document"}, + {"sec-fetch-mode", "navigate"}, + {"sec-fetch-site", "same-origin"}, + {"upgrade-insecure-requests", "1"}, + {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} + ], + path_info: ["live"], + resp_headers: [ + {"cache-control", "max-age=0, private, must-revalidate"}, + {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, + {"referrer-policy", "strict-origin-when-cross-origin"}, + {"x-content-type-options", "nosniff"}, + {"x-download-options", "noopen"}, + {"x-frame-options", "SAMEORIGIN"}, + {"x-permitted-cross-domain-policies", "none"} + ], + resp_cookies: %{}, + resp_body: nil, + body_params: %{}, + path_params: %{}, + query_params: %{"foo" => "bar"}, + query_string: "foo=bar", + req_cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + } + }, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{flash: %{}}, []}, + connect_params: %{}, + root_view: NnnnnWeb.MyTestLive, + conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: nil, + root_pid: nil, + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"} + } + end + + def handle_params_exception(:exception) do + %{ + reason: %{message: "stop", __struct__: RuntimeError, __exception__: true}, + socket: %{ + id: "phx-F5N4UNBnc7walAAU", + private: %{ + connect_info: %{ + owner: IEx.Helpers.pid(0, 540, 0), + port: 4000, + private: %{ + :phoenix_live_view => + {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], + %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, + NnnnnWeb.Router => [], + :phoenix_endpoint => NnnnnWeb.Endpoint, + :plug_session_fetch => :done, + :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, + :before_send => [], + :phoenix_router => NnnnnWeb.Router, + :phoenix_request_logger => {"request_logger", "request_logger"}, + :phoenix_layout => %{_: false}, + :phoenix_format => "html", + :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} + }, + scheme: :http, + status: nil, + script_name: [], + state: :unset, + host: "localhost", + params: %{"foo" => "bar"}, + __struct__: Plug.Conn, + halted: false, + adapter: + {Plug.Cowboy.Conn, + %{ + pid: IEx.Helpers.pid(0, 540, 0), + port: 4000, + scheme: "http", + version: :"HTTP/1.1", + path: "/live", + host: "localhost", + peer: {{127, 0, 0, 1}, 56258}, + bindings: %{}, + ref: NnnnnWeb.Endpoint.HTTP, + cert: :undefined, + headers: %{ + "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "accept-encoding" => "gzip, deflate, br", + "accept-language" => "en-US,en;q=0.5", + "connection" => "keep-alive", + "cookie" => + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "dnt" => "1", + "host" => "localhost:4000", + "referer" => "http://localhost:4000/live?foo=bar", + "sec-fetch-dest" => "document", + "sec-fetch-mode" => "navigate", + "sec-fetch-site" => "same-origin", + "upgrade-insecure-requests" => "1", + "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" + }, + method: "GET", + path_info: :undefined, + host_info: :undefined, + streamid: 7, + body_length: 0, + has_body: false, + qs: "foo=bar", + sock: {{127, 0, 0, 1}, 4000} + }}, + secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", + cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + }, + request_path: "/live", + method: "GET", + assigns: %{flash: %{}}, + remote_ip: {127, 0, 0, 1}, + req_headers: [ + {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, + {"accept-encoding", "gzip, deflate, br"}, + {"accept-language", "en-US,en;q=0.5"}, + {"connection", "keep-alive"}, + {"cookie", + "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, + {"dnt", "1"}, + {"host", "localhost:4000"}, + {"referer", "http://localhost:4000/live?foo=bar"}, + {"sec-fetch-dest", "document"}, + {"sec-fetch-mode", "navigate"}, + {"sec-fetch-site", "same-origin"}, + {"upgrade-insecure-requests", "1"}, + {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} + ], + path_info: ["live"], + resp_headers: [ + {"cache-control", "max-age=0, private, must-revalidate"}, + {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, + {"referrer-policy", "strict-origin-when-cross-origin"}, + {"x-content-type-options", "nosniff"}, + {"x-download-options", "noopen"}, + {"x-frame-options", "SAMEORIGIN"}, + {"x-permitted-cross-domain-policies", "none"} + ], + resp_cookies: %{}, + resp_body: nil, + body_params: %{}, + path_params: %{}, + query_params: %{"foo" => "bar"}, + query_string: "foo=bar", + req_cookies: %{ + "TawkConnectionTime" => "0", + "_code_code_ship_session" => + "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", + "_lv_for_bug_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", + "_new_phx_thing_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", + "_nnnnn_key" => + "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", + "_post_checkout_survey_key" => + "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", + "lb:probe_cookie" => "", + "lb:session" => + "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", + "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" + } + }, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{flash: %{}}, []}, + connect_params: %{}, + root_view: NnnnnWeb.MyTestLive, + conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: nil, + root_pid: nil, + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + stacktrace: [ + {NnnnnWeb.MyTestLive, :handle_params, 3, + [ + file: ~c"lib/nnnnn_web/live/my_test_live.ex", + line: 28, + error_info: %{module: Exception} + ]}, + {Phoenix.LiveView.Utils, :"-call_handle_params!/5-fun-0-", 5, + [file: ~c"lib/phoenix_live_view/utils.ex", line: 462]}, + {:telemetry, :span, 3, [file: ~c"/home/derek/Code/nnnnn/deps/telemetry/src/telemetry.erl", line: 321]}, + {Phoenix.LiveView.Static, :call_mount_and_handle_params!, 5, + [file: ~c"lib/phoenix_live_view/static.ex", line: 279]}, + {Phoenix.LiveView.Static, :render, 3, [file: ~c"lib/phoenix_live_view/static.ex", line: 119]}, + {Phoenix.LiveView.Controller, :live_render, 3, [file: ~c"lib/phoenix_live_view/controller.ex", line: 39]}, + {Phoenix.Router, :__call__, 5, [file: ~c"lib/phoenix/router.ex", line: 432]}, + {NnnnnWeb.Endpoint, :plug_builder_call, 2, [file: ~c"lib/nnnnn_web/endpoint.ex", line: 1]}, + {NnnnnWeb.Endpoint, :"call (overridable 3)", 2, [file: ~c"deps/plug/lib/plug/debugger.ex", line: 136]}, + {NnnnnWeb.Endpoint, :call, 2, [file: ~c"lib/nnnnn_web/endpoint.ex", line: 1]}, + {Phoenix.Endpoint.SyncCodeReloadPlug, :do_call, 4, + [file: ~c"lib/phoenix/endpoint/sync_code_reload_plug.ex", line: 22]}, + {Plug.Cowboy.Handler, :init, 2, [file: ~c"lib/plug/cowboy/handler.ex", line: 11]}, + {:cowboy_handler, :execute, 2, [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_handler.erl", line: 37]}, + {:cowboy_stream_h, :execute, 3, + [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_stream_h.erl", line: 306]}, + {:cowboy_stream_h, :request_process, 3, + [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_stream_h.erl", line: 295]}, + {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]} + ], + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"}, + kind: :error + } + end + + def handle_params_stop() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + assign_new: {%{}, []}, + connect_params: %{ + "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", + "_mounts" => 5, + "_track_static" => [ + "http://localhost:4000/assets/app.css", + "http://localhost:4000/assets/app.js" + ] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {nil, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + uri: "http://localhost:4000/live?foo=bar", + params: %{"foo" => "bar"} + } + end + + def handle_event_start() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: + {39_937_697_276_181_388_757_385_442_171_495_723_205, + %{ + 2 => + {73_617_967_197_300_037_744_481_173_618_097_897_040, + %{ + 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 2 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {144_585_413_226_324_981_419_374_726_472_236_538_297, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 3 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {245_405_142_602_053_685_753_030_296_372_583_372_933, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }} + }}, + 3 => + {57_658_065_433_102_251_316_006_334_929_903_791_439, + %{ + 0 => + {111_334_535_098_600_973_939_295_926_462_112_722_006, + %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} + }} + }}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + params: %{}, + event: "hello" + } + end + + def handle_event_start(:exception) do + %{ + socket: %{ + id: "phx-F5N4Uz2FmAH4qwaD", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 540, 0), + router: NnnnnWeb.Router, + fingerprints: + {39_937_697_276_181_388_757_385_442_171_495_723_205, + %{ + 2 => + {73_617_967_197_300_037_744_481_173_618_097_897_040, + %{ + 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 2 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {144_585_413_226_324_981_419_374_726_472_236_538_297, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 3 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {245_405_142_602_053_685_753_030_296_372_583_372_933, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }} + }}, + 3 => + {33_984_160_809_218_664_543_582_638_264_118_753_933, + %{ + 0 => + {111_334_535_098_600_973_939_295_926_462_112_722_006, + %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} + }} + }}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + params: %{}, + event: "hello" + } + end + + def handle_event_exception(:exception) do + %{ + reason: %{message: "stop", __struct__: RuntimeError, __exception__: true}, + socket: %{ + id: "phx-F5N4Uz2FmAH4qwaD", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 540, 0), + router: NnnnnWeb.Router, + fingerprints: + {39_937_697_276_181_388_757_385_442_171_495_723_205, + %{ + 2 => + {73_617_967_197_300_037_744_481_173_618_097_897_040, + %{ + 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 2 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {144_585_413_226_324_981_419_374_726_472_236_538_297, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 3 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {245_405_142_602_053_685_753_030_296_372_583_372_933, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }} + }}, + 3 => + {33_984_160_809_218_664_543_582_638_264_118_753_933, + %{ + 0 => + {111_334_535_098_600_973_939_295_926_462_112_722_006, + %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} + }} + }}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + stacktrace: [ + {NnnnnWeb.MyTestLive, :handle_event, 3, + [ + file: ~c"lib/nnnnn_web/live/my_test_live.ex", + line: 32, + error_info: %{module: Exception} + ]}, + {Phoenix.LiveView.Channel, :"-view_handle_event/3-fun-0-", 3, + [file: ~c"lib/phoenix_live_view/channel.ex", line: 401]}, + {:telemetry, :span, 3, [file: ~c"/home/derek/Code/nnnnn/deps/telemetry/src/telemetry.erl", line: 321]}, + {Phoenix.LiveView.Channel, :handle_info, 2, [file: ~c"lib/phoenix_live_view/channel.ex", line: 221]}, + {:gen_server, :try_handle_info, 3, [file: ~c"gen_server.erl", line: 1077]}, + {:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 1165]}, + {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]} + ], + params: %{}, + kind: :error, + event: "hello" + } + end + + def handle_event_stop() do + %{ + socket: %{ + id: "phx-F5LbkYMazc6nbROF", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + handle_params: [], + mount: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: + {39_937_697_276_181_388_757_385_442_171_495_723_205, + %{ + 2 => + {73_617_967_197_300_037_744_481_173_618_097_897_040, + %{ + 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, + 2 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {144_585_413_226_324_981_419_374_726_472_236_538_297, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 3 => + {33_937_828_406_068_249_838_328_265_119_631_535_217, + %{ + 0 => + {274_835_210_088_729_429_103_026_462_060_282_169_556, + %{ + 4 => + {300_060_512_685_841_123_442_872_429_368_334_441_616, + %{ + 1 => + {7_929_807_277_372_053_948_725_376_894_618_837_157, + %{ + 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }}, + 5 => + {245_405_142_602_053_685_753_030_296_372_583_372_933, + %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, + 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} + }} + }} + }}, + 3 => + {57_658_065_433_102_251_316_006_334_929_903_791_439, + %{ + 0 => + {111_334_535_098_600_973_939_295_926_462_112_722_006, + %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} + }} + }}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + params: %{}, + event: "hello" + } + end + + def live_component_handle_event_start() do + %{ + socket: %{ + id: "phx-F5LcqnujE9_EGAsB", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + mount: [], + handle_params: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + assigns: %{ + id: 1, + __changed__: %{}, + flash: %{}, + myself: %{__struct__: Phoenix.LiveComponent.CID, cid: 1} + }, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {266_426_426_202_826_600_176_910_312_284_850_323_048, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + params: %{}, + event: "live component test", + component: NnnnnWeb.MyTestLive.MyLiveComponent + } + end + + def live_component_handle_event_stop() do + %{ + socket: %{ + id: "phx-F5LcqnujE9_EGAsB", + private: %{ + __temp__: %{}, + lifecycle: %{ + handle_info: [], + handle_event: [], + __struct__: Phoenix.LiveView.Lifecycle, + mount: [], + handle_params: [], + after_render: [] + }, + root_view: NnnnnWeb.MyTestLive + }, + __struct__: Phoenix.LiveView.Socket, + parent_pid: nil, + endpoint: NnnnnWeb.Endpoint, + view: NnnnnWeb.MyTestLive, + assigns: %{ + id: 1, + __changed__: %{}, + flash: %{}, + myself: %{__struct__: Phoenix.LiveComponent.CID, cid: 1} + }, + transport_pid: IEx.Helpers.pid(0, 540, 0), + root_pid: IEx.Helpers.pid(0, 548, 0), + router: NnnnnWeb.Router, + fingerprints: {266_426_426_202_826_600_176_910_312_284_850_323_048, %{}}, + redirected: nil, + host_uri: %{ + port: 4000, + scheme: "http", + path: nil, + host: "localhost", + __struct__: URI, + userinfo: nil, + fragment: nil, + query: nil, + authority: nil + } + }, + params: %{}, + event: "live component test", + component: NnnnnWeb.MyTestLive.MyLiveComponent + } + end +end diff --git a/instrumentation/opentelemetry_redix/mix.exs b/instrumentation/opentelemetry_redix/mix.exs index 5d69af41..22492ec1 100644 --- a/instrumentation/opentelemetry_redix/mix.exs +++ b/instrumentation/opentelemetry_redix/mix.exs @@ -1,12 +1,14 @@ defmodule OpentelemetryRedix.MixProject do use Mix.Project + @version "0.1.1" + def project do [ app: :opentelemetry_redix, description: description(), - version: "0.1.1", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), @@ -54,10 +56,10 @@ defmodule OpentelemetryRedix.MixProject do defp deps do [ {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}, - {:ex_doc, "~> 0.29.0", only: [:dev], runtime: false}, + {:ex_doc, "~> 0.31.0", only: [:dev], runtime: false}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_api, "~> 1.0"}, - {:opentelemetry_process_propagator, "~> 0.2"}, + {:opentelemetry_process_propagator, "~> 0.3"}, {:opentelemetry_semantic_conventions, "~> 0.2"}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]}, {:redix, "~> 1.0", only: [:dev, :test]}, diff --git a/instrumentation/opentelemetry_redix/mix.lock b/instrumentation/opentelemetry_redix/mix.lock index 526fa03a..04b27aeb 100644 --- a/instrumentation/opentelemetry_redix/mix.lock +++ b/instrumentation/opentelemetry_redix/mix.lock @@ -1,25 +1,26 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, - "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, + "chatterbox": {:hex, :ts_chatterbox, "0.15.1", "5cac4d15dd7ad61fc3c4415ce4826fc563d4643dee897a558ec4ea0b1c835c9c", [:rebar3], [{:hpack, "~> 0.3.0", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "4f75b91451338bc0da5f52f3480fa6ef6e3a2aeecfc33686d6b3d0a0948f31aa"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.1", "b1c652fa5f92ee9cf15c75271168027f92039b3877094290a75abcaac82a9f77", [: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", "b7745fa6374a36daf484e2a2012274950e084815b936b1319aeebcf7809574f6"}, - "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, - "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, - "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.3.0", "988ac3c26acac9720a1d4fb8d9dc52e95b45ecfec2d5b5583276a09e8936bc5e", [:rebar3], [{:opentelemetry_api, "~> 1.2.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "8e09edc26aad11161509d7ecad854a3285d88580f93b63b0b1cf0bac332bfcc0"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "gproc": {:hex, :gproc, "0.9.1", "f1df0364423539cf0b80e8201c8b1839e229e5f9b3ccb944c5834626998f5b8c", [:rebar3], [], "hexpm", "905088e32e72127ed9466f0bac0d8e65704ca5e73ee5a62cb073c3117916d507"}, + "grpcbox": {:hex, :grpcbox, "0.17.1", "6e040ab3ef16fe699ffb513b0ef8e2e896da7b18931a1ef817143037c454bcce", [:rebar3], [{:acceptor_pool, "~> 1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~> 0.15.1", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~> 0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~> 0.9.1", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "4a3b5d7111daabc569dc9cbd9b202a3237d81c80bf97212fbc676832cb0ceb17"}, + "hpack": {:hex, :hpack_erl, "0.3.0", "2461899cc4ab6a0ef8e970c1661c5fc6a52d3c25580bc6dd204f84ce94669926", [:rebar3], [], "hexpm", "d6137d7079169d8c485c6962dfe261af5b9ef60fbc557344511c1e65e3d95fb0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, - "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.2.2", "85244a49f0c32ae1e2f3d58c477c265bd6125ee3480ade82b0fa9324b85ed3f0", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "04db13302a34bea8350a13ed9d49c22dfd32c4bc590d8aa88b6b4b7e4f346c61"}, + "opentelemetry_process_propagator": {:hex, :opentelemetry_process_propagator, "0.3.0", "ef5b2059403a1e2b2d2c65914e6962e56371570b8c3ab5323d7a8d3444fb7f84", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "7243cb6de1523c473cba5b1aefa3f85e1ff8cc75d08f367104c1e11919c8c029"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, - "redix": {:hex, :redix, "1.2.0", "0d7eb3ccb7b82c461a6ea28b65c2c04486093d816dd6d901a09164800e004df1", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e1e0deb14599da07c77e66956a12863e85ee270ada826804a0ba8e61657e22a3"}, + "redix": {:hex, :redix, "1.3.0", "f4121163ff9d73bf72157539ff23b13e38422284520bb58c05e014b19d6f0577", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:nimble_options, "~> 0.5.0 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "60d483d320c77329c8cbd3df73007e51b23f3fae75b7693bc31120d83ab26131"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, - "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "tls_certificate_check": {:hex, :tls_certificate_check, "1.21.0", "042ab2c0c860652bc5cf69c94e3a31f96676d14682e22ec7813bd173ceff1788", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6cee6cffc35a390840d48d463541d50746a7b0e421acaadb833cfc7961e490e7"}, } diff --git a/instrumentation/opentelemetry_req/CHANGELOG.md b/instrumentation/opentelemetry_req/CHANGELOG.md index e7694b4b..4c91e678 100644 --- a/instrumentation/opentelemetry_req/CHANGELOG.md +++ b/instrumentation/opentelemetry_req/CHANGELOG.md @@ -1,13 +1,16 @@ # Changelog -## Unreleased +## 0.2.0 + +### Fixes + +* Add support for Req v0.4 -* Change span_name to follow [OpenTelemetry http spec](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#name) -* Use span_name if provided, otherwise use path_params. If there are no path_params, - default to http.method * Change http.url to follow [OpenTelemetry http spec](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#http-client). - Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment]. - Must not contain credentials passed via URL. + +* Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]` + +* Strip user credentials passed via URL ## 0.1.2 diff --git a/instrumentation/opentelemetry_req/lib/opentelemetry_req.ex b/instrumentation/opentelemetry_req/lib/opentelemetry_req.ex index 7e00a5a2..c761cff8 100644 --- a/instrumentation/opentelemetry_req/lib/opentelemetry_req.ex +++ b/instrumentation/opentelemetry_req/lib/opentelemetry_req.ex @@ -127,8 +127,8 @@ defmodule OpentelemetryReq do method = http_method(request.method) case Req.Request.get_private(request, :path_params_template) do - nil -> method - params_template -> "#{method} #{params_template}" + nil -> "HTTP #{method}" + params_template -> "#{params_template}" end span_name -> @@ -202,7 +202,12 @@ defmodule OpentelemetryReq do defp maybe_put_trace_headers(request) do if request.options[:propagate_trace_ctx] do - Map.put(request, :headers, :otel_propagator_text_map.inject(request.headers)) + propagator = :opentelemetry.get_text_map_injector() + headers_to_inject = :otel_propagator_text_map.inject(propagator, [], &[{&1, &2} | &3]) + + Enum.reduce(headers_to_inject, request, fn {name, value}, acc -> + Req.Request.put_header(acc, name, value) + end) else request end diff --git a/instrumentation/opentelemetry_req/mix.exs b/instrumentation/opentelemetry_req/mix.exs index 06665a4c..87889c59 100644 --- a/instrumentation/opentelemetry_req/mix.exs +++ b/instrumentation/opentelemetry_req/mix.exs @@ -1,11 +1,13 @@ defmodule OpentelemetryReq.MixProject do use Mix.Project + @version "0.2.0" + def project do [ app: :opentelemetry_req, description: description(), - version: "0.1.2", + version: @version, elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), @@ -60,7 +62,8 @@ defmodule OpentelemetryReq.MixProject do {:opentelemetry_api, "~> 1.0"}, {:opentelemetry_semantic_conventions, "~> 0.2"}, {:req, ">= 0.3.5"}, - {:ex_doc, "~> 0.29", only: [:dev, :test]} + {:ex_doc, "~> 0.31", only: [:dev, :test]}, + {:opentelemetry, "~> 1.0", only: :test} ] end end diff --git a/instrumentation/opentelemetry_req/mix.lock b/instrumentation/opentelemetry_req/mix.lock index 87c69d2a..5de6d227 100644 --- a/instrumentation/opentelemetry_req/mix.lock +++ b/instrumentation/opentelemetry_req/mix.lock @@ -1,20 +1,21 @@ %{ - "castore": {:hex, :castore, "0.1.22", "4127549e411bedd012ca3a308dede574f43819fe9394254ca55ab4895abfa1a2", [:mix], [], "hexpm", "c17576df47eb5aa1ee40cc4134316a99f5cad3e215d5c77b8dd3cfef12a22cac"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.31", "a93921cdc6b9b869f519213d5bc79d9e218ba768d7270d46fdcf1c01bacff9e2", [:mix], [], "hexpm", "317d367ee0335ef037a87e46c91a2269fef6306413f731e8ec11fc45a7efd059"}, - "ex_doc": {:hex, :ex_doc, "0.29.2", "dfa97532ba66910b2a3016a4bbd796f41a86fc71dd5227e96f4c8581fdf0fdf0", [: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", "6b5d7139eda18a753e3250e27e4a929f8d2c880dd0d460cb9986305dea3e03af"}, - "finch": {:hex, :finch, "0.14.0", "619bfdee18fc135190bf590356c4bf5d5f71f916adb12aec94caa3fa9267a4bc", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "5459acaf18c4fdb47a8c22fb3baff5d8173106217c8e56c5ba0b93e66501a8dd"}, + "castore": {:hex, :castore, "1.0.5", "9eeebb394cc9a0f3ae56b813459f990abb0a3dedee1be6b27fdb50301930502f", [:mix], [], "hexpm", "8d7c597c3e4a64c395980882d4bca3cebb8d74197c590dc272cfd3b6a6310578"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, - "mint": {:hex, :mint, "1.5.1", "8db5239e56738552d85af398798c80648db0e90f343c8469f6c6d8898944fb6f", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "4a63e1e76a7c3956abd2c72f370a0d0aecddc3976dea5c27eccbecfa5e7d5b1e"}, - "nimble_options": {:hex, :nimble_options, "0.5.2", "42703307b924880f8c08d97719da7472673391905f528259915782bb346e0a1b", [:mix], [], "hexpm", "4da7f904b915fd71db549bcdc25f8d56f378ef7ae07dc1d372cbe72ba950dce0"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "nimble_pool": {:hex, :nimble_pool, "0.2.6", "91f2f4c357da4c4a0a548286c84a3a28004f68f05609b4534526871a22053cde", [:mix], [], "hexpm", "1c715055095d3f2705c4e236c18b618420a35490da94149ff8b580a2144f653f"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.2.1", "7b69ed4f40025c005de0b74fce8c0549625d59cb4df12d15c32fe6dc5076ff42", [:mix, :rebar3], [{:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "6d7a27b7cad2ad69a09cabf6670514cafcec717c8441beb5c96322bac3d05350"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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"}, - "req": {:hex, :req, "0.3.6", "541350d2cc359a8ad17059f2629c18be56d0c85ce0e4ddb27694b6ba482fe923", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.9", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "9181047f32b05f8737f6b5917af5ee5385219158bbe4e507f4ec57791a0a78c3"}, + "req": {:hex, :req, "0.4.8", "2b754a3925ddbf4ad78c56f30208ced6aefe111a7ea07fb56c23dccc13eb87ae", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.9", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "7146e51d52593bb7f20d00b5308a5d7d17d663d6e85cd071452b613a8277100c"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, } diff --git a/instrumentation/opentelemetry_req/test/opentelemetry_req_test.exs b/instrumentation/opentelemetry_req/test/opentelemetry_req_test.exs index e44c5a52..0ba8b0e6 100644 --- a/instrumentation/opentelemetry_req/test/opentelemetry_req_test.exs +++ b/instrumentation/opentelemetry_req/test/opentelemetry_req_test.exs @@ -1,4 +1,64 @@ defmodule OpentelemetryReqTest do - use ExUnit.Case + use ExUnit.Case, async: true doctest OpentelemetryReq + require Record + + for {name, spec} <- Record.extract_all(from_lib: "opentelemetry/include/otel_span.hrl") do + Record.defrecordp(name, spec) + end + + setup do + :application.stop(:opentelemetry) + :application.set_env(:opentelemetry, :tracer, :otel_tracer_default) + + :application.set_env(:opentelemetry, :processors, [ + {:otel_batch_processor, %{scheduled_delay_ms: 1, exporter: {:otel_exporter_pid, self()}}} + ]) + + :application.start(:opentelemetry) + + req = + Req.new() + |> OpentelemetryReq.attach() + + {:ok, req: req} + end + + test "span", %{req: req} do + adapter = fn request -> + assert URI.to_string(request.url) == "/users/3" + {request, Req.Response.new(status: 204)} + end + + resp = + Req.get!(req, + adapter: adapter, + url: "/users/:id", + path_params: [id: 3] + ) + + assert resp.status == 204 + assert_receive {:span, span(name: "/users/:id")} + refute_receive _ + end + + test "propagate traces", %{req: req} do + adapter = fn request -> + assert [value] = Req.Request.get_header(request, "traceparent") + assert byte_size(value) > 10 + {request, Req.Response.new(status: 204)} + end + + resp = + Req.get!(req, + adapter: adapter, + url: "/", + no_path_params: true, + propagate_trace_ctx: true + ) + + assert resp.status == 204 + assert_receive {:span, span()} + refute_receive _ + end end diff --git a/instrumentation/opentelemetry_tesla/mix.exs b/instrumentation/opentelemetry_tesla/mix.exs index 5397002e..52ac25d9 100644 --- a/instrumentation/opentelemetry_tesla/mix.exs +++ b/instrumentation/opentelemetry_tesla/mix.exs @@ -1,11 +1,13 @@ defmodule OpentelemetryTesla.MixProject do use Mix.Project + @version "2.3.0" + def project do [ app: :opentelemetry_tesla, - version: "2.2.0", - elixir: "~> 1.10", + version: @version, + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), package: package(), @@ -53,11 +55,11 @@ defmodule OpentelemetryTesla.MixProject do defp deps do [ {:opentelemetry, "~> 1.0", only: :test}, - {:opentelemetry_api, "~> 1.0"}, - {:opentelemetry_telemetry, "~> 1.0.0"}, + {:opentelemetry_api, "~> 1.2"}, + {:opentelemetry_telemetry, "~> 1.1"}, {:opentelemetry_semantic_conventions, "~> 0.2"}, {:tesla, "~> 1.4"}, - {:ex_doc, "~> 0.24", only: :dev, runtime: false}, + {:ex_doc, "~> 0.31", only: :dev, runtime: false}, {:bypass, "~> 2.1", only: :test}, {:jason, "~> 1.3", only: :test} ] diff --git a/instrumentation/opentelemetry_tesla/mix.lock b/instrumentation/opentelemetry_tesla/mix.lock index 039906f8..0258e6d4 100644 --- a/instrumentation/opentelemetry_tesla/mix.lock +++ b/instrumentation/opentelemetry_tesla/mix.lock @@ -1,25 +1,24 @@ %{ "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, - "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, + "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "opentelemetry": {:hex, :opentelemetry, "1.1.2", "77ba2fd2fee67bebde590851a4afeda45b3f298310aa410a2a3804b364cb598a", [:rebar3], [{:opentelemetry_api, "~> 1.1", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "5c60be189d6aed64a9fd17055f72c93eab144be441e625276c3c95533e6bb4c7"}, - "opentelemetry_api": {:hex, :opentelemetry_api, "1.1.1", "3b43877c456c8a7f5448a95d9bf4fb4bb8cc2abbbea2c62d5f8e8c538b4af14f", [:mix, :rebar3], [], "hexpm", "a9554b3208b60a70043318d051ea78fbbc7a1b8f4c418ebc16ccb40015995675"}, + "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"}, + "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, + "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"}, - "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, - "plug": {:hex, :plug, "1.14.0", "ba4f558468f69cbd9f6b356d25443d0b796fbdc887e03fa89001384a9cac638f", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bf020432c7d4feb7b3af16a0c2701455cbbbb95e5b6866132cb09eb0c29adc14"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.6.0", "d1cf12ff96a1ca4f52207c5271a6c351a4733f413803488d75b70ccf44aebec2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "073cf20b753ce6682ed72905cd62a2d4bd9bad1bf9f7feb02a1b8e525bd94fa6"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.3", "8f77d13aeb32bfd9e654cb68f0af517b371fb34c56c9f2b58fe3df1235c1251a", [:mix], [], "hexpm", "b5672099c6ad5c202c45f5a403f21a3411247f164e4a8fab056e5cd8a290f4a2"}, + "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.1.1", "4a73bfa29d7780ffe33db345465919cef875034854649c37ac789eb8e8f38b21", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ee43b14e6866123a3ee1344e3c0d3d7591f4537542c2a925fcdbf46249c9b50b"}, + "plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.7.0", "3ae9369c60641084363b08fe90267cbdd316df57e3557ea522114b30b63256ea", [:mix], [{:cowboy, "~> 2.7.0 or ~> 2.8.0 or ~> 2.9.0 or ~> 2.10.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d85444fb8aa1f2fc62eabe83bbe387d81510d773886774ebdcb429b3da3c1a4a"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, - "telemetry": {:hex, :telemetry, "1.1.0", "a589817034a27eab11144ad24d5c0f9fab1f58173274b1e9bae7074af9cbee51", [:rebar3], [], "hexpm", "b727b2a1f75614774cff2d7565b64d0dfa5bd52ba517f16543e6fc7efcc0df48"}, - "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, - "tesla": {:hex, :tesla, "1.4.4", "bb89aa0c9745190930366f6a2ac612cdf2d0e4d7fff449861baa7875afd797b2", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.3", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "d5503a49f9dec1b287567ea8712d085947e247cb11b06bc54adb05bfde466457"}, + "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, + "tesla": {:hex, :tesla, "1.8.0", "d511a4f5c5e42538d97eef7c40ec4f3e44effdc5068206f42ed859e09e51d1fd", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "10501f360cd926a309501287470372af1a6e1cbed0f43949203a4c13300bc79f"}, } diff --git a/propagators/opentelemetry_process_propagator/CHANGELOG.md b/propagators/opentelemetry_process_propagator/CHANGELOG.md index 87134adb..56ba6848 100644 --- a/propagators/opentelemetry_process_propagator/CHANGELOG.md +++ b/propagators/opentelemetry_process_propagator/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.3.0 + +### Fixes + +- Process Propagator: Allow looking up parent when parent is a named process @jeffutter (#261) + +### Maintenance + +- Support for Elixir 1.15 and OTP 26 @tomtaylor (#188) +- Fix documentation example for OpentelemetryProcessPropagator @bamorim (#220) +- Fix tiny typos @davydog187 (#219) + ## v0.2.2 ### Fixes diff --git a/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex b/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex index 683b3424..f831c121 100644 --- a/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex +++ b/propagators/opentelemetry_process_propagator/lib/opentelemetry_process_propagator.ex @@ -50,7 +50,7 @@ defmodule OpentelemetryProcessPropagator do # you don't control, e.g. Ecto preloads Task.async(fn -> - parent_ctx = OpentelemetryProcessPropagator.fetch_parent_ctx(:"$callers") + parent_ctx = OpentelemetryProcessPropagator.fetch_parent_ctx(1, :"$callers") OpenTelemetry.Ctx.attach(parent_ctx) @@ -82,7 +82,7 @@ defmodule OpentelemetryProcessPropagator do """ @doc """ - Attempt to fetch an otel context from a give pid. + Attempt to fetch an otel context from a given pid. """ @spec fetch_ctx(pid) :: OpenTelemetry.Ctx.t() | :undefined defdelegate fetch_ctx(pid), to: :opentelemetry_process_propagator @@ -97,7 +97,7 @@ defmodule OpentelemetryProcessPropagator do @doc """ Attempt to find an otel context in a spawning process within `n` number of parent - processes + processes. """ @spec fetch_parent_ctx(non_neg_integer()) :: OpenTelemetry.Ctx.t() | :undefined defdelegate fetch_parent_ctx(depth), to: :opentelemetry_process_propagator diff --git a/propagators/opentelemetry_process_propagator/mix.exs b/propagators/opentelemetry_process_propagator/mix.exs index 97ea0a1b..1339c489 100644 --- a/propagators/opentelemetry_process_propagator/mix.exs +++ b/propagators/opentelemetry_process_propagator/mix.exs @@ -45,7 +45,7 @@ defmodule OpentelemetryProcessPropagator.MixProject do end) |> Enum.concat([ {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}, - {:ex_doc, "~> 0.29", only: :dev, runtime: false}, + {:ex_doc, "~> 0.31", only: :dev, runtime: false}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]} ]) diff --git a/propagators/opentelemetry_process_propagator/mix.lock b/propagators/opentelemetry_process_propagator/mix.lock index cb433f3f..3f1e20d3 100644 --- a/propagators/opentelemetry_process_propagator/mix.lock +++ b/propagators/opentelemetry_process_propagator/mix.lock @@ -3,16 +3,16 @@ "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [: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", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, + "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"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, diff --git a/propagators/opentelemetry_process_propagator/rebar.lock b/propagators/opentelemetry_process_propagator/rebar.lock index f68702e4..91920c29 100644 --- a/propagators/opentelemetry_process_propagator/rebar.lock +++ b/propagators/opentelemetry_process_propagator/rebar.lock @@ -1,8 +1,13 @@ {"1.2.0", -[{<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.0.0-rc.4">>},0}]}. +[{<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.2.2">>},0}, + {<<"opentelemetry_semantic_conventions">>, + {pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>}, + 1}]}. [ {pkg_hash,[ - {<<"opentelemetry_api">>, <<"13FB20B8800149CE52DAA8FB793C1A45B826CC4BD0D5BC7E8A00CAB46285CBE6">>}]}, + {<<"opentelemetry_api">>, <<"693F47B0D8C76DA2095FE858204CFD6350C27FE85D00E4B763DEECC9588CF27A">>}, + {<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>}]}, {pkg_hash_ext,[ - {<<"opentelemetry_api">>, <<"29C5BF7D5C40C4B9816906277BEB2438E6737073721C75398465B1ACD1B56B06">>}]} + {<<"opentelemetry_api">>, <<"DC77B9A00F137A858E60A852F14007BB66EDA1FFBEB6C05D5FE6C9E678B05E9D">>}, + {<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>}]} ]. diff --git a/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.app.src b/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.app.src index 3d7a1567..0b9c4f26 100644 --- a/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.app.src +++ b/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_process_propagator, [{description, "Tools for OpenTelemetry context propagation across process boundaries"}, - {vsn, "0.2.2"}, + {vsn, "0.3.0"}, {registered, []}, {applications, [kernel, diff --git a/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.erl b/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.erl index 4c50d1fd..ce579a1f 100644 --- a/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.erl +++ b/propagators/opentelemetry_process_propagator/src/opentelemetry_process_propagator.erl @@ -39,7 +39,12 @@ fetch_ctx(Pid) -> otel_ctx(Dictionary) end. --spec pdict(pid()) -> [{term(), term()}] | undefined. +-spec pdict(pid() | atom()) -> [{term(), term()}] | undefined. +pdict(Name) when is_atom(Name) -> + case whereis(Name) of + undefined -> undefined; + Pid -> pdict(Pid) + end; pdict(Pid) -> case process_info(Pid, dictionary) of {dictionary, Dict} -> diff --git a/propagators/opentelemetry_process_propagator/test/opentelemetry_process_propagator_test.exs b/propagators/opentelemetry_process_propagator/test/opentelemetry_process_propagator_test.exs index 9d74e774..d2b927cc 100644 --- a/propagators/opentelemetry_process_propagator/test/opentelemetry_process_propagator_test.exs +++ b/propagators/opentelemetry_process_propagator/test/opentelemetry_process_propagator_test.exs @@ -55,6 +55,24 @@ defmodule OpentelemetryProcessPropagatorTest do assert_receive ^ctx end + + test "fetches the parent ctx when parent is named" do + Process.register(self(), TestParent) + + span_ctx = Tracer.start_span("test") + Tracer.set_current_span(span_ctx) + + ctx = Ctx.get_current() + + pid = self() + + :proc_lib.spawn(fn -> + p_ctx = fetch_parent_ctx() + send(pid, p_ctx) + end) + + assert_receive ^ctx + end end describe "fetch_parent_ctx/1" do diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..70ca6ac8 --- /dev/null +++ b/renovate.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "packageRules": [ + { + "matchDatasources": ["hex"], + "matchUpdateTypes": ["minor", "patch", "pin", "digest"], + "addLabels": ["skip-changelog"] + } + ] +} diff --git a/utilities/opentelemetry_aws_xray/LICENSE b/utilities/opentelemetry_aws_xray/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/utilities/opentelemetry_aws_xray/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/utilities/opentelemetry_aws_xray/rebar.config b/utilities/opentelemetry_aws_xray/rebar.config index d8997333..58d3ec29 100644 --- a/utilities/opentelemetry_aws_xray/rebar.config +++ b/utilities/opentelemetry_aws_xray/rebar.config @@ -1,11 +1,21 @@ {erl_opts, [debug_info]}. -{deps, [{opentelemetry, "~> 1.0"}]}. +{deps, [{opentelemetry_api, "~> 1.2"}]}. -{project_plugins, [{rebar_covertool, "1.1.0"}]}. +{project_plugins, [covertool, + erlfmt, + rebar3_hex, + rebar3_ex_doc]}. + +{hex, [{doc, ex_doc}]}. + +{ex_doc, [ + {source_url, <<"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/utilities/opentelemetry_aws_xray">>}, + {extras, [<<"README.md">>, <<"LICENSE.md">>]}, + {main, <<"readme">>}]}. {profiles, [{test, [{erl_opts, [nowarn_export_all]}, - {deps, [{opentelemetry, "~> 1.0"}]}]}]}. + {deps, [{opentelemetry, "~> 1.3"}]}]}]}. {cover_enabled, true}. {cover_opts, [verbose]}. diff --git a/utilities/opentelemetry_aws_xray/rebar.lock b/utilities/opentelemetry_aws_xray/rebar.lock index d0cf5a72..91920c29 100644 --- a/utilities/opentelemetry_aws_xray/rebar.lock +++ b/utilities/opentelemetry_aws_xray/rebar.lock @@ -1,11 +1,13 @@ {"1.2.0", -[{<<"opentelemetry">>,{pkg,<<"opentelemetry">>,<<"1.0.5">>},0}, - {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.0.3">>},1}]}. +[{<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.2.2">>},0}, + {<<"opentelemetry_semantic_conventions">>, + {pkg,<<"opentelemetry_semantic_conventions">>,<<"0.2.0">>}, + 1}]}. [ {pkg_hash,[ - {<<"opentelemetry">>, <<"F0CD36AC8B30B68E8D70CEC5BB88801ED7F3FE79AAC67597054ED5490542E810">>}, - {<<"opentelemetry_api">>, <<"77F9644C42340CD8B18C728CDE4822ED55AE136F0D07761B78E8C54DA46AF93A">>}]}, + {<<"opentelemetry_api">>, <<"693F47B0D8C76DA2095FE858204CFD6350C27FE85D00E4B763DEECC9588CF27A">>}, + {<<"opentelemetry_semantic_conventions">>, <<"B67FE459C2938FCAB341CB0951C44860C62347C005ACE1B50F8402576F241435">>}]}, {pkg_hash_ext,[ - {<<"opentelemetry">>, <<"3B17F8933A58E1246F42A0C215840FD8218AEBBCABDB0AAC62B0C766FE85542E">>}, - {<<"opentelemetry_api">>, <<"4293E06BD369BC004E6FAD5EDBB56456D891F14BD3F9F1772B18F1923E0678EA">>}]} + {<<"opentelemetry_api">>, <<"DC77B9A00F137A858E60A852F14007BB66EDA1FFBEB6C05D5FE6C9E678B05E9D">>}, + {<<"opentelemetry_semantic_conventions">>, <<"D61FA1F5639EE8668D74B527E6806E0503EFC55A42DB7B5F39939D84C07D6895">>}]} ]. diff --git a/utilities/opentelemetry_aws_xray/src/opentelemetry_aws_xray.app.src b/utilities/opentelemetry_aws_xray/src/opentelemetry_aws_xray.app.src index 82a78ee4..392df1ce 100644 --- a/utilities/opentelemetry_aws_xray/src/opentelemetry_aws_xray.app.src +++ b/utilities/opentelemetry_aws_xray/src/opentelemetry_aws_xray.app.src @@ -1,11 +1,11 @@ {application, opentelemetry_aws_xray, [ {description, "OpenTelemetry AWS X-Ray TraceId Generator"}, - {vsn, "0.1.0"}, + {vsn, "0.2.0"}, {registered, []}, {applications, [ kernel, stdlib, - opentelemetry + opentelemetry_api ]}, {env, []}, {modules, []}, diff --git a/utilities/opentelemetry_telemetry/mix.exs b/utilities/opentelemetry_telemetry/mix.exs index 613fb063..a9ad4b9f 100644 --- a/utilities/opentelemetry_telemetry/mix.exs +++ b/utilities/opentelemetry_telemetry/mix.exs @@ -9,7 +9,7 @@ defmodule OpentelemetryTelemetry.MixProject do app: app, version: to_string(Keyword.fetch!(desc, :vsn)), description: to_string(Keyword.fetch!(desc, :description)), - elixir: "~> 1.10", + elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(Keyword.fetch!(config, :deps)), name: "Opentelemetry Telemetry", @@ -44,8 +44,8 @@ defmodule OpentelemetryTelemetry.MixProject do dep when is_atom(dep) -> {dep, ">= 0.0.0"} end) |> Enum.concat([ - {:dialyxir, "~> 1.3.0", only: [:dev, :test], runtime: false}, - {:ex_doc, "~> 0.29", only: :dev, runtime: false}, + {:dialyxir, "~> 1.4.0", only: [:dev, :test], runtime: false}, + {:ex_doc, "~> 0.31", only: :dev, runtime: false}, {:opentelemetry, "~> 1.0", only: [:dev, :test]}, {:opentelemetry_exporter, "~> 1.0", only: [:dev, :test]} ]) diff --git a/utilities/opentelemetry_telemetry/mix.lock b/utilities/opentelemetry_telemetry/mix.lock index 004c9f14..2be6a299 100644 --- a/utilities/opentelemetry_telemetry/mix.lock +++ b/utilities/opentelemetry_telemetry/mix.lock @@ -1,27 +1,23 @@ %{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb088335511d691ebf", [:rebar3], [{:hpack, "~>0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}], "hexpm", "b93d19104d86af0b3f2566c4cba2a57d2e06d103728246ba1ac6c3c0ff010aa7"}, - "cmark": {:hex, :cmark, "0.9.0", "c0e673019e125eb5878b6c5610af919d737e881369e0cd2247c89e767f42c029", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "0cfb4d8888bc801f2decc23eee3b3b756b682dff976d15a46861a596fdb00079"}, "ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"}, - "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.5", "62ffd3bd7722fb7a7b1ecd2419ea0b458c356e7168c1f5d65caf09b4fbdd13c8", [:mix], [], "hexpm", "b7d0e6263d83dc27141a523467799a685965bf8b13b6743413f19a7079843f4f"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.35", "437773ca9384edf69830e26e9e7b2e0d22d2596c4a6b17094a3b29f01ea65bb8", [:mix], [], "hexpm", "8652ba3cb85608d0d7aa2d21b45c6fad4ddc9a1f9a1f1b30ca3a246f0acc33f6"}, - "elixir_make": {:hex, :elixir_make, "0.6.0", "38349f3e29aff4864352084fc736fa7fa0f2995a819a737554f7ebd28b85aaab", [:mix], [], "hexpm", "d522695b93b7f0b4c0fcb2dfe73a6b905b1c301226a5a55cb42e5b14d509e050"}, + "dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.30.6", "5f8b54854b240a2b55c9734c4b1d0dd7bdd41f71a095d42a70445c03cf05a281", [: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", "bd48f2ddacf4e482c727f9293d9498e0881597eae6ddc3d9562bd7923375109f"}, + "ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"}, "gproc": {:hex, :gproc, "0.8.0", "cea02c578589c61e5341fce149ea36ccef236cc2ecac8691fba408e7ea77ec2f", [:rebar3], [], "hexpm", "580adafa56463b75263ef5a5df4c86af321f68694e7786cb057fd805d1e2a7de"}, "grpcbox": {:hex, :grpcbox, "0.16.0", "b83f37c62d6eeca347b77f9b1ec7e9f62231690cdfeb3a31be07cd4002ba9c82", [:rebar3], [{:acceptor_pool, "~>1.0.0", [hex: :acceptor_pool, repo: "hexpm", optional: false]}, {:chatterbox, "~>0.13.0", [hex: :ts_chatterbox, repo: "hexpm", optional: false]}, {:ctx, "~>0.6.0", [hex: :ctx, repo: "hexpm", optional: false]}, {:gproc, "~>0.8.0", [hex: :gproc, repo: "hexpm", optional: false]}], "hexpm", "294df743ae20a7e030889f00644001370a4f7ce0121f3bbdaf13cf3169c62913"}, "hpack": {:hex, :hpack_erl, "0.2.3", "17670f83ff984ae6cd74b1c456edde906d27ff013740ee4d9efaa4f1bf999633", [:rebar3], [], "hexpm", "06f580167c4b8b8a6429040df36cc93bba6d571faeaec1b28816523379cbb23a"}, - "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": {: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"}, - "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.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "opentelemetry": {:hex, :opentelemetry, "1.3.1", "f0a342a74379e3540a634e7047967733da4bc8b873ec9026e224b2bd7369b1fc", [:rebar3], [{:opentelemetry_api, "~> 1.2.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.2", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}], "hexpm", "de476b2ac4faad3e3fe3d6e18b35dec9cb338c3b9910c2ce9317836dacad3483"}, "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_exporter": {:hex, :opentelemetry_exporter, "1.6.0", "f4fbf69aa9f1541b253813221b82b48a9863bc1570d8ecc517bc510c0d1d3d8c", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.2", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.18", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "1802d1dca297e46f21e5832ecf843c451121e875f73f04db87355a6cb2ba1710"}, "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, - "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, "tls_certificate_check": {:hex, :tls_certificate_check, "1.19.0", "c76c4c5d79ee79a2b11c84f910c825d6f024a78427c854f515748e9bd025e987", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4083b4a298add534c96125337cb01161c358bb32dd870d5a893aae685fd91d70"}, } diff --git a/utilities/opentelemetry_telemetry/src/opentelemetry_telemetry.app.src b/utilities/opentelemetry_telemetry/src/opentelemetry_telemetry.app.src index 69018592..4fafbf11 100644 --- a/utilities/opentelemetry_telemetry/src/opentelemetry_telemetry.app.src +++ b/utilities/opentelemetry_telemetry/src/opentelemetry_telemetry.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_telemetry, [{description, "Telemetry to OpenTelemetry Bridge"}, - {vsn, "1.0.0"}, + {vsn, "1.1.1"}, {registered, []}, {applications, [kernel,