Introduction to OpenTelemetry with Flask

Ashish Tiwari (~ashish187)





OpenTelemetry (OTel) is a comprehensive suite of APIs, libraries, and tools designed to collect, generate, and export telemetry data, including metrics, logs, and traces, from software applications. This talk will cover critical concepts related to OTel and show you how to integrate it into your Flask/Django app. 

Details of the talk

What is OTel

OpenTelemetry (OTel) is an observability framework for cloud-native software. It provides standardized APIs, libraries, and tools to collect telemetry data such as metrics, logs, and traces. OTel is open source and vendor neutral, designed to work with any backend system.

I'll also present several examples demonstrating why logs alone may be insufficient, along with the benefits of incorporating extra signals. These benefits include enhanced visibility into the execution flow and call timing, metrics on how users utilize services to pinpoint unnecessary ones, and the ability to detect patterns, such as peak usage times, which aids in production planning and scaling.

I’ll also dive into each signal type: 

  • Metrics

  • Logs

  • Traces - I’ll pay particular attention to spans with in traces which is a common pitiful 


OTel enables comprehensive monitoring across services and platforms. It is a platform agnostic tool that is designed to be future proof. Additionally, it standardizes telemetry data collection, making integrating with various tools and platforms easier.

How to use it with Flask

I’ll show a Flaskexample that I run locally to show what types of information OTel provides you with

How to integrate it with Backends like Elastic

I’ll outline what configuration is needed to work with Elastic. I’ll also discuss the OpenTelemetry API Bridge.

State of adoption - is everything stable?

I’ll briefly talk about how OTel is a work in progress, and more functionality is being added


Having python and flask knowledge will be helpful.

Speaker Info:

Ashish started his career in the email and software industry, working as a software engineer. He has a strong interest in technology and now serves as a DevRel Engineer at Elastic. In this role, he is committed to providing the community with innovative solutions using the Elastic stack. Ashish is also a former co-founder of a startup, where he acquired a wide range of skills in tech, marketing, and community engagement. His enthusiasm is especially strong in the areas of coding and technology experimentation. Recently, he has delved into exploring Generative AI.

Speaker Links:

Section: Core Python
Type: Talk
Target Audience: Intermediate
Last Updated: