All Projects → geometerio → geometrics

geometerio / geometrics

Licence: MIT license
An opinionated library and set of guides for adding application tracing and metrics to a Phoenix application

Programming Languages

elixir
2628 projects
shell
77523 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to geometrics

open-telemetry-java-guides
Java OpenTelemetry 测试指南 :Open-Telemetry-Java-Guides 案例,用于测试常用中间件支持及 Otel 相关组件的使用情况。 可观察性Sig: https://i.cloudnative.to/observability/
Stars: ✭ 67 (+294.12%)
Mutual labels:  observability, opentelemetry
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (+16117.65%)
Mutual labels:  observability, opentelemetry
trouble-training
FullStack DDD/CQRS with GraphQL workshop including distributed tracing and monitoring. This shows the configuration from React frontend to .Net backend.
Stars: ✭ 271 (+1494.12%)
Mutual labels:  observability, opentelemetry
aws-otel-lambda
AWS Distro for OpenTelemetry - AWS Lambda
Stars: ✭ 94 (+452.94%)
Mutual labels:  observability, opentelemetry
aws-otel-java-instrumentation
AWS Distro for OpenTelemetry Java Instrumentation Library
Stars: ✭ 41 (+141.18%)
Mutual labels:  observability, opentelemetry
opentelemetry-js-api
OpenTelemetry Javascript API
Stars: ✭ 75 (+341.18%)
Mutual labels:  observability, opentelemetry
gateway
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (+452.94%)
Mutual labels:  observability, opentelemetry
aws-o11y-recipes
recipes for observability solutions at AWS
Stars: ✭ 110 (+547.06%)
Mutual labels:  observability, opentelemetry
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+2470.59%)
Mutual labels:  observability, opentelemetry
uptrace
Open source APM: OpenTelemetry traces, metrics, and logs
Stars: ✭ 1,187 (+6882.35%)
Mutual labels:  observability, opentelemetry
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+1505.88%)
Mutual labels:  observability, opentelemetry
approzium
Approzium allows a cloud service to authenticate to a database without ever having access to its password
Stars: ✭ 54 (+217.65%)
Mutual labels:  observability
sqlmetrics
Prometheus metrics for Go database/sql via VictoriaMetrics/metrics
Stars: ✭ 21 (+23.53%)
Mutual labels:  observability
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+2541.18%)
Mutual labels:  observability
beefheart
A tool to index Fastly realtime analytics metrics into Elasticsearch.
Stars: ✭ 14 (-17.65%)
Mutual labels:  observability
playbook
Este repositório é um guia simples para aprendizado de alguns conceitos e tecnologias usadas com Containers, Orquestração e Observabilidade.
Stars: ✭ 58 (+241.18%)
Mutual labels:  observability
http4s-tracer
📊 End-to-end tracing system for Http4s
Stars: ✭ 112 (+558.82%)
Mutual labels:  tracing-applications
slab
An extensible Scala framework for creating monitoring dashboards.
Stars: ✭ 23 (+35.29%)
Mutual labels:  observability
observatorium
This repository contains the deployment configurations for the Observatorium instances
Stars: ✭ 129 (+658.82%)
Mutual labels:  observability
k8stream
Processing kubenetes events stream
Stars: ✭ 32 (+88.24%)
Mutual labels:  observability

Geometrics

An opinionated library for adding application tracing and metrics to a Phoenix application. Geometrics includes dependencies which hook into Phoenix and Ecto telemetry, adding support for LiveView as well as crash tracking.

This repo also contains informative guides to help you wrap your head around Application tracing concepts which can be notoriously confusing, especially in Elixir and Erlang. It is worth reading these before diving in.

Basic Usage

Given this simple LiveView module in a Phoenix application:

defmodule GeometerTracingDemosWeb.PageLive do
  use GeometerTracingDemosWeb, :live_view

  alias GeometerTracingDemos.Repo
  alias GeometerTracingDemos.SomeModel

  require OpenTelemetry.Tracer

  @impl true
  def mount(_params, _session, socket) do
    ...
  end

  @impl true
  def handle_event("create", %{"some_model" => form_attrs}, socket) do
    # This is an example of adding a custom span to your application. All of the other application traces in the image
    # below come by default after installing Geometrics without any other changes to source code.
    OpenTelemetry.Tracer.with_span "My custom span" do
      %SomeModel{}
      |> SomeModel.changeset(form_attrs)
      |> Repo.insert()
    end

    {:noreply, socket}
  end
end

You can see an application trace that extends throughout an entire live view session.

Honeycomb Trace Exmample

(Note that the trace shown here is from the Honeycomb.io UI, but should carry over to any Application tracing service)

Why does this library exists?

  1. To distill knowledge gleaned from dissecting the somewhat overwhelming OpenTelemetry/observability ecosystem into an easily consumed set of guides.
  2. To provide Phoenix LiveView observability, which has not yet been included into OpenTelemetry the way that Phoenix and Ecto have.
  3. To generally make it easier to get started with observing your Phoenix application

Installation

Installation guide.

Running the OpenTelemetry collector

In order to actually report data to Honeycomb (or other services), you will need to run an OpenTelemetry collector. This component is responsible for receiving, processing and exporting OpenTelemetry data to external services.

To do this you will need to run an installation script (note that you will need to set HONEYCOMB_DATASET and HONEYCOMB_WRITE_KEY in your environment before running this command):

mix geometrics.install

This will copy a docker-compose.yml file used to run the collector into your projects top level directory. It will also copy over a configuration file, otel-collector-config.yml, used to configure the collector Docker process.

To run the collector, simply run docker compose up. You should now see metrics data appear in Honeycomb under the dataset configured by HONEYCOMB_DATASET.

Reporting to other third-party tracing services:

By default the otel-collector-config.yml and docker-compose.yml also spin up a local instance of Jaeger (running on http://localhost:16686/) and Zipkin (running on http://127.0.0.1:9411/) that will both also receive the same trace data. If you'd prefer not to send your trace data over the network to Honeycomb (or any other API), you can use these locally running tracing services instead.

References

For further reading, see the guides.

External references:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].