Instrumenting Python: build a full telemetry pipeline with OpenTelemetry, Prometheus and Grafana

Thursday, May 23

11:00 - 13:05
Audience levelIntermediate
Seats left
    Elevator pitch

    In this workshop we will take a simple Python application and instrument it via the Open Telemetry SDK, then proceed to build a full pipeline to deliver metrics to a Prometheus instance. We’ll wrap up by setting up a Grafana instance and use it to visualise and alert on the ingested data.


    OpenTelemetry a CNCF Foundation project for telemetry: metrics, traces and logs. It focuses on instrumenting applications and shipping emitted telemetry in a vendor AND language agnostic way, to a multitude of compatible backends (Honeycomb, Grafana Stack, Datadog…) without having to juggle different SDKs or Agents specific to single vendors. Despite it recency, it has enjoyed rapid rise in adoption across the industry, and we’ve been running OTEL as the core of our Observability stack at my company for slightly over a year.

    Starting with a quick overview of the core concepts around OpenTelemetry and how telemetry is shipped, the aim of the workshop is to build a monitoring pipeline for a Python application, end to end.

    We will instrument the application via the official SDK to emit custom metrics, then move to configure and deploy the OpenTelemetry Collector component to receive, parse and ship metrics to Prometheus, and finish by adding a Grafana instance to display such metrics in helpful dashboards, and alert on given conditions.

    While the focus is on Metrics, OTEL supports Traces and (experimentally) Logs. If time and interest permit, we can extend our code to support Trace shipping to a backend such as Tempo or Jaeger.

    The workshop is aimed for a Intermediate audience: there will be a intro to OTEL concepts and no previous experience with the project is expected, buta baseline understanding of monitoring concepts and the different type of telemetry available is suggested for people to be able to extract the maximum value. Docker knowledge is also suggested, as the workshop material will leverage Docker and docker-compose to allow a local build. People will be free to follow along on their Cloud account of choice, if so they prefer.

    TagsPerformance, Infrastructure, Operations, DevOps

    Lorenzo Turrino

    Starting my career in tech almost 8 years ago as a Python developer building website in Django, I’ve since moved my professional focus and career to Cloud and DevOps automation, working with GCP, AWS, and the usual plethora of tools that is required to build, monitor and maintain modern cloud-based Platforms. I’m currently Lead DevOps Engineer at Thirdfort, a UK-based FinTech startup building a anti-money laundering and anti-fraud platform.

    I’ve attended my first Pycon Italia in 2017 when I was still a junior developer not even a year in his first job, and it was a blast. I’ve since come back each edition, loving the opportunity to keep up to speed with Python and the community in my home country!