Giter VIP home page Giter VIP logo

elixir_opentel_and_grafana's Introduction

Elixir, OpenTelemetry, and the Infamous N+1

This project accompanies the Elixir, OpenTelemetry, and the Infamous N+1 article on Fly.io's Phoenix Files blog.

This dives into the topic of observability and specifically the OpenTelemetry project. It uses Elixir and Erlang OpenTelemetry libraries in a Phoenix LiveView application and shows how to debug troublesome database queries. It also shows how the application can be deployed to Fly.io along with Grafana and Tempo so we can store and query our request traces.

Please refer to the article for explanation of what the different parts are and why they are used.

FlyOtel

The root of the repo is an Elixir Phoenix application called FlyOtel. It is a LiveView application that demonstrates an efficient and N+1 inneficient way to query the database.

Grafana

Grafana is the tool used to visualize the application request traces.

Find the files in the fly_apps/grafana directory. It sets up a Dockerfile image, provides minimal config and can be deployed to Fly.io.

Tempo

Tempo is used to store the trace data that Grafana displays.

Find the files in fly_apps/tempo directory. It sets up a Dockerfile image, provides minimal config and can be deployed to Fly.io.

Local Development/Testing

If you would like to test drive these tools on your own machine, you can use the docker-compose.yml in the local_docker directory and spin up Grafana and Tempo along side your local running instance of the LiveView application.

elixir_opentel_and_grafana's People

Contributors

akoutmos avatar brainlid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sondr3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.