SlideShare a Scribd company logo
1 of 25
Download to read offline
The Monitoring and Metric
aspects of
Heiko W. Rupp

<hrupp@redhat.com>

@pilhuhn
About me
• I work at Red Hat

• I live in Stuttgart

• Spec lead MicroProfile Metrics

• @pilhuhn on social media
About MicroProfile
An open forum
to
optimize Enterprise Java
for a
microservices architecture
by
innovating across multiple implementations
and
collaborating on common areas of interest with a goal of standardisation.
Involved Parties
About MicroProfile
• Specs by the Community

• Quarterly time-boxed releases

• What is ready is in
About MicroProfile
• MP 1.0 (2016)

• CDI, JAX-RS, JSON-P

• MP 1.1 (2017)

• Config 1.0

• MP 1.2 (Oct 2017)

• Config 1.1, Metrics 1.0, HealthCheck 1.0, Fault-Tolerance 1.0

• JWT 1.0
Health Checks
• „Is my system healthy“?

• We did that manually

• Systems like Kubernetes need an M2M interface

• Check via http call

• 200-399 is healthy
Health Checks
@Health
public class HealthDemo implements HealthCheck {
@Override
public HealthCheckResponse call() {
HealthCheckResponseBuilder alive = HealthCheckResponse.named("alive");
// Other info
alive.withData("hello","world");
return alive.up().build();
}
}
Health Checks
$ curl -i http://localhost:9080/health
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Language: de-DE
Content-Length: 82
Date: Thu, 19 Oct 2017 18:09:30 GMT
{„checks":[
{
„data":{"hello":"world"},
„name":"alive",
„state":"UP"
}
],
„outcome":"UP"}
Health Checks
< demo >
Metrics
• Telemetry data

• Billing / Capacity planning / graphing

• Scopes

• Base: supported by every vendor, required

• Vendor: vendor specific, optional, non portable

• Application: optional, application-specific
Metrics
• REST api for monitoring agents

• text/plain for Prometheus format

• application/json for a Json format

• GET for data

• OPTIONS for metadata
Metrics
< demo >
Metrics
• Java API for applications

• Formed after DropWizard Metrics

• Annotations

• CDI
Metrics
@Inject
Counter aCounter;
@Inject
@Metric(absolute = true, tags = „where=eclipse_con")
Histogram histogram;
@PostConstruct
public void startup() {
aCounter.inc(42);
histogram.update(42);
}
Metrics
@GET
@Produces("text/plain")
@Counted(description = "Counting of the Hello call",
absolute = true, tags = {"app=shop","type=counter"})
@Timed(name="helloTime",
description = "Timing of the Hello call",
absolute = true, tags = {"app=shop","type=timer"})
public Response doGet() {
aCounter.inc();
return Response.ok("Hello from MP Metrics! " + aCounter.getCount())
.build();
}
Metrics
< demo >
OpenTracing
• Classical Architecture: Monolith

• One can attach a Profiler to see what is happening

• Microservices

• Application consists of many Microservices

• A profiler on one service does not help
OpenTracing
DB
OpenTracing
DB
(Open)Tracing
DB
t
OpenTracing
• Unfortunately:

• Did not make it into MicroProfile 1.2

• => no demo
More…
• https://github.com/pilhuhn/microprofile-demo

• MicroProfile.io

• https://projects.eclipse.org/projects/technology.microprofile

• http://wildfly-swarm.io

• https://developers.redhat.com/blog/2017/10/17/monitoring-aspects-
eclipse-microprofile-1-2/

• https://developers.redhat.com/blog/2017/10/25/monitor-eclipse-
microprofile-1-2-server-prometheus/

• PLEASE GIVE US FEEDBACK
The Monitoring and Metic aspects of Eclipse MicroProfile

More Related Content

What's hot

API Centric Development in PHP
API Centric Development in PHPAPI Centric Development in PHP
API Centric Development in PHP
Joe Stagner
 
Add ons for stash
Add ons for stashAdd ons for stash
Add ons for stash
Xpand IT
 

What's hot (20)

GraphQL Search
GraphQL SearchGraphQL Search
GraphQL Search
 
API Centric Development in PHP
API Centric Development in PHPAPI Centric Development in PHP
API Centric Development in PHP
 
Real-Time ETL in Practice with WSO2 Enterprise Integrator
Real-Time ETL in Practice with WSO2 Enterprise IntegratorReal-Time ETL in Practice with WSO2 Enterprise Integrator
Real-Time ETL in Practice with WSO2 Enterprise Integrator
 
Monitoring MongoDB Atlas with Datadog
Monitoring MongoDB Atlas with DatadogMonitoring MongoDB Atlas with Datadog
Monitoring MongoDB Atlas with Datadog
 
Combining Logs, Metrics, and Traces for Unified Observability
Combining Logs, Metrics, and Traces for Unified ObservabilityCombining Logs, Metrics, and Traces for Unified Observability
Combining Logs, Metrics, and Traces for Unified Observability
 
Automated Apache Kafka Mocking and Testing with AsyncAPI | Hugo Guerrero, Red...
Automated Apache Kafka Mocking and Testing with AsyncAPI | Hugo Guerrero, Red...Automated Apache Kafka Mocking and Testing with AsyncAPI | Hugo Guerrero, Red...
Automated Apache Kafka Mocking and Testing with AsyncAPI | Hugo Guerrero, Red...
 
Change a gear up with Evolutionary Architecture
Change a gear up with Evolutionary ArchitectureChange a gear up with Evolutionary Architecture
Change a gear up with Evolutionary Architecture
 
apidays LIVE Paris - The Rise of GraphQL for database APIs by Karthic Rao
apidays LIVE Paris - The Rise of GraphQL for database APIs by Karthic Raoapidays LIVE Paris - The Rise of GraphQL for database APIs by Karthic Rao
apidays LIVE Paris - The Rise of GraphQL for database APIs by Karthic Rao
 
[Workshop] API-driven Integration
[Workshop] API-driven Integration[Workshop] API-driven Integration
[Workshop] API-driven Integration
 
The citizen integrator
The citizen integratorThe citizen integrator
The citizen integrator
 
Getting started with apache flink streaming api
Getting started with apache flink streaming apiGetting started with apache flink streaming api
Getting started with apache flink streaming api
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIs
 
logcat Hilt
logcat Hiltlogcat Hilt
logcat Hilt
 
O monitoramento da infraestrutura facilitado, da ingestão ao insight
O monitoramento da infraestrutura facilitado, da ingestão ao insightO monitoramento da infraestrutura facilitado, da ingestão ao insight
O monitoramento da infraestrutura facilitado, da ingestão ao insight
 
Case360 and liferay integration
Case360 and liferay integrationCase360 and liferay integration
Case360 and liferay integration
 
Elastic@Colruyt: Ensuring business continuity and improving efficiency
Elastic@Colruyt: Ensuring business continuity and improving efficiencyElastic@Colruyt: Ensuring business continuity and improving efficiency
Elastic@Colruyt: Ensuring business continuity and improving efficiency
 
[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming Apps[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming Apps
 
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
 
Add ons for stash
Add ons for stashAdd ons for stash
Add ons for stash
 
Cracking web development
Cracking web developmentCracking web development
Cracking web development
 

Similar to The Monitoring and Metic aspects of Eclipse MicroProfile

Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
CIVEL Benoit
 
Rahul Yadav_Resume_519785
Rahul Yadav_Resume_519785Rahul Yadav_Resume_519785
Rahul Yadav_Resume_519785
Rahul Yadav
 

Similar to The Monitoring and Metic aspects of Eclipse MicroProfile (20)

How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...
 
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
 
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
 
Business metrics visualization with Grafana and Prometheus
Business metrics visualization with Grafana and PrometheusBusiness metrics visualization with Grafana and Prometheus
Business metrics visualization with Grafana and Prometheus
 
Predicting medical tests results using Driverless AI
Predicting medical tests results using Driverless AIPredicting medical tests results using Driverless AI
Predicting medical tests results using Driverless AI
 
Feedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams AppsFeedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams Apps
 
Predicting Medical Test Results using Driverless AI
Predicting Medical Test Results using Driverless AIPredicting Medical Test Results using Driverless AI
Predicting Medical Test Results using Driverless AI
 
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
Building an Open Source AppSec Pipeline - 2015 Texas Linux FestBuilding an Open Source AppSec Pipeline - 2015 Texas Linux Fest
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the CloudGetting Started with API Management – Why It's Needed On-prem and in the Cloud
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Big ideas in small packages - How microservices helped us to scale our vision
Big ideas in small packages  - How microservices helped us to scale our visionBig ideas in small packages  - How microservices helped us to scale our vision
Big ideas in small packages - How microservices helped us to scale our vision
 
Amit Bhandari
Amit BhandariAmit Bhandari
Amit Bhandari
 
VINOD_6yrs
VINOD_6yrsVINOD_6yrs
VINOD_6yrs
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Priyadarshi Nanda_QA_Resume
Priyadarshi Nanda_QA_ResumePriyadarshi Nanda_QA_Resume
Priyadarshi Nanda_QA_Resume
 
Architecting peta-byte-scale analytics by scaling out Postgres on Azure with ...
Architecting peta-byte-scale analytics by scaling out Postgres on Azure with ...Architecting peta-byte-scale analytics by scaling out Postgres on Azure with ...
Architecting peta-byte-scale analytics by scaling out Postgres on Azure with ...
 
Rahul Yadav_Resume_519785
Rahul Yadav_Resume_519785Rahul Yadav_Resume_519785
Rahul Yadav_Resume_519785
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

The Monitoring and Metic aspects of Eclipse MicroProfile

  • 1. The Monitoring and Metric aspects of Heiko W. Rupp <hrupp@redhat.com> @pilhuhn
  • 2.
  • 3. About me • I work at Red Hat • I live in Stuttgart • Spec lead MicroProfile Metrics • @pilhuhn on social media
  • 4. About MicroProfile An open forum to optimize Enterprise Java for a microservices architecture by innovating across multiple implementations and collaborating on common areas of interest with a goal of standardisation.
  • 6. About MicroProfile • Specs by the Community • Quarterly time-boxed releases • What is ready is in
  • 7. About MicroProfile • MP 1.0 (2016) • CDI, JAX-RS, JSON-P • MP 1.1 (2017) • Config 1.0 • MP 1.2 (Oct 2017) • Config 1.1, Metrics 1.0, HealthCheck 1.0, Fault-Tolerance 1.0 • JWT 1.0
  • 8. Health Checks • „Is my system healthy“? • We did that manually • Systems like Kubernetes need an M2M interface • Check via http call • 200-399 is healthy
  • 9. Health Checks @Health public class HealthDemo implements HealthCheck { @Override public HealthCheckResponse call() { HealthCheckResponseBuilder alive = HealthCheckResponse.named("alive"); // Other info alive.withData("hello","world"); return alive.up().build(); } }
  • 10. Health Checks $ curl -i http://localhost:9080/health HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 Content-Language: de-DE Content-Length: 82 Date: Thu, 19 Oct 2017 18:09:30 GMT {„checks":[ { „data":{"hello":"world"}, „name":"alive", „state":"UP" } ], „outcome":"UP"}
  • 12. Metrics • Telemetry data • Billing / Capacity planning / graphing • Scopes • Base: supported by every vendor, required • Vendor: vendor specific, optional, non portable • Application: optional, application-specific
  • 13. Metrics • REST api for monitoring agents • text/plain for Prometheus format • application/json for a Json format • GET for data • OPTIONS for metadata
  • 15. Metrics • Java API for applications • Formed after DropWizard Metrics • Annotations • CDI
  • 16. Metrics @Inject Counter aCounter; @Inject @Metric(absolute = true, tags = „where=eclipse_con") Histogram histogram; @PostConstruct public void startup() { aCounter.inc(42); histogram.update(42); }
  • 17. Metrics @GET @Produces("text/plain") @Counted(description = "Counting of the Hello call", absolute = true, tags = {"app=shop","type=counter"}) @Timed(name="helloTime", description = "Timing of the Hello call", absolute = true, tags = {"app=shop","type=timer"}) public Response doGet() { aCounter.inc(); return Response.ok("Hello from MP Metrics! " + aCounter.getCount()) .build(); }
  • 19. OpenTracing • Classical Architecture: Monolith • One can attach a Profiler to see what is happening • Microservices • Application consists of many Microservices • A profiler on one service does not help
  • 23. OpenTracing • Unfortunately: • Did not make it into MicroProfile 1.2 • => no demo
  • 24. More… • https://github.com/pilhuhn/microprofile-demo • MicroProfile.io • https://projects.eclipse.org/projects/technology.microprofile • http://wildfly-swarm.io • https://developers.redhat.com/blog/2017/10/17/monitoring-aspects- eclipse-microprofile-1-2/ • https://developers.redhat.com/blog/2017/10/25/monitor-eclipse- microprofile-1-2-server-prometheus/ • PLEASE GIVE US FEEDBACK