Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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...
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, ...
Health Checks
• „Is my system healthy“?

• We did that manually

• Systems like Kubernetes need an M2M interface

• Check ...
Health Checks
@Health
public class HealthDemo implements HealthCheck {
@Override
public HealthCheckResponse call() {
Healt...
Health Checks
$ curl -i http://localhost:9080/health
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content...
Health Checks
< demo >
Metrics
• Telemetry data

• Billing / Capacity planning / graphing

• Scopes

• Base: supported by every vendor, required
...
Metrics
• REST api for monitoring agents

• text/plain for Prometheus format

• application/json for a Json format

• GET ...
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;
@PostC...
Metrics
@GET
@Produces("text/plain")
@Counted(description = "Counting of the Hello call",
absolute = true, tags = {"app=sh...
Metrics
< demo >
OpenTracing
• Classical Architecture: Monolith

• One can attach a Profiler to see what is happening

• Microservices

• Ap...
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....
The Monitoring and Metic aspects of Eclipse MicroProfile
The Monitoring and Metic aspects of Eclipse MicroProfile
Upcoming SlideShare
Loading in …5
×

of

The Monitoring and Metic aspects of Eclipse MicroProfile Slide 1 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 2 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 3 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 4 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 5 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 6 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 7 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 8 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 9 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 10 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 11 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 12 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 13 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 14 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 15 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 16 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 17 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 18 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 19 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 20 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 21 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 22 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 23 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 24 The Monitoring and Metic aspects of Eclipse MicroProfile Slide 25

YouTube videos are no longer supported on SlideShare

View original on YouTube

0

Share

Download to read offline

The Monitoring and Metic aspects of Eclipse MicroProfile

Download to read offline

Slides of my presentation at EclipseCon Europe about Eclipse MicroProfile Metrics and Monitoring aspects.
A video recording of the talk is available at https://youtu.be/Ep4Bkx0_MAg

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

The Monitoring and Metic aspects of Eclipse MicroProfile

  1. 1. The Monitoring and Metric aspects of Heiko W. Rupp <hrupp@redhat.com> @pilhuhn
  2. 2. About me • I work at Red Hat • I live in Stuttgart • Spec lead MicroProfile Metrics • @pilhuhn on social media
  3. 3. 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.
  4. 4. Involved Parties
  5. 5. About MicroProfile • Specs by the Community • Quarterly time-boxed releases • What is ready is in
  6. 6. 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
  7. 7. 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
  8. 8. 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(); } }
  9. 9. 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"}
  10. 10. Health Checks < demo >
  11. 11. Metrics • Telemetry data • Billing / Capacity planning / graphing • Scopes • Base: supported by every vendor, required • Vendor: vendor specific, optional, non portable • Application: optional, application-specific
  12. 12. Metrics • REST api for monitoring agents • text/plain for Prometheus format • application/json for a Json format • GET for data • OPTIONS for metadata
  13. 13. Metrics < demo >
  14. 14. Metrics • Java API for applications • Formed after DropWizard Metrics • Annotations • CDI
  15. 15. Metrics @Inject Counter aCounter; @Inject @Metric(absolute = true, tags = „where=eclipse_con") Histogram histogram; @PostConstruct public void startup() { aCounter.inc(42); histogram.update(42); }
  16. 16. 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(); }
  17. 17. Metrics < demo >
  18. 18. 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
  19. 19. OpenTracing DB
  20. 20. OpenTracing DB
  21. 21. (Open)Tracing DB t
  22. 22. OpenTracing • Unfortunately: • Did not make it into MicroProfile 1.2 • => no demo
  23. 23. 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

Slides of my presentation at EclipseCon Europe about Eclipse MicroProfile Metrics and Monitoring aspects. A video recording of the talk is available at https://youtu.be/Ep4Bkx0_MAg

Views

Total views

452

On Slideshare

0

From embeds

0

Number of embeds

0

Actions

Downloads

1

Shares

0

Comments

0

Likes

0

×