{"id":15282720,"url":"https://github.com/geometerio/geometrics","last_synced_at":"2025-07-19T02:05:05.131Z","repository":{"id":44672695,"uuid":"342021056","full_name":"geometerio/geometrics","owner":"geometerio","description":"An opinionated library and set of guides for adding application tracing and metrics to a Phoenix application","archived":false,"fork":false,"pushed_at":"2022-11-08T21:38:47.000Z","size":1824,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-23T10:17:06.247Z","etag":null,"topics":["elixir","observability","opentelemetry","tracing-applications"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/geometrics","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geometerio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-24T20:04:01.000Z","updated_at":"2024-05-18T01:46:48.000Z","dependencies_parsed_at":"2023-01-21T13:45:40.033Z","dependency_job_id":null,"html_url":"https://github.com/geometerio/geometrics","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/geometerio/geometrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometerio%2Fgeometrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometerio%2Fgeometrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometerio%2Fgeometrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometerio%2Fgeometrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geometerio","download_url":"https://codeload.github.com/geometerio/geometrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometerio%2Fgeometrics/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265872395,"owners_count":23842169,"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":["elixir","observability","opentelemetry","tracing-applications"],"created_at":"2024-09-30T14:37:03.859Z","updated_at":"2025-07-19T02:05:04.810Z","avatar_url":"https://github.com/geometerio.png","language":"Elixir","readme":"# Geometrics\n\nAn opinionated library for adding application tracing and metrics to a Phoenix application. Geometrics includes\ndependencies which hook into Phoenix and Ecto [telemetry](https://hexdocs.pm/phoenix/telemetry.html), adding support for\nLiveView as well as crash tracking.\n\nThis repo also contains informative [guides](https://hexdocs.pm/geometrics) to help you wrap your head around\nApplication tracing concepts which can be notoriously confusing, especially in Elixir and Erlang. It is worth reading\nthese before diving in.\n\n## Basic Usage\n\nGiven this simple LiveView module in a Phoenix application:\n\n```elixir\ndefmodule GeometerTracingDemosWeb.PageLive do\n  use GeometerTracingDemosWeb, :live_view\n\n  alias GeometerTracingDemos.Repo\n  alias GeometerTracingDemos.SomeModel\n\n  require OpenTelemetry.Tracer\n\n  @impl true\n  def mount(_params, _session, socket) do\n    ...\n  end\n\n  @impl true\n  def handle_event(\"create\", %{\"some_model\" =\u003e form_attrs}, socket) do\n    # This is an example of adding a custom span to your application. All of the other application traces in the image\n    # below come by default after installing Geometrics without any other changes to source code.\n    OpenTelemetry.Tracer.with_span \"My custom span\" do\n      %SomeModel{}\n      |\u003e SomeModel.changeset(form_attrs)\n      |\u003e Repo.insert()\n    end\n\n    {:noreply, socket}\n  end\nend\n```\n\nYou can see an application trace that extends throughout an entire live view session.\n\n![Honeycomb Trace Exmample](guides/assets/honeycomb_trace_example.png)\n\n(Note that the trace shown here is from the [Honeycomb.io](https://www.honeycomb.io/) UI, but should carry over to any\nApplication tracing service)\n\n## Why does this library exists?\n\n1. To distill knowledge gleaned from dissecting the somewhat overwhelming OpenTelemetry/observability ecosystem into an\n   easily consumed set of [guides](https://hexdocs.pm/geometrics).\n2. To provide Phoenix LiveView observability, which has not yet been included into OpenTelemetry the way\n   that [Phoenix](https://github.com/opentelemetry-beam/opentelemetry_phoenix)\n   and [Ecto](https://github.com/opentelemetry-beam/opentelemetry_ecto) have.\n3. To generally make it easier to get started with observing your Phoenix application\n\n## Installation\n\n[Installation guide](https://hexdocs.pm/geometrics/installation.html).\n\n## References\n\nFor further reading, see [the guides](https://hexdocs.pm/geometrics).\n\nExternal references:\n\n- https://opentelemetry.io/docs/concepts/what-is-opentelemetry/\n- https://opentelemetry.io/docs/erlang/getting-started/\n- https://github.com/open-telemetry/opentelemetry-specification\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeometerio%2Fgeometrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeometerio%2Fgeometrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeometerio%2Fgeometrics/lists"}