SlideShare a Scribd company logo
1 of 49
Download to read offline
Distributed systems
Observability
Elastic Stack
Jaeger Tracing
Distributed system
>
Monolithic systems
Distributed tracing
Netflix – microservices system
Distributed tracing
Nowadays all system are distributed
Distributed tracing
Lorem ipsum dolor sit
6
Distributed system – logical view
Distributed tracing
Observability
>
Observability
Distributed tracing
Monitoring
Dashboards
Thresholds
Interactive
Alerting
Event
based
Trigger
actions
Logging
Centralize
logs
Aggregate
Interactive
Tracing
Request
based
Debugging
Cross-
Platform
Monitoring
Interactive Tools:
• Graphite & Grafana
• Elastic stack with Kibana UI
• Icinga Dashboards
• Oracle Enterprise Manager
• Kafka Manager
• …
Distributed tracing
Distributed tracing
Alerting with icinga
Distributed tracing
Alerting
Main tool for alerting is Icinga
Distributed tracing
Log aggregation/analytics
>
Log aggregation
Elastic stack
Distributed tracing
Source: https://www.elastic.co/guide/en/logstash/current/deploying-and-scaling.html
Several applications logs into one big index
Classical simple view
Distributed tracing
Amount of specific payload types increases
Mapping explosion can cause out of memory errors and difficult situations to recover from
index.mapping.total_fields.limit
The maximum number of fields in an index. Field and object mappings, as well as
field aliases count towards this limit. The default value is 1000.
Many applications
Distributed tracing
• granular configuration for disk space and history per component
• dashboards are faster
• no problem with mapping explosion
• no problem with same name but different type fields
Separated logstash index per component
Distributed tracing
One curator action per component
• delete using indices size for a specific component
• delete using amount of indices for some
• delete using date
Example:
Housekeeping with Curator
Distributed tracing
ILM replaces most of the basic Curator functionality.
But! ILM does not support deletion of oldest index of a group of indices sorted by a pattern and
based on overall size.
See: https://github.com/elastic/elasticsearch/issues/44001
Index Lifecycle management (ILM)
Distributed tracing
Demo
Distributed tracing
>
Distributed tracing
Distributed tracing takes a request-centric view.
"What happened to my request?"
It captures the detailed execution of important
activities performed by the components of a
distributed system as it processes a given
request.
Tracing infrastructure attaches contextual
metadata to each request and ensures that
metadata is passed around during the request
execution.
Distributed tracing
Vendor-neutral APIs and instrumentation for distributed tracing
opentracing.io
Distributed tracing
Source:https://medium.com/opentracing/towards-turnkey-distributed-tracing-5f4297d1736
jaegertracing.io
OpenTracing compatible data model and instrumentation libraries in
• Go, Java, Python, …
Multiple storage backends: Cassandra, Elasticsearch, memory.
Modern Web UI
Cloud Native Deployments
Not a full replacement for automatic profiler
Not a dynamic instrumentation
Distributed tracing
jaegertracing.io
Span
A span represents a logical unit of work in Jaeger that has an operation name, the start time of
the operation, and the duration.
Trace
A trace is a data/execution path
through the system.
Terminology
Distributed tracing
Source: https://www.jaegertracing.io/docs/1.13/architecture/
Trace Timeline
Distributed tracing
Trace Graph
Distributed tracing
jaegertracing architecture
Distributed tracing
Distributed tracing
Distributed tracing
Implementation details
3rd party libraries
• OpenTracing Cassandra Driver Instrumentation (https://github.com/opentracing-contrib/java-
cassandra-driver)
• OpenTracing Spring Web Instrumentation (https://github.com/opentracing-contrib/java-spring-web)
• OpenTracing Feign Instrumentation (https://github.com/OpenFeign/feign-opentracing)
• OpenTracing JAX-RS Instrumentation (https://github.com/opentracing-contrib/java-jaxrs)
Custom libraries
• Integration library for applications in tomcat (extint in DE and INT) and in weblogic (DE and INT)
https://pb-git.intra.loyaltypartner.com/projects/LIBRARIES/repos/opentracing-jee/browse
• Custom Spring Boot integration library with support for Kafka producers and consumers
(based on https://github.com/opentracing-contrib/java-kafka-client)
Distributed tracing
Code snippets
Tracer initialization
Distributed tracing
public static JaegerConfig fromConfiguration(final String service, final Configuration configuration) {
final boolean enabled = configuration.getBoolean("jaeger.enabled", false);
if (enabled) {
return JaegerConfig.enabled( //
service, configuration.getString("jaeger.endpoint"),
configuration.getInteger("jaeger.maxPacketSize", null), //
configuration.getInteger("jaeger.flushInterval", null), //
configuration.getInteger("jaeger.maxQueueSize", null), //
configuration.getInteger("jaeger.probabilityPercent", null) //
);
} else {
return JaegerConfig.disabled();
}
}
final Tracer tracer = JaegerBootstrapUtil.createTracer(jaegerConfig);
GlobalTracer.register(tracer);
public static Tracer createTracer(final JaegerConfig cfg) {
if (cfg.isEnabled()) {
final Sender sender = createSender(cfg);
final RemoteReporter reporter = createRemoteReporter(cfg, sender);
final Sampler sampler = createSampler(cfg);
return new JaegerTracer.Builder(cfg.getService()) //
.withReporter(reporter) //
.withSampler(sampler) //
.build();
} else {
LOGGER.info("Jaeger is disabled");
return NoopTracerFactory.create();
}
}
The sampling decision will be propagated with the requests.
Sampling
Distributed tracing
public static Sampler createSampler(final JaegerConfig cfg) {
if (cfg.getProbabilityPercent() == 100) {
LOGGER.info("Sending all spans to jaeger");
return new ConstSampler(true);
} else if (cfg.getProbabilityPercent() == 0) {
LOGGER.info("Sending no spans to jaeger");
return new ConstSampler(false);
} else {
LOGGER.info("Sending {}% of spans to jaeger", cfg.getProbabilityPercent());
return new ProbabilisticSampler(((double) cfg.getProbabilityPercent()) / 100);
}
}
Code examples
Distributed tracing
…
@Interceptors({CompositeOpenTracingInterceptor.class, MethodValidationInterceptor.class, LoggingInterceptor.class})
public class IcmLoyaltyOrderServiceBean {
…
/**
* Open-Tracing for EJBs that belong to the composite layer.
*/
public class CompositeOpenTracingInterceptor extends OpenTracingInterceptor {
@Override
protected void addSpanTags(final InvocationContext ctx, final RequestContext requestContext,
final SpanContext parent, final Span span) {
super.addSpanTags(ctx, requestContext, parent, span);
COMPONENT.set(span, "composite");
}
}
Interceptor example
Distributed tracing
public class OpenTracingInterceptor {
@AroundInvoke
public Object trace(final InvocationContext ctx) throws Exception {
final Tracer tracer = GlobalTracer.get();
final RequestContext requestContext = getRequestContext(ctx);
final SpanContext parent = null;
if (tracer.activeSpan()!= null) {
parent = activeSpan.context();
} else {
if (requestContext instanceof SpanContextTransporter) {
parent = ((SpanContextTransporter) requestContext).getSpanContext();
}
}
final Tracer.SpanBuilder spanBuilder = tracer.buildSpan(ctx.getMethod().getName());
if (parent != null) {
spanBuilder.asChildOf(parent);
}
try (final Scope scope = spanBuilder.startActive(true)) {
CLASS_NAME.set(span, determineClassName(ctx.getTarget()));
METHOD_NAME.set(span, ctx.getMethod().getName());
if (parent == null && requestContext != null) {
REQUEST_CONTEXT_ID.set(span, requestContext.getId());
}
try {
return dispatchTracedCall(ctx);
} catch (final Exception e) {
final Span span = scope.span();
Tags.ERROR.set(span, true);
span.log(e.getMessage());
throw e;
}
}
}
.....
Demo
Error information stored in Jeager
Analyzing errors with Jeager
Analyzing errors with Jeager
Distributed tracing
Jaeger UI view of two traces A and B being compared structurally in the graph form
Compare traces
Distributed tracing
Compare traces
Distributed tracing
OpenTracing APM java agent exists:
https://github.com/elastic/apm-agent-java
But!
Documentation for Elastic APM OpenTracing bridge:
Elastic APM
Distributed tracing
Stay curious
Keep exploring
Distributed tracing

More Related Content

What's hot

Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-timeChris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Flink Forward
 
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
Srinath Perera
 
Prezo tooracleteam (2)
Prezo tooracleteam (2)Prezo tooracleteam (2)
Prezo tooracleteam (2)
Sharma Podila
 

What's hot (20)

Attacking Machine Learning used in AntiVirus with Reinforcement by Rubén Mart...
Attacking Machine Learning used in AntiVirus with Reinforcement by Rubén Mart...Attacking Machine Learning used in AntiVirus with Reinforcement by Rubén Mart...
Attacking Machine Learning used in AntiVirus with Reinforcement by Rubén Mart...
 
Sumo Logic Cert Jam - Metrics Mastery
Sumo Logic Cert Jam - Metrics MasterySumo Logic Cert Jam - Metrics Mastery
Sumo Logic Cert Jam - Metrics Mastery
 
Sumo Logic Cert Jam - Security & Compliance
Sumo Logic Cert Jam - Security & ComplianceSumo Logic Cert Jam - Security & Compliance
Sumo Logic Cert Jam - Security & Compliance
 
OGCE MSI Presentation
OGCE MSI PresentationOGCE MSI Presentation
OGCE MSI Presentation
 
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
 
Sumo Logic QuickStart Webinar - Get Certified
Sumo Logic QuickStart Webinar - Get CertifiedSumo Logic QuickStart Webinar - Get Certified
Sumo Logic QuickStart Webinar - Get Certified
 
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-timeChris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
 
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
ICTER 2014 Invited Talk: Large Scale Data Processing in the Real World: from ...
 
Michael Häusler – Everyday flink
Michael Häusler – Everyday flinkMichael Häusler – Everyday flink
Michael Häusler – Everyday flink
 
OGCE TG09 Tech Track Presentation
OGCE TG09 Tech Track PresentationOGCE TG09 Tech Track Presentation
OGCE TG09 Tech Track Presentation
 
Apache metron meetup presentation at capital one
Apache metron meetup presentation at capital oneApache metron meetup presentation at capital one
Apache metron meetup presentation at capital one
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
Sumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - FundamentalsSumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - Fundamentals
 
Apache metron - An Introduction
Apache metron - An IntroductionApache metron - An Introduction
Apache metron - An Introduction
 
Sumo Logic Certification - Level 2 (Using Sumo)
Sumo Logic Certification - Level 2 (Using Sumo)Sumo Logic Certification - Level 2 (Using Sumo)
Sumo Logic Certification - Level 2 (Using Sumo)
 
Level 2 Certification: Using Sumo Logic - Oct 2018
Level 2 Certification: Using Sumo Logic - Oct 2018Level 2 Certification: Using Sumo Logic - Oct 2018
Level 2 Certification: Using Sumo Logic - Oct 2018
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
The Heatmap
 - Why is Security Visualization so Hard?
The Heatmap
 - Why is Security Visualization so Hard?The Heatmap
 - Why is Security Visualization so Hard?
The Heatmap
 - Why is Security Visualization so Hard?
 
S4: Distributed Stream Computing Platform
S4: Distributed Stream Computing PlatformS4: Distributed Stream Computing Platform
S4: Distributed Stream Computing Platform
 
Prezo tooracleteam (2)
Prezo tooracleteam (2)Prezo tooracleteam (2)
Prezo tooracleteam (2)
 

Similar to Microservices observability

App Grid Dev With Coherence
App Grid Dev With CoherenceApp Grid Dev With Coherence
App Grid Dev With Coherence
James Bayer
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data Grid
Dmitry Buzdin
 
Virtual Science in the Cloud
Virtual Science in the CloudVirtual Science in the Cloud
Virtual Science in the Cloud
thetfoot
 

Similar to Microservices observability (20)

Serverless London 2019 FaaS composition using Kafka and CloudEvents
Serverless London 2019   FaaS composition using Kafka and CloudEventsServerless London 2019   FaaS composition using Kafka and CloudEvents
Serverless London 2019 FaaS composition using Kafka and CloudEvents
 
Opencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesOpencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetes
 
App Grid Dev With Coherence
App Grid Dev With CoherenceApp Grid Dev With Coherence
App Grid Dev With Coherence
 
Application Grid Dev with Coherence
Application Grid Dev with CoherenceApplication Grid Dev with Coherence
Application Grid Dev with Coherence
 
App Grid Dev With Coherence
App Grid Dev With CoherenceApp Grid Dev With Coherence
App Grid Dev With Coherence
 
Opentracing jaeger
Opentracing jaegerOpentracing jaeger
Opentracing jaeger
 
Distributed Tracing with Jaeger
Distributed Tracing with JaegerDistributed Tracing with Jaeger
Distributed Tracing with Jaeger
 
Distributed Applications with Apache Zookeeper
Distributed Applications with Apache ZookeeperDistributed Applications with Apache Zookeeper
Distributed Applications with Apache Zookeeper
 
Observability: Beyond the Three Pillars with Spring
Observability: Beyond the Three Pillars with SpringObservability: Beyond the Three Pillars with Spring
Observability: Beyond the Three Pillars with Spring
 
Apache Eagle in Action
Apache Eagle in ActionApache Eagle in Action
Apache Eagle in Action
 
YOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixYOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at Netflix
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data Grid
 
Virtual Science in the Cloud
Virtual Science in the CloudVirtual Science in the Cloud
Virtual Science in the Cloud
 
GemFire In-Memory Data Grid
GemFire In-Memory Data GridGemFire In-Memory Data Grid
GemFire In-Memory Data Grid
 
Network Automation eAcademy
Network Automation eAcademyNetwork Automation eAcademy
Network Automation eAcademy
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and Kubernetes
 
An Engineer's Intro to Oracle Coherence
An Engineer's Intro to Oracle CoherenceAn Engineer's Intro to Oracle Coherence
An Engineer's Intro to Oracle Coherence
 
Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming
 
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
 

Recently uploaded

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 

Microservices observability

  • 4. Netflix – microservices system Distributed tracing
  • 5. Nowadays all system are distributed Distributed tracing
  • 7. Distributed system – logical view Distributed tracing
  • 9.
  • 11. Monitoring Interactive Tools: • Graphite & Grafana • Elastic stack with Kibana UI • Icinga Dashboards • Oracle Enterprise Manager • Kafka Manager • … Distributed tracing
  • 13.
  • 15. Alerting Main tool for alerting is Icinga Distributed tracing
  • 17. Log aggregation Elastic stack Distributed tracing Source: https://www.elastic.co/guide/en/logstash/current/deploying-and-scaling.html
  • 18. Several applications logs into one big index Classical simple view Distributed tracing
  • 19. Amount of specific payload types increases Mapping explosion can cause out of memory errors and difficult situations to recover from index.mapping.total_fields.limit The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. The default value is 1000. Many applications Distributed tracing
  • 20. • granular configuration for disk space and history per component • dashboards are faster • no problem with mapping explosion • no problem with same name but different type fields Separated logstash index per component Distributed tracing
  • 21. One curator action per component • delete using indices size for a specific component • delete using amount of indices for some • delete using date Example: Housekeeping with Curator Distributed tracing
  • 22. ILM replaces most of the basic Curator functionality. But! ILM does not support deletion of oldest index of a group of indices sorted by a pattern and based on overall size. See: https://github.com/elastic/elasticsearch/issues/44001 Index Lifecycle management (ILM) Distributed tracing
  • 23. Demo
  • 24.
  • 25.
  • 26.
  • 28. Distributed tracing Distributed tracing takes a request-centric view. "What happened to my request?" It captures the detailed execution of important activities performed by the components of a distributed system as it processes a given request. Tracing infrastructure attaches contextual metadata to each request and ensures that metadata is passed around during the request execution. Distributed tracing
  • 29. Vendor-neutral APIs and instrumentation for distributed tracing opentracing.io Distributed tracing Source:https://medium.com/opentracing/towards-turnkey-distributed-tracing-5f4297d1736
  • 30. jaegertracing.io OpenTracing compatible data model and instrumentation libraries in • Go, Java, Python, … Multiple storage backends: Cassandra, Elasticsearch, memory. Modern Web UI Cloud Native Deployments Not a full replacement for automatic profiler Not a dynamic instrumentation Distributed tracing
  • 31. jaegertracing.io Span A span represents a logical unit of work in Jaeger that has an operation name, the start time of the operation, and the duration. Trace A trace is a data/execution path through the system. Terminology Distributed tracing Source: https://www.jaegertracing.io/docs/1.13/architecture/
  • 36. Implementation details 3rd party libraries • OpenTracing Cassandra Driver Instrumentation (https://github.com/opentracing-contrib/java- cassandra-driver) • OpenTracing Spring Web Instrumentation (https://github.com/opentracing-contrib/java-spring-web) • OpenTracing Feign Instrumentation (https://github.com/OpenFeign/feign-opentracing) • OpenTracing JAX-RS Instrumentation (https://github.com/opentracing-contrib/java-jaxrs) Custom libraries • Integration library for applications in tomcat (extint in DE and INT) and in weblogic (DE and INT) https://pb-git.intra.loyaltypartner.com/projects/LIBRARIES/repos/opentracing-jee/browse • Custom Spring Boot integration library with support for Kafka producers and consumers (based on https://github.com/opentracing-contrib/java-kafka-client) Distributed tracing
  • 38. Tracer initialization Distributed tracing public static JaegerConfig fromConfiguration(final String service, final Configuration configuration) { final boolean enabled = configuration.getBoolean("jaeger.enabled", false); if (enabled) { return JaegerConfig.enabled( // service, configuration.getString("jaeger.endpoint"), configuration.getInteger("jaeger.maxPacketSize", null), // configuration.getInteger("jaeger.flushInterval", null), // configuration.getInteger("jaeger.maxQueueSize", null), // configuration.getInteger("jaeger.probabilityPercent", null) // ); } else { return JaegerConfig.disabled(); } } final Tracer tracer = JaegerBootstrapUtil.createTracer(jaegerConfig); GlobalTracer.register(tracer); public static Tracer createTracer(final JaegerConfig cfg) { if (cfg.isEnabled()) { final Sender sender = createSender(cfg); final RemoteReporter reporter = createRemoteReporter(cfg, sender); final Sampler sampler = createSampler(cfg); return new JaegerTracer.Builder(cfg.getService()) // .withReporter(reporter) // .withSampler(sampler) // .build(); } else { LOGGER.info("Jaeger is disabled"); return NoopTracerFactory.create(); } }
  • 39. The sampling decision will be propagated with the requests. Sampling Distributed tracing public static Sampler createSampler(final JaegerConfig cfg) { if (cfg.getProbabilityPercent() == 100) { LOGGER.info("Sending all spans to jaeger"); return new ConstSampler(true); } else if (cfg.getProbabilityPercent() == 0) { LOGGER.info("Sending no spans to jaeger"); return new ConstSampler(false); } else { LOGGER.info("Sending {}% of spans to jaeger", cfg.getProbabilityPercent()); return new ProbabilisticSampler(((double) cfg.getProbabilityPercent()) / 100); } }
  • 40. Code examples Distributed tracing … @Interceptors({CompositeOpenTracingInterceptor.class, MethodValidationInterceptor.class, LoggingInterceptor.class}) public class IcmLoyaltyOrderServiceBean { … /** * Open-Tracing for EJBs that belong to the composite layer. */ public class CompositeOpenTracingInterceptor extends OpenTracingInterceptor { @Override protected void addSpanTags(final InvocationContext ctx, final RequestContext requestContext, final SpanContext parent, final Span span) { super.addSpanTags(ctx, requestContext, parent, span); COMPONENT.set(span, "composite"); } }
  • 41. Interceptor example Distributed tracing public class OpenTracingInterceptor { @AroundInvoke public Object trace(final InvocationContext ctx) throws Exception { final Tracer tracer = GlobalTracer.get(); final RequestContext requestContext = getRequestContext(ctx); final SpanContext parent = null; if (tracer.activeSpan()!= null) { parent = activeSpan.context(); } else { if (requestContext instanceof SpanContextTransporter) { parent = ((SpanContextTransporter) requestContext).getSpanContext(); } } final Tracer.SpanBuilder spanBuilder = tracer.buildSpan(ctx.getMethod().getName()); if (parent != null) { spanBuilder.asChildOf(parent); } try (final Scope scope = spanBuilder.startActive(true)) { CLASS_NAME.set(span, determineClassName(ctx.getTarget())); METHOD_NAME.set(span, ctx.getMethod().getName()); if (parent == null && requestContext != null) { REQUEST_CONTEXT_ID.set(span, requestContext.getId()); } try { return dispatchTracedCall(ctx); } catch (final Exception e) { final Span span = scope.span(); Tags.ERROR.set(span, true); span.log(e.getMessage()); throw e; } } } .....
  • 42. Demo
  • 43. Error information stored in Jeager Analyzing errors with Jeager
  • 46. Jaeger UI view of two traces A and B being compared structurally in the graph form Compare traces Distributed tracing
  • 48. OpenTracing APM java agent exists: https://github.com/elastic/apm-agent-java But! Documentation for Elastic APM OpenTracing bridge: Elastic APM Distributed tracing