{"id":15023187,"url":"https://github.com/open-telemetry/opentelemetry-erlang","last_synced_at":"2025-05-14T00:09:26.656Z","repository":{"id":39674006,"uuid":"185686745","full_name":"open-telemetry/opentelemetry-erlang","owner":"open-telemetry","description":"OpenTelemetry Erlang SDK","archived":false,"fork":false,"pushed_at":"2025-05-02T18:56:21.000Z","size":3735,"stargazers_count":355,"open_issues_count":115,"forks_count":115,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-02T19:40:44.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opentelemetry.io","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-telemetry.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-08T22:19:42.000Z","updated_at":"2025-05-02T18:56:23.000Z","dependencies_parsed_at":"2023-10-03T02:38:26.179Z","dependency_job_id":"64797da4-21f4-4d0f-b6c1-e369f6ca0e8f","html_url":"https://github.com/open-telemetry/opentelemetry-erlang","commit_stats":{"total_commits":1172,"total_committers":64,"mean_commits":18.3125,"dds":0.5537542662116042,"last_synced_commit":"9f7affe630676d2803b04f69d0c759effb6e0245"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-telemetry","download_url":"https://codeload.github.com/open-telemetry/opentelemetry-erlang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044137,"owners_count":22005085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:58:48.567Z","updated_at":"2025-05-14T00:09:21.647Z","avatar_url":"https://github.com/open-telemetry.png","language":"Erlang","funding_links":[],"categories":["Erlang"],"sub_categories":[],"readme":"## OpenTelemetry Erlang/Elixir\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hex.pm/packages/opentelemetry_api\"\u003e\n    \u003cimg\n        src=\"https://img.shields.io/hexpm/v/opentelemetry_api?label=API\u0026amp;style=for-the-badge\"\n        alt=\"Hex.pm\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/opentelemetry\"\u003e\n    \u003cimg\n        src=\"https://img.shields.io/hexpm/v/opentelemetry?label=SDK\u0026amp;style=for-the-badge\"\n        alt=\"Hex.pm\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/opentelemetry_exporter\"\u003e\n    \u003cimg\n  src=\"https://img.shields.io/hexpm/v/opentelemetry_exporter?label=OTLP%20Exporter\u0026amp;style=for-the-badge\"\n  alt=\"Hex.pm\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/erlef/eef-observability-wg\"\u003e\n    \u003cimg\n        src=\"https://img.shields.io/badge/EEF-Observability-black?style=for-the-badge\"\n        alt=\"EEF Observability WG project\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/open-telemetry/opentelemetry-erlang/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/open-telemetry/opentelemetry-erlang/erlang.yml?style=for-the-badge\u0026branch=main\" alt=\"GitHub Workflow Status\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/codecov/c/github/open-telemetry/opentelemetry-erlang?style=for-the-badge\" alt=\"Codecov\" /\u003e\n\u003c/p\u003e\n\n---\n\n[OpenTelemetry](https://opentelemetry.io/) distributed tracing framework for\nErlang and Elixir.\n\nThese applications implement version 1.8.0 of the [OpenTelemetry\nSpecification](https://github.com/open-telemetry/opentelemetry-specification),\nsee the [spec compliance\nmatrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md)\nfor a list of features supported.\n\n## Requirements\n\n- Erlang/OTP 23+ (With best effort for OTP 22 support)\n\nIf using the Elixir API:\n\n- Elixir 1.13+\n\n## Contacting Us\n\nWe hold weekly meetings. See details at [community page](https://github.com/open-telemetry/community#special-interest-groups).\n\nWe use [GitHub\nDiscussions](https://github.com/open-telemetry/opentelemetry-erlang/discussions)\nfor support or general questions. Feel free to drop us a line.\n\nWe are also present in the #otel-erlang-elixir channel in the [CNCF\nslack](https://slack.cncf.io/). Please join us for more informal discussions.\n\nYou can also find us in the #opentelemetry channel on [Elixir\nSlack](https://elixir-slackin.herokuapp.com/).\n\n## Getting Started\n\nYou can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/instrumentation/erlang/getting-started/).\n\nTo start capturing distributed traces from your application it first needs to be\ninstrumented. The easiest way to do this is by using an instrumentation library.\nThere are a number of [officially supported instrumentation\nlibraries](https://github.com/open-telemetry/opentelemetry-erlang-contrib) for\npopular Erlang and Elixir libraries and frameworks.\n\n## Design\n\nThe [OpenTelemetry\nspecification](https://github.com/open-telemetry/opentelemetry-specification)\ndefines a language library as having two components, the API and the SDK. The API\nmust not only define the interfaces of any implementation in that language but\nalso be able to function as a noop implementation of the tracer. The SDK is the\ndefault implementation of the API that must be optional.\n\nWhen instrumenting a project, your application should only depend on the\n[OpenTelemetry API](https://hex.pm/packages/opentelemetry_api) application,\nfound in directory `apps/opentelemetry_api` of this repo.  The API is published as\nthe Hex package [opentelemetry_api](https://hex.pm/packages/opentelemetry_api).\n\nThe SDK implementation, found under `apps/opentelemetry` and Hex package\n[opentelemetry](https://hex.pm/packages/opentelemetry), should be included in an\nOTP Release along with an exporter.\n\nExample of Release configuration in `rebar.config`:\n\n``` erlang\n{relx, [{release, {my_instrumented_release, \"0.1.0\"},\n         [opentelemetry_exporter,\n\t      {opentelemetry, temporary},\n          my_instrumented_app]},\n\n       ...]}.\n```\n\nExample configuration for [mix's Release\ntask](https://hexdocs.pm/mix/Mix.Tasks.Release.html):\n\n``` elixir\ndef project do\n  [\n    releases: [\n      my_instrumented_release: [\n        applications: [opentelemetry_exporter: :permanent, opentelemetry: :temporary]\n      ],\n\n      ...\n    ]\n  ]\nend\n```\n\nNote that you also need  to add `opentelemetry_exporter` before your other `opentelemetry` dependencies in `mix.exs`,\nso that it starts before `opentelemetry` does.\n\nIn the above example `opentelemetry_exporter` is listed first, ensuring that all of its\ndependencies are booted before `opentelemetry` attempts to start the\nexporter. `opentelemetry` is set to `temporary` so that if the `opentelemetry`\napplication crashes, or is shutdown, it does not terminate the other\napplications in the project -- `opentelemetry_exporter` does not not need to be\n`temporary` because it does not have a startup and supervision tree. This is\noptional; the `opentelemetry` application purposely sticks to `permanent` for\nthe processes started by the root supervisor to leave it up to the end user\nwhether they want the crash or shutdown or `opentelemetry` to be ignored or\ncause the shutdown of the rest of the applications in the release.\n\n## Git Dependencies\n\nWhile it is recommended to use the Hex packages for the\n[API](https://hex.pm/packages/opentelemetry_api),\n[SDK](https://hex.pm/packages/opentelemetry) and [OTLP\nexporter](https://hex.pm/packages/opentelemetry_exporter), there are times\ndepending on the git repo is necessary. Because the OpenTelemetry OTP\nApplications are kept in a single repository, under the directory `apps`, either\n[rebar3's](https://rebar3.org) `git_subdir` (rebar 3.14 or above is required) or\n[mix's](https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html)\n`sparse` feature must be used when using these as Git dependencies in a project. The\nblocks below show how the git repo for the API and/or SDK\nApplications can be used in rebar3 and mix.\n\n``` erlang\n{opentelemetry_api, {git_subdir, \"http://github.com/open-telemetry/opentelemetry-erlang\", {branch, \"main\"}, \"apps/opentelemetry_api\"}},\n{opentelemetry, {git_subdir, \"http://github.com/open-telemetry/opentelemetry-erlang\", {branch, \"main\"},\n\"apps/opentelemetry\"}},\n{opentelemetry_exporter, {git_subdir, \"http://github.com/open-telemetry/opentelemetry-erlang\", {branch, \"main\"}, \"apps/opentelemetry_exporter\"}}\n```\n\n``` elixir\n{:opentelemetry_api, github: \"open-telemetry/opentelemetry-erlang\", sparse:\n\"apps/opentelemetry_api\", override: true},\n{:opentelemetry, github: \"open-telemetry/opentelemetry-erlang\", sparse:\n\"apps/opentelemetry\", override: true},\n{:opentelemetry_exporter, github: \"open-telemetry/opentelemetry-erlang\", sparse: \"apps/opentelemetry_exporter\", override: true}\n```\n\nThe `override: true` is required because the SDK Application, `opentelemetry`, has\nthe API in its `deps` list of its `rebar.config` as a Hex dependency and this will\nclash when `mix` tries to resolve the dependencies and fail without the\noverride. `override: true` is also used on the SDK because the\n`opentelemetry_exporter` application depends on it and the API as Hex deps so if\nit is included the override is necessary.\n\n## Benchmarks\n\nRunning benchmarks is done with [benchee](https://github.com/bencheeorg/benchee). Benchmark functions are stored in modules, under `samples/`. To run them, open a rebar3 shell in the `bench` profile:\n\n``` shell\n$ rebar3 as bench shell\n\n\u003e otel_benchmarks:run().\n```\n\nIf an Elixir script is wanted for the benchmarks they could be run (after\nrunning `rebar3 as bench compile`) as follows:\n\n``` shell\n$ ERL_AFLAGS=\"-pa ./_build/bench/extras/samples/\" ERL_LIBS=_build/bench/lib/ mix run --no-mix-exs samples/run.exs\n```\n\n## W3C Trace Context Interop Tests\n\nStart the interop web server in a shell:\n\n``` shell\n$ rebar3 as interop shell\n\n\u003e w3c_trace_context_interop:start().\n```\n\nThen, clone the [W3C Trace Context repo](https://github.com/w3c/trace-context) and run the tests:\n\n``` shell\n$ cd test\n$ python3 test.py http://127.0.0.1:5000/test\n```\n\n## Contributing\n\nApprovers ([@open-telemetry/erlang-approvers](https://github.com/orgs/open-telemetry/teams/erlang-approvers)):\n\n- [Tristan Sloughter](https://github.com/tsloughter), [Splunk](https://www.splunk.com/en_us/observability/apm-application-performance-monitoring.html)\n- [Bryan Naegele](https://github.com/bryannaegele), [Simplebet](https://simplebet.io/)\n- [Greg Mefford](https://github.com/GregMefford), [STORD](https://www.stord.com/)\n- [Fred Hebert](https://github.com/ferd), [Honeycomb](https://www.honeycomb.io/)\n- [Łukasz Jan Niemier](https://github.com/hauleth)\n- [Iliia Khaprov](https://github.com/deadtrickster), [VMWare](https://www.vmware.com/)\n\n*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*\n\nMaintainers ([@open-telemetry/erlang-maintainers](https://github.com/orgs/open-telemetry/teams/erlang-maintainers)):\n\n- [Tristan Sloughter](https://github.com/tsloughter), [Splunk](https://www.splunk.com/en_us/observability/apm-application-performance-monitoring.html)\n- [Bryan Naegele](https://github.com/bryannaegele), [Simplebet](https://simplebet.io/)\n- [Łukasz Jan Niemier](https://github.com/hauleth)\n- [Iliia Khaprov](https://github.com/deadtrickster), [VMWare](https://www.vmware.com/)\n\n*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*\n\n### Thanks to all the people who have contributed\n\n[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-erlang)](https://github.com/open-telemetry/opentelemetry-erlang/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-telemetry%2Fopentelemetry-erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-erlang/lists"}