Slide 1

Slide 1 text

!1 Jun Ohtani Community Engineer @Elastic
 Twitter: @johtani Elastic StackͰ࢝ΊΔJavaΞϓϦͷ ύϑΥʔϚϯε؂ࢹ

Slide 2

Slide 2 text

!2 about • Me, Jun Ohtani / Developer Advocate ‒ lucene-gosenίϛολʔ ‒ σʔλ෼ੳج൫ߏஙೖ໳ ڞஶ ‒ http://blog.johtani.info
 • Elastic, founded in 2012 ‒ Products: Elasticsearch, Logstash, Kibana, Beats 
 Elastic APM, 
 X-Pack, Elastic Cloud, Swiftype 
 Professional services: Support & development subscriptions
 Trainings, Consulting, SaaS

Slide 3

Slide 3 text

!3 ΞδΣϯμ • Elastic Stackͱ͸ʁ • Elastic APMͱ͸ʁ • Elastic APM Java Agentͷ࢖͍ํ

Slide 4

Slide 4 text

!4 Elastic Stack

Slide 5

Slide 5 text

5 Elastic Stack 100% Φʔϓϯιʔε ʮΤϯλʔϓϥΠζ൛ʯ͸ແ͠ όʔδϣϯ 5.0Ͱ׬શ౷Ұ

Slide 6

Slide 6 text

!6

Slide 7

Slide 7 text

7 Beats ܰྔσʔλγούʔ ιʔε͔ΒσʔλΛసૹ సૹ͠Elasticsearchʹू໿ ม׵ͱύʔεͷͨΊ Logstashʹసૹ Elastic Cloudʹసૹ Libbeat: ΧελϜbeatsͷͨ ΊͷAPIϑϨʔϜϫʔΫ 30Ҏ্ͷίϛϡχςΟbeats

Slide 8

Slide 8 text

The Beats family Heartbeat Uptime monitoring Filebeat Log files Winlogbeat Windows Event Logs Packetbeat Network data +40 community Beats Metricbeat Metrics Auditbeat Audit data

Slide 9

Slide 9 text

!9

Slide 10

Slide 10 text

10 Logstash σʔλՃ޻ύΠϓϥΠϯ શͯͷܗࣜɺαΠζͱσʔλιʔ εͷ౤ೖ ύʔεͱಈతͳ σʔλม׵ ͋ΒΏΔग़ྗʹ σʔλసૹ ҆શͰ҉߸Խ͞Εͨ
 σʔλೖྗ ಠࣗͷύΠϓϥΠϯॲཧ ͷ࡞੒ 200Ҏ্ͷϓϥάΠϯ

Slide 11

Slide 11 text

!11

Slide 12

Slide 12 text

12 Elasticsearch Heart of the Elastic Stack ෼ࢄܕɺεέʔϥϒϧ ߴՄ༻ੑ Ϛϧνςφϯτ ։ൃऀϑϨϯυϦʔ ϦΞϧλΠϜɺશจݕࡧ ΞάϦήʔγϣϯ

Slide 13

Slide 13 text

!13

Slide 14

Slide 14 text

14 Kibana Window into the Elastic Stack ՄࢹԽͱ෼ੳ ஍ཧۭؒ ΧελϚΠζͱ Ϩϙʔτͷڞ༗ άϥϑ୳ࡧ Elastic Stack΁ͷ ηΩϡΞͳΞΫηεͱ؅ཧ ΧελϜAppsͷ࡞੒

Slide 15

Slide 15 text

!15

Slide 16

Slide 16 text

!16 Elastic APM

Slide 17

Slide 17 text

!17 Full-stack monitoring with Elastic APM adds end-user experience and application-level monitoring to the stack

Slide 18

Slide 18 text

APM Architecture APM data is just another Index

Slide 19

Slide 19 text

!19 Supported agents - Python (https://github.com/elastic/apm-agent-python) - Node.js (https://github.com/elastic/apm-agent-nodejs) - Ruby (https://github.com/elastic/apm-agent-ruby) - JS Beta (https://github.com/elastic/apm-agent-js-base) - Go Beta (https://github.com/elastic/apm-agent-go) - Java Beta (https://github.com/elastic/apm-agent-java) All agents are Open Source and available on GitHub

Slide 20

Slide 20 text

!20 Java agent is now in beta!

Slide 21

Slide 21 text

!21 Download the agent • Download jar from Maven Central • Don't declare a dependency

Slide 22

Slide 22 text

!22 Start application with Java agent enabled java -javaagent:/path/to/elastic-apm-agent-.jar \ -Delastic.apm.service_name=my-application \ -Delastic.apm.server_url=http://localhost:8200 \ -jar my-spring-boot-application.jar

Slide 23

Slide 23 text

!23 Demo!

Slide 24

Slide 24 text

Deployment: nginx 
 Pod Deployment: app 
 Pod Deployment:
 mysql 
 Pod Service: nginx
 
 LoadBalancer Metrics Network Analytics Logs Application Performance Monitoring

Slide 25

Slide 25 text

!25 Supported Technologies • Java 7+ • Frameworks/APIs/Libraries ‒ Servlet API ‒ Spring Web MVC/Spring Boot ‒ JDBC • Application Servers/Servlet Containers ‒ Tomcat ‒ WildFly ‒ Jetty ‒ WebSphere ‒ Spring Boot with embedded Tomcat, Jetty and Undertow • Participate in the survey

Slide 26

Slide 26 text

!26

Slide 27

Slide 27 text

!27

Slide 28

Slide 28 text

!28

Slide 29

Slide 29 text

How does it work? !29

Slide 30

Slide 30 text

!30 Instrumenting Servlets Request Response Agent Agent Servlet.s ervice • Java agents can modify classes when they are loaded • When Java load a Servlet class ‒ Agents adds code before and after Servlet#service ‒ Record Transactions (URL, parameters, response code) ‒ Send to APM Server

Slide 31

Slide 31 text

!31 Automatic + Manual Instrumentation • Automatically records requests ‒ HTTP traffic for Servlet API-based applications ‒ JDBC queries • Offers API for customization ‒ Application specific metadata ‒ Custom transactions ‒ OpenTracing integration The best of both worlds

Slide 32

Slide 32 text

Future? !32

Slide 33

Slide 33 text

!33 Future • Distributed Tracing ‒ Troubleshoot latency issues and errors in (micro-) service architectures ‒ Correlates the interaction of the services by passing correlation IDs • Better integration of APM/logging/metrics • Support for more frameworks and application servers ‒ Spring Web Reactive ‒ Tell us what you want support for: participate in the survey

Slide 34

Slide 34 text

!34 bit.ly/EnqEsMeetup

Slide 35

Slide 35 text

Thank you! ● Documentation : https://www.elastic.co/guide/en/apm/agent/java ● GitHub : https://github.com/elastic/apm-agent-java ● Forums : https://discuss.elastic.co/apm ● Survey : https://discuss.elastic.co/t/apm-agent-surveys/132808 ● Sample : https://github.com/johtani/apm-beats-kubernetes-demo ● Twitter : @johtani