SlideShare a Scribd company logo
@pacodelacruz
Paco de la Cruz @ Melbourne AU
Custom Distributed Tracing &
Observability Practices in Azure Functions
Global
Integration
Bootcamp
2021
@pacodelacruz
@pacodelacruz
@pacodelacruz
linkedin.com/in/pacodelacruz
pacodelacruz.io
slideshare.net/pacodelac/presentations
github.com/pacodelacruz
@pacodelacruz
Introduction
Scenario
Common operation requirements
Tracing design: spans, key-value pairs
Solution design: sequence diagram, components
Demo
Q & A
Agenda
@pacodelacruz
Devs tend to focus on building and shipping services
The solution in production
becomes someone else’s problem
Distributed systems will fail
We need to give Ops teams
the means to troubleshooting
Particularly relevant with backend services
running in the background
Introduction – Why are we talking about this?
@pacodelacruz
Scenario - Participants
Webhook pushing
user update events
(batch)
Publisher
Azure Function
Subscriber
Azure Function
Service Bus
Queue
Target
System
Publish–Subscribe solution of user update events
from a HR system via a webhook (batch of events)
to a bespoke target system that can’t receive webhook calls
Integration layer with temporal decoupling via a queue
@pacodelacruz
Opinionated approach
Based on many years of experience
Publish-Subscribe pattern
Splitter pattern
Approach could be tailored
Scenario - Notes
@pacodelacruz
Scenario – Sequence Diagram
@pacodelacruz
@pacodelacruz
Scenario – Sequence Diagram
@pacodelacruz
@pacodelacruz
Scenario – Sequence Diagram
@pacodelacruz
@pacodelacruz
Common Operations Requirements
Requirement Potential Solution
Ability to inspect incoming request payloads for
troubleshooting purposes.
Archive all request payloads as received.
Ability to correlate individual messages to the
original batch and understand whether all messages
in a batch were processed successfully.
Capture a batch record count and a batch identifier in all tracing events
for individual messages.
Ability to correlate all tracing events for every
individual message.
Capture a tracing correlation identifier in all tracing events for every
message.
Being able to find tracing events for a particular
message.
Capture business-related metadata in all relevant tracing logs, including
an interface identifier, message type, and an entity identifier.
Receive alerts when certain failures occur. Capture granular tracing event identifiers and tracing event statuses.
Ability to differentiate transient failures. Capture a delivery count when messages are being retried to identify
whether additional attempts are expected.
Ability to query, filter, and troubleshoot what
happens to individual messages.
Enable correlation of tracing events with standard tracing checkpoints,
granular event identifiers, status, and business-related metadata.
@pacodelacruz
Tracing Spans
“The span is the primary building block of a distributed trace, representing an individual unit of
work done in a distributed system. Each component of the distributed system contributes a span -
a named, timed operation representing a piece of the workflow.” - opentracing.io
@pacodelacruz
Structured Logging Key-Value Pairs
Key Description Scope
BatchId Batch identifier to correlate individual messages to the original batch. It is highly recommended when using the splitter
pattern.
Cross-span
CorrelationId Tracing correlation identifier of an individual message. Cross-span
EntityType Business identifier of the message type being processed. This allows to filter or query tracing events for a particular entity
type. E.g. UserEvent, PurchaseOrder, Invoice, etc.
Cross-span
EntityId Business identifier of the entity in the message. This together with the EntityType key-value pair allow to filter or query
tracing events for messages related to a particular entity. E.g. UserId, PurchaseOrderNumber, InvoiceNumber, etc.
Cross-span
InterfaceId Business identifier of the interface. This allows to filter or query tracing events for a particular interface. Useful when an
organisation defines identifiers for their integration interfaces.
Span
RecordCount Optional. Only applicable to batch events. Captures the number of individual messages or records that are present in the
batch.
Span
DeliveryCount Optional. Only applicable to subscriber events of individual messages. Captures the number of times the message has
been attempted to be delivered. It relies on the Service Bus message DeliveryCount property.
Span
LogLevel LogLevel as defined by Microsoft.Extensions.Logging Log
SpanCheckpoint Defines the tracing span and whether it is the start or finish of it, e.g. PublisherStart or PublisherFinish. Having standard
checkpoints allows correlating tracing events in a standard way.
Log
EventId Captures a specific tracing event that helps to query, analyse, and troubleshoot the solution with granularity. Log
Status Stores the status of the tracing event, e.g., succeeded or failed Log
@pacodelacruz
Solution Components
Application Insights
Tracing Logs
Blob Storage
Archive
Webhook pushing
user update events
(batch)
Publisher
Azure Function
Subscriber
Azure Function
Service Bus
Queue
Target
System
@pacodelacruz
Publisher Interface Sequence
@pacodelacruz
@pacodelacruz
Publisher Interface Sequence
@pacodelacruz
@pacodelacruz
Publisher Interface Sequence
@pacodelacruz
@pacodelacruz
Publisher Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Subscriber Interface Sequence
@pacodelacruz
@pacodelacruz
Questions so far?
Global
Integration
Bootcamp
2021
@pacodelacruz
Code walkthrough
Components overview
Call the publisher function
Monitor the solution
Query the traces
Demo
github.com/pacodelacruz/
observability-pubsub-functions
@pacodelacruz
Costs associated with Application Insights
(ingestion & retention)
Tracing data can be client-side sampled or filtered
Traces can be server-side sampled or throttled
(max req/s & daily cap)
Telemetry channel is async & best-efforts
(Traces could be lost: app crashes, network issues, etc.)
This approach must not be used for
auditing or billing purposes
Considerations
@pacodelacruz
Q & A
Global
Integration
Bootcamp
2021
@pacodelacruz
Additional Resources
Intro https://platform.deloitte.com.au/articles/
distributed-tracing-and-observability-with-azure-functions-1-intro
Design https://platform.deloitte.com.au/articles/
distributed-tracing-and-observability-with-azure-functions-2-design
Implementation https://platform.deloitte.com.au/articles/
distributed-tracing-and-observability-with-azure-functions-3-
implementation
Repo github.com/pacodelacruz/observability-pubsub-functions
@pacodelacruz
@pacodelacruz
linkedin.com/in/pacodelacruz
pacodelacruz.io
slideshare.net/pacodelac/presentations
github.com/pacodelacruz
@pacodelacruz
:)
Global
Integration
Bootcamp
2021

More Related Content

What's hot (20)

PPTX
When IoT meets Serverless - from design to production and monitoring
Alex Pshul
 
PPTX
A guide through the Azure Messaging services - Update Conference
Eldert Grootenboer
 
PDF
Building event-driven (Micro)Services with Apache Kafka
Guido Schmutz
 
PDF
Kafka as an Event Store - is it Good Enough?
Guido Schmutz
 
PPTX
From on premises monolith to cloud microservices
Albert Lombarte
 
PDF
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Guido Schmutz
 
PDF
Architecting Microservices Applications with Instant Analytics
confluent
 
PDF
Microservices with Kafka Ecosystem
Guido Schmutz
 
PDF
Ingesting streaming data into Graph Database
Guido Schmutz
 
PDF
Overview of Zookeeper, Helix and Kafka (Oakjug)
Chris Richardson
 
PDF
Building Event-Driven (Micro) Services with Apache Kafka
Guido Schmutz
 
PDF
Streaming Visualization
Guido Schmutz
 
PDF
Microservices with Kafka Ecosystem
Guido Schmutz
 
PDF
Jay Kreps | Kafka Summit NYC 2019 Keynote (Events Everywhere) | CEO, Confluent
confluent
 
PDF
Introduction to Stream Processing
Guido Schmutz
 
PDF
Apache Kafka Scalable Message Processing and more!
Guido Schmutz
 
PPTX
Dapr: the glue to your microservices
Moaid Hathot
 
PPTX
Dapr: distributed application runtime
Moaid Hathot
 
PDF
Building event-driven (Micro)Services with Apache Kafka
Guido Schmutz
 
PDF
Spark (Structured) Streaming vs. Kafka Streams
Guido Schmutz
 
When IoT meets Serverless - from design to production and monitoring
Alex Pshul
 
A guide through the Azure Messaging services - Update Conference
Eldert Grootenboer
 
Building event-driven (Micro)Services with Apache Kafka
Guido Schmutz
 
Kafka as an Event Store - is it Good Enough?
Guido Schmutz
 
From on premises monolith to cloud microservices
Albert Lombarte
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Guido Schmutz
 
Architecting Microservices Applications with Instant Analytics
confluent
 
Microservices with Kafka Ecosystem
Guido Schmutz
 
Ingesting streaming data into Graph Database
Guido Schmutz
 
Overview of Zookeeper, Helix and Kafka (Oakjug)
Chris Richardson
 
Building Event-Driven (Micro) Services with Apache Kafka
Guido Schmutz
 
Streaming Visualization
Guido Schmutz
 
Microservices with Kafka Ecosystem
Guido Schmutz
 
Jay Kreps | Kafka Summit NYC 2019 Keynote (Events Everywhere) | CEO, Confluent
confluent
 
Introduction to Stream Processing
Guido Schmutz
 
Apache Kafka Scalable Message Processing and more!
Guido Schmutz
 
Dapr: the glue to your microservices
Moaid Hathot
 
Dapr: distributed application runtime
Moaid Hathot
 
Building event-driven (Micro)Services with Apache Kafka
Guido Schmutz
 
Spark (Structured) Streaming vs. Kafka Streams
Guido Schmutz
 

Similar to Custom Distributed Tracing in Azure Functions (2021-02-27) (20)

PDF
WSO2 Complex Event Processor - Product Overview
WSO2
 
PDF
Exploiting Web Technologies to connect business process management and engine...
Stefano Costanzo
 
PDF
Practical operability techniques for teams - Matthew Skelton - Agile in the C...
Skelton Thatcher Consulting Ltd
 
PPTX
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
WSO2
 
PPT
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 
PDF
Distributed Tracing with Jaeger
Inho Kang
 
ODP
Drools & jBPM Info Sheet
Mark Proctor
 
PDF
Observability for Integration Using WSO2 Enterprise Integrator
WSO2
 
PDF
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
QAware GmbH
 
PDF
Opentracing 101
HungWei Chiu
 
PPTX
Developing Actors in Azure with .net
Marco Parenzan
 
PPT
Multi-tenancy with Rails
Paul Gallagher
 
PPTX
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
João Pedro Martins
 
PPTX
RavenDB overview
Igor Moochnick
 
PPT
The Magic Of Application Lifecycle Management In Vs Public
David Solivan
 
PPTX
INTERNET OF THINGS & AZURE
DotNetCampus
 
PDF
Nt1310 Unit 3 Language Analysis
Nicole Gomez
 
PPT
Enterprise Library 2.0
Raju Permandla
 
PPTX
Evolutionary Systems - Kafka Microservices
Stefano Rocco
 
PPTX
Evolution of netflix conductor
vedu12
 
WSO2 Complex Event Processor - Product Overview
WSO2
 
Exploiting Web Technologies to connect business process management and engine...
Stefano Costanzo
 
Practical operability techniques for teams - Matthew Skelton - Agile in the C...
Skelton Thatcher Consulting Ltd
 
Data to Insight in a Flash: Introduction to Real-Time Analytics with WSO2 Com...
WSO2
 
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 
Distributed Tracing with Jaeger
Inho Kang
 
Drools & jBPM Info Sheet
Mark Proctor
 
Observability for Integration Using WSO2 Enterprise Integrator
WSO2
 
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
QAware GmbH
 
Opentracing 101
HungWei Chiu
 
Developing Actors in Azure with .net
Marco Parenzan
 
Multi-tenancy with Rails
Paul Gallagher
 
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
João Pedro Martins
 
RavenDB overview
Igor Moochnick
 
The Magic Of Application Lifecycle Management In Vs Public
David Solivan
 
INTERNET OF THINGS & AZURE
DotNetCampus
 
Nt1310 Unit 3 Language Analysis
Nicole Gomez
 
Enterprise Library 2.0
Raju Permandla
 
Evolutionary Systems - Kafka Microservices
Stefano Rocco
 
Evolution of netflix conductor
vedu12
 
Ad

More from Paco de la Cruz (15)

PDF
Harnessing GenAI in APIs the Good the Bad and the Ugly
Paco de la Cruz
 
PDF
Extending your Azure Integration Solutions with Open AI - Logic App Aviators
Paco de la Cruz
 
PDF
Extending your Azure Integration Services Solutions with Open AI
Paco de la Cruz
 
PDF
Mi experiencia en AU IT.pdf
Paco de la Cruz
 
PDF
Durable functions 2.0 (2019-10-10)
Paco de la Cruz
 
PDF
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Paco de la Cruz
 
PDF
Azure Durable Functions (2019-04-27)
Paco de la Cruz
 
PDF
Azure Durable Functions (2019-03-30)
Paco de la Cruz
 
PDF
Azure Durable Functions (2018-06-13)
Paco de la Cruz
 
PDF
Azure Event Grid Lighting Talk (2017-10-05)
Paco de la Cruz
 
PDF
Building Serverless Event-Driven Apps with Azure Event Grid (2017-09-21)
Paco de la Cruz
 
PDF
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Paco de la Cruz
 
PDF
Microsoft Azure iPaaS Overview and What's New (2018-03-24)
Paco de la Cruz
 
PDF
Building Serverless Integration Solutions with Logic Apps (2017-04-22)
Paco de la Cruz
 
PDF
Love at First Sight with Azure Logic Apps (2017-06-22)
Paco de la Cruz
 
Harnessing GenAI in APIs the Good the Bad and the Ugly
Paco de la Cruz
 
Extending your Azure Integration Solutions with Open AI - Logic App Aviators
Paco de la Cruz
 
Extending your Azure Integration Services Solutions with Open AI
Paco de la Cruz
 
Mi experiencia en AU IT.pdf
Paco de la Cruz
 
Durable functions 2.0 (2019-10-10)
Paco de la Cruz
 
Serverless APIs, the Good, the Bad and the Ugly (2019-09-19)
Paco de la Cruz
 
Azure Durable Functions (2019-04-27)
Paco de la Cruz
 
Azure Durable Functions (2019-03-30)
Paco de la Cruz
 
Azure Durable Functions (2018-06-13)
Paco de la Cruz
 
Azure Event Grid Lighting Talk (2017-10-05)
Paco de la Cruz
 
Building Serverless Event-Driven Apps with Azure Event Grid (2017-09-21)
Paco de la Cruz
 
Logic Apps and Azure Functions for Serverless Integration (2017-03-25)
Paco de la Cruz
 
Microsoft Azure iPaaS Overview and What's New (2018-03-24)
Paco de la Cruz
 
Building Serverless Integration Solutions with Logic Apps (2017-04-22)
Paco de la Cruz
 
Love at First Sight with Azure Logic Apps (2017-06-22)
Paco de la Cruz
 
Ad

Recently uploaded (20)

PPTX
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
PPTX
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
PPT
introductio to computers by arthur janry
RamananMuthukrishnan
 
PPTX
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
PPT
introduction to networking with basics coverage
RamananMuthukrishnan
 
PPTX
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
PPTX
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
PPTX
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PPTX
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
PDF
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PPT
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
PDF
DevOps Design for different deployment options
henrymails
 
PDF
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
PDF
How to Fix Error Code 16 in Adobe Photoshop A Step-by-Step Guide.pdf
Becky Lean
 
PDF
The Power and Impact of Promotion most useful
RajaBilal42
 
PPTX
Presentation on Social Media1111111.pptx
tanamlimbu
 
PDF
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
PPTX
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
introductio to computers by arthur janry
RamananMuthukrishnan
 
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
introduction to networking with basics coverage
RamananMuthukrishnan
 
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
DevOps Design for different deployment options
henrymails
 
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
How to Fix Error Code 16 in Adobe Photoshop A Step-by-Step Guide.pdf
Becky Lean
 
The Power and Impact of Promotion most useful
RajaBilal42
 
Presentation on Social Media1111111.pptx
tanamlimbu
 
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 

Custom Distributed Tracing in Azure Functions (2021-02-27)