Tracking Elixir Applications Using Telemetry and Metrics - Bartosz Górka - Elixir Meetup #4


At Elixir Meetup #4, Bartosz Górka delivered an informative session on tracking Elixir apps using Telemetry and Metrics. He shared his insights on implementing Telemetry, capturing meaningful metrics.
About Bartosz Górka
Bartosz Górka is a seasoned software engineer dedicated to solving complex problems and helping businesses thrive with well-built software. He authors a blog that covers topics related to Elixir, productivity, and team management.
The Importance of Metrics
Why Metrics Matter
Bartosz emphasized the significance of metrics in software development. Metrics provide visibility into application performance, helping teams identify bottlenecks, troubleshoot issues, and make data-driven decisions.
Key Points:
- Visibility: Gain insights into application behavior and performance.
- Troubleshooting: Identify and resolve issues quickly.
- Data-Driven Decisions: Make informed decisions based on real data.
Setting Up Telemetry
Introduction to Telemetry
Telemetry is a simple yet powerful library that provides a standardized interface to capture and handle metrics from monitored events in Elixir applications.
Key Features:
- Event-Based: Capture events occurring within the system.
- Standardized Interface: Consistent approach to handling metrics.
- Flexible Integration: Integrate with various tools and libraries.
Implementing Telemetry
Step-by-Step Guide
Bartosz walked through the process of implementing Telemetry in an Elixir application. He covered the basics of setting up Telemetry, creating custom events, and handling these events effectively.
Steps:
- Add Dependency: Add Telemetry as a dependency in your Elixir project.
- Create Events: Define custom events to capture relevant metrics.
- Handle Events: Use handlers to process and store event data.
Capturing Metrics
Key Metrics to Track
Bartosz highlighted essential metrics that should be tracked to ensure optimal application performance. He discussed various types of metrics, including counters, summaries, and histograms, and their importance in monitoring different aspects of the application.
Key Metrics:
- Counters: Track the number of occurrences of an event.
- Summaries: Aggregate data over time to observe trends.
- Histograms: Measure the distribution of values over time.
Practical Examples
Real-World Applications
Bartosz provided practical examples of how to implement Telemetry and capture metrics in real-world scenarios. He demonstrated how to track database queries, HTTP requests, and custom business events.
Example Scenarios:
- Database Queries: Measure query performance and identify slow queries.
- HTTP Requests: Monitor request durations and response statuses.
- Business Events: Track specific business-related metrics.
Integrating with Monitoring Tools
Using Grafana and Prometheus
Bartosz explained how to integrate Telemetry with popular monitoring tools like Grafana and Prometheus. He showed how to visualize metrics in Grafana dashboards and set up alerts to notify teams of potential issues.
Integration Steps:
- Set Up Prometheus: Configure Prometheus to scrape metrics from your application.
- Visualize in Grafana: Create dashboards in Grafana to visualize the metrics.
- Set Up Alerts: Configure alerts to monitor critical metrics and notify the team.
Best Practices
Tips for Effective Monitoring
Bartosz shared best practices for effective monitoring and metrics management. He emphasized the importance of regular reviews, setting actionable alerts, and continuously improving the monitoring setup.
Best Practices:
- Regular Reviews: Periodically review metrics and dashboards.
- Actionable Alerts: Set alerts that provide clear and actionable information.
- Continuous Improvement: Continuously refine and enhance the monitoring setup.
Conclusion
Bartosz Górka’s presentation at Elixir Meetup #4 provided valuable insights into tracking Elixir applications using Telemetry and Metrics. By implementing the strategies discussed, developers can enhance their applications' performance, reliability, and overall user experience.
Join the Community
Ready to improve your Elixir application's performance with Telemetry and Metrics?
Register for the next Elixir Meetup at Curiosum Meetups: Registration Join our community of Elixir enthusiasts at Elixir LinkedIn Group Prefer watching the presentation? Here’s the video
Want to power your product with Elixir? We’ve got you covered.
Related posts
Dive deeper into this topic with these related posts
You might also like
Discover more content from this category
With so much of our life going online now, it's more important than ever to understand cybersecurity - what it is, why it is crucial, and how we can protect ourselves from cyber threats. In this post, I will introduce you to the world of cybersecurity and tell you how Elixir programming language works in this environment.
Read in-depth session on mastering Phoenix LiveView by understanding three critical levels of development. He provided practical insights and demonstrated how to navigate each level effectively to build robust and maintainable web applications.
Why did we decide to organize Elixir Meetups by Curiosum? We realized there was a lack of live Elixir events in our area. Moreover, it turned out that there are only a few of them in the whole of Europe. So we thought... Why not? Let's do this!



