SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Built-in OpenTelemetry support
in Elasticsearch clients
Greg Kalapos
● Works at Elastic since 2018
● Created the Elastic .NET APM Agent
(completely OpenSource)
● Now focuses on OpenTelemetry
https://twitter.com/gregkalapos
Demo
Out of the box, built-in telemetry in
Elasticsearch clients based on
OpenTelemetry
What is OpenTelemetry?
● CNCF Project
● Collection of APIs, SDKs, and tools.
● To instrument, generate, collect, and
export telemetry data
● Metrics, logs, and traces
Signals
● Traces
● Metrics
● Logs
● (Profiling)
API
SDK
Agent / Auto Inst.
SDK
Context
Propagation
Semantic
Conventions
Collector
OTLP
…
Observability Backends
https://opentelemetry.io website:
UBIQUITOUS OBSERVABILITY . . .
imgflip.com
Wos isn des?!
Anatomy of a modern application
public class HomeController
{
public async Task<IActionResult> Index()
{
return View();
}
}
Anatomy of a modern application
public class HomeController : Controller
{
public async Task<IActionResult> Index()
{
return View();
}
}
Frameworks and libraries
public class HomeController : Controller
{
ElasticsearchClient _client = new(CloudId, new ApiKey(ApiKey));
public async Task<IActionResult> Index()
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
var doc = response.Source;
return View(doc);
}
}
Anatomy of a modern application
Frameworks and libraries
public class HomeController : Controller
{
ElasticsearchClient _client = new(CloudId, new ApiKey(ApiKey));
IProducer<string, string> producer = new ProducerBuilder<string, string>(config).Build();
public async Task<IActionResult> Index()
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
var deliveryResult = await producer.ProduceAsync(topic, message);
var doc = response.Source;
return View(doc);
}
}
Anatomy of a modern application
Frameworks and libraries
Observability
Things we want to see
HTTP GET - Index 723 ms
Elasticsearch - Get - my_index 360 ms
Kafka - Send 280 ms
Traces
Logs /
Events
[2023-11-06T15:23:40:152][INFO] HomeController - GET - /index - 200
[2023-11-06T15:23:40:167][INFO] ES Client - GET - my_index - 1
[2023-11-06T15:23:40:167][DEBUG] ES Client - Selected node MyNode-2
[2023-11-06T15:23:40:167][INFO] Kafka - Sending record to topic XYZ
[2023-11-06T15:23:40:167][WARN] Kafka - Failed sending, retrying …
Metrics
How do we get the data?
Instrumentation!
public async Task<IActionResult> Index()
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
var deliveryResult = await producer.ProduceAsync(topic, message);
var doc = response.Source;
return View(doc);
}
How do we get the data?
Instrumentation!
public async Task<IActionResult> Index()
{
using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index"))
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
var deliveryResult = await producer.ProduceAsync(topic, message);
var doc = response.Source;
return View(doc);
}
}
HTTP GET - Index 723 ms
Traces
How do we get the data?
Instrumentation!
public async Task<IActionResult> Index()
{
using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index"))
{
using (var esSpan = tracer.StartActiveSpan("ElasticSearch Get my_index"))
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
}
var deliveryResult = await producer.ProduceAsync(topic, message);
var doc = response.Source;
return View(doc);
}
}
HTTP GET - Index 723 ms
Elasticsearch - Get - my_index 360 ms
Traces
How do we get the data?
Instrumentation!
public async Task<IActionResult> Index()
{
using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index"))
{
using (var esSpan = tracer.StartActiveSpan("ElasticSearch Get my_index"))
{
var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index"));
}
using (var kafkaSpan = tracer.StartActiveSpan("Kafka Send"))
{
var deliveryResult = await producer.ProduceAsync(topic, message);
}
var doc = response.Source;
return View(doc);
}
}
HTTP GET - /index 723 ms
Elasticsearch - Get - my_index 360 ms
Kafka - Send 280 ms
Traces
Photo by Andrea Piacquadio - pexels.com
LET’S DO IT FOR ALL THE
DEPENDENCIES …
… YOU WOULD GET ALL OF THIS FOR FREE
IMAGINE …
imgflip.com
imgflip.com
This is a solved problem!
WAIT !
imgflip.com
YOU’RE RIGHT!
imgflip.com
BUT, …
OTel Language
Team
OTel auto-instrumentation / Agents today
dependency
uses
instruments
Library
Application
Library
Team
Icons by icons8.com
Instrumentation
Module
…
auto-instrumentation / agent
LET ME WRITE THE
LOGS FOR YOU
OTEL DEV
WHAT ?
LIBRARY DEV imgflip.com
uses
OTel auto-instrumentation / Agents today
dependency
instruments
Library
Application
…
Library
Team
OTel Language
Team
Icons by icons8.com
Instrumentation
Module
auto-instrumentation / agent
uses
OTel auto-instrumentation / Agents today
The ownership problem
dependency
instruments
Library
Application
Instrumentation
Module
auto-instrumentation / agent
…
Library
Team
OTel Language
Team
● misplaced expertise ● scalability
Icons by icons8.com
● maintenance ● technical complexity
… OBSERVABILITY WOULD BE TRULY UBIQUITOUS
IMAGINE …
imgflip.com
Photo by Işıl - pexels.com
UBIQUITOUS
OBSERVABILITY
→
BAKED-IN LIBRARY
INSTRUMENTATION
Baked-in Instrumentation
Aligned ownership
dependency
uses
Icons by icons8.com
Application
uses
Library
Baked-in
Instrumentation
Library
Team
OTel Language
Team
SDK / Agent …
auto-instrumentation / agent
API
Our story at Elastic with
Elasticsearch clients
Semantic Conventions
● Common names for different kinds of operations and data.
● Common naming scheme that can be standardized across a
codebase, libraries, and platforms.
● https://opentelemetry.io/docs/concepts/semantic-conventions/
Semantic Conventions
for ElasticSearch
https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/
Demo
● Same setup with Elastic APM
Implementation in specific language clients
● Adding reference to the OpenTelemetry API
● Implement built-in tracing
Implementing built-in tracing
Challenges
● Think from the perspective of the users of the
library
○ Don't over-engineer
● Be careful about span names
○ Pay attention to low cardinality
● Instrumentation always comes with overhead
○ Only instrument relevant code-path
○ Avoid code paths that are being called
excessively
● Do not collect sensitive data (by default)
Implementing built-in tracing
List of PRs
● Semantic Conventions:
https://github.com/open-telemetry/semantic-conventions/
pull/23
● Java:
https://github.com/elastic/elasticsearch-java/pull/588
● .NET:
https://github.com/elastic/elasticsearch-net/pull/6990
● Ruby:
https://github.com/elastic/elasticsearch-ruby/pull/2179
Implementing built-in tracing
List of PRs
● RabbitMQ .NET:
https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1
261
Future of native instrumentation
● Realistically: there will always be a mix of native + external
instrumentation
● OTel registry: https://opentelemetry.io/ecosystem/registry/

Weitere ähnliche Inhalte

Ähnlich wie OSMC 2023 | Built-in OpenTelemetry support in Elasticsearch clients by Greg Kalapos

OpenStack Workshop - WECode Harvard Conference
OpenStack Workshop - WECode Harvard ConferenceOpenStack Workshop - WECode Harvard Conference
OpenStack Workshop - WECode Harvard Conference
Iccha Sethi
 

Ähnlich wie OSMC 2023 | Built-in OpenTelemetry support in Elasticsearch clients by Greg Kalapos (20)

Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
 
OpenStack Workshop - WECode Harvard Conference
OpenStack Workshop - WECode Harvard ConferenceOpenStack Workshop - WECode Harvard Conference
OpenStack Workshop - WECode Harvard Conference
 
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
 
Scalable Open-Source IoT Solutions on Microsoft Azure
Scalable Open-Source IoT Solutions on Microsoft AzureScalable Open-Source IoT Solutions on Microsoft Azure
Scalable Open-Source IoT Solutions on Microsoft Azure
 
Why apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics FrameworksWhy apache Flink is the 4G of Big Data Analytics Frameworks
Why apache Flink is the 4G of Big Data Analytics Frameworks
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without Interference
 
Apache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyApache Flink Adoption at Shopify
Apache Flink Adoption at Shopify
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
 
Web_of_Things_2013
Web_of_Things_2013Web_of_Things_2013
Web_of_Things_2013
 
ThroughTheLookingGlass_EffectiveObservability.pptx
ThroughTheLookingGlass_EffectiveObservability.pptxThroughTheLookingGlass_EffectiveObservability.pptx
ThroughTheLookingGlass_EffectiveObservability.pptx
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
 
Getting Started with Innoslate
Getting Started with InnoslateGetting Started with Innoslate
Getting Started with Innoslate
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
 
UniRx - Reactive Extensions for Unity(EN)
UniRx - Reactive Extensions for Unity(EN)UniRx - Reactive Extensions for Unity(EN)
UniRx - Reactive Extensions for Unity(EN)
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
 
Near real-time anomaly detection at Lyft
Near real-time anomaly detection at LyftNear real-time anomaly detection at Lyft
Near real-time anomaly detection at Lyft
 
C* Summit 2013: Real-time Analytics using Cassandra, Spark and Shark by Evan ...
C* Summit 2013: Real-time Analytics using Cassandra, Spark and Shark by Evan ...C* Summit 2013: Real-time Analytics using Cassandra, Spark and Shark by Evan ...
C* Summit 2013: Real-time Analytics using Cassandra, Spark and Shark by Evan ...
 

Kürzlich hochgeladen

Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
ZurliaSoop
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Hung Le
 

Kürzlich hochgeladen (17)

SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Zone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptxZone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptx
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait Cityin kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
 
Introduction to Artificial intelligence.
Introduction to Artificial intelligence.Introduction to Artificial intelligence.
Introduction to Artificial intelligence.
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
 

OSMC 2023 | Built-in OpenTelemetry support in Elasticsearch clients by Greg Kalapos

  • 1. Built-in OpenTelemetry support in Elasticsearch clients
  • 2. Greg Kalapos ● Works at Elastic since 2018 ● Created the Elastic .NET APM Agent (completely OpenSource) ● Now focuses on OpenTelemetry https://twitter.com/gregkalapos
  • 3. Demo Out of the box, built-in telemetry in Elasticsearch clients based on OpenTelemetry
  • 4. What is OpenTelemetry? ● CNCF Project ● Collection of APIs, SDKs, and tools. ● To instrument, generate, collect, and export telemetry data ● Metrics, logs, and traces
  • 5. Signals ● Traces ● Metrics ● Logs ● (Profiling) API SDK Agent / Auto Inst. SDK Context Propagation Semantic Conventions Collector OTLP … Observability Backends
  • 7. UBIQUITOUS OBSERVABILITY . . . imgflip.com Wos isn des?!
  • 8. Anatomy of a modern application public class HomeController { public async Task<IActionResult> Index() { return View(); } }
  • 9. Anatomy of a modern application public class HomeController : Controller { public async Task<IActionResult> Index() { return View(); } } Frameworks and libraries
  • 10. public class HomeController : Controller { ElasticsearchClient _client = new(CloudId, new ApiKey(ApiKey)); public async Task<IActionResult> Index() { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); var doc = response.Source; return View(doc); } } Anatomy of a modern application Frameworks and libraries
  • 11. public class HomeController : Controller { ElasticsearchClient _client = new(CloudId, new ApiKey(ApiKey)); IProducer<string, string> producer = new ProducerBuilder<string, string>(config).Build(); public async Task<IActionResult> Index() { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); var deliveryResult = await producer.ProduceAsync(topic, message); var doc = response.Source; return View(doc); } } Anatomy of a modern application Frameworks and libraries
  • 12. Observability Things we want to see HTTP GET - Index 723 ms Elasticsearch - Get - my_index 360 ms Kafka - Send 280 ms Traces Logs / Events [2023-11-06T15:23:40:152][INFO] HomeController - GET - /index - 200 [2023-11-06T15:23:40:167][INFO] ES Client - GET - my_index - 1 [2023-11-06T15:23:40:167][DEBUG] ES Client - Selected node MyNode-2 [2023-11-06T15:23:40:167][INFO] Kafka - Sending record to topic XYZ [2023-11-06T15:23:40:167][WARN] Kafka - Failed sending, retrying … Metrics
  • 13. How do we get the data? Instrumentation! public async Task<IActionResult> Index() { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); var deliveryResult = await producer.ProduceAsync(topic, message); var doc = response.Source; return View(doc); }
  • 14. How do we get the data? Instrumentation! public async Task<IActionResult> Index() { using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index")) { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); var deliveryResult = await producer.ProduceAsync(topic, message); var doc = response.Source; return View(doc); } } HTTP GET - Index 723 ms Traces
  • 15. How do we get the data? Instrumentation! public async Task<IActionResult> Index() { using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index")) { using (var esSpan = tracer.StartActiveSpan("ElasticSearch Get my_index")) { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); } var deliveryResult = await producer.ProduceAsync(topic, message); var doc = response.Source; return View(doc); } } HTTP GET - Index 723 ms Elasticsearch - Get - my_index 360 ms Traces
  • 16. How do we get the data? Instrumentation! public async Task<IActionResult> Index() { using (var httpSpan = tracer.StartActiveSpan("HTTP GET Index")) { using (var esSpan = tracer.StartActiveSpan("ElasticSearch Get my_index")) { var response = await _client.GetAsync<MyDoc>(1, idx => idx.Index("my_index")); } using (var kafkaSpan = tracer.StartActiveSpan("Kafka Send")) { var deliveryResult = await producer.ProduceAsync(topic, message); } var doc = response.Source; return View(doc); } } HTTP GET - /index 723 ms Elasticsearch - Get - my_index 360 ms Kafka - Send 280 ms Traces
  • 17. Photo by Andrea Piacquadio - pexels.com LET’S DO IT FOR ALL THE DEPENDENCIES …
  • 18. … YOU WOULD GET ALL OF THIS FOR FREE IMAGINE … imgflip.com
  • 19. imgflip.com This is a solved problem! WAIT !
  • 22. OTel Language Team OTel auto-instrumentation / Agents today dependency uses instruments Library Application Library Team Icons by icons8.com Instrumentation Module … auto-instrumentation / agent
  • 23. LET ME WRITE THE LOGS FOR YOU OTEL DEV WHAT ? LIBRARY DEV imgflip.com
  • 24. uses OTel auto-instrumentation / Agents today dependency instruments Library Application … Library Team OTel Language Team Icons by icons8.com Instrumentation Module auto-instrumentation / agent
  • 25. uses OTel auto-instrumentation / Agents today The ownership problem dependency instruments Library Application Instrumentation Module auto-instrumentation / agent … Library Team OTel Language Team ● misplaced expertise ● scalability Icons by icons8.com ● maintenance ● technical complexity
  • 26. … OBSERVABILITY WOULD BE TRULY UBIQUITOUS IMAGINE … imgflip.com
  • 27. Photo by Işıl - pexels.com UBIQUITOUS OBSERVABILITY → BAKED-IN LIBRARY INSTRUMENTATION
  • 28. Baked-in Instrumentation Aligned ownership dependency uses Icons by icons8.com Application uses Library Baked-in Instrumentation Library Team OTel Language Team SDK / Agent … auto-instrumentation / agent API
  • 29. Our story at Elastic with Elasticsearch clients
  • 30. Semantic Conventions ● Common names for different kinds of operations and data. ● Common naming scheme that can be standardized across a codebase, libraries, and platforms. ● https://opentelemetry.io/docs/concepts/semantic-conventions/
  • 32. Demo ● Same setup with Elastic APM
  • 33. Implementation in specific language clients ● Adding reference to the OpenTelemetry API ● Implement built-in tracing
  • 34. Implementing built-in tracing Challenges ● Think from the perspective of the users of the library ○ Don't over-engineer ● Be careful about span names ○ Pay attention to low cardinality ● Instrumentation always comes with overhead ○ Only instrument relevant code-path ○ Avoid code paths that are being called excessively ● Do not collect sensitive data (by default)
  • 35. Implementing built-in tracing List of PRs ● Semantic Conventions: https://github.com/open-telemetry/semantic-conventions/ pull/23 ● Java: https://github.com/elastic/elasticsearch-java/pull/588 ● .NET: https://github.com/elastic/elasticsearch-net/pull/6990 ● Ruby: https://github.com/elastic/elasticsearch-ruby/pull/2179
  • 36. Implementing built-in tracing List of PRs ● RabbitMQ .NET: https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1 261
  • 37. Future of native instrumentation ● Realistically: there will always be a mix of native + external instrumentation ● OTel registry: https://opentelemetry.io/ecosystem/registry/