Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elastic Stackで始めるJavaアプリのパフォーマンス監視 / Intro Elas...

Elastic Stackで始めるJavaアプリのパフォーマンス監視 / Intro Elastic Stack and Elastic APM Java

2018/07/25のJJUG ナイトセミナーで使用したスライドになります。

サンプルアプリ、Beats系の設定は以下のGitHubリポジトリで公開してます。
https://github.com/johtani/apm-beats-kubernetes-demo/

Jun Ohtani

July 25, 2018
Tweet

More Decks by Jun Ohtani

Other Decks in Technology

Transcript

  1. !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
  2. !6

  3. The Beats family Heartbeat Uptime monitoring Filebeat Log files Winlogbeat

    Windows Event Logs Packetbeat Network data +40 community Beats Metricbeat Metrics Auditbeat Audit data
  4. !9

  5. !11

  6. 12 Elasticsearch Heart of the Elastic Stack ෼ࢄܕɺεέʔϥϒϧ ߴՄ༻ੑ Ϛϧνςφϯτ

    ։ൃऀϑϨϯυϦʔ ϦΞϧλΠϜɺશจݕࡧ ΞάϦήʔγϣϯ
  7. !13

  8. 14 Kibana Window into the Elastic Stack ՄࢹԽͱ෼ੳ ஍ཧۭؒ ΧελϚΠζͱ

    Ϩϙʔτͷڞ༗ άϥϑ୳ࡧ Elastic Stack΁ͷ ηΩϡΞͳΞΫηεͱ؅ཧ ΧελϜAppsͷ࡞੒
  9. !15

  10. !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
  11. !22 Start application with Java agent enabled java -javaagent:/path/to/elastic-apm-agent-<version>.jar \

    -Delastic.apm.service_name=my-application \ -Delastic.apm.server_url=http://localhost:8200 \ -jar my-spring-boot-application.jar
  12. Deployment: nginx 
 Pod Deployment: app 
 Pod Deployment:
 mysql

    
 Pod Service: nginx
 
 LoadBalancer Metrics Network Analytics Logs Application Performance Monitoring
  13. !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
  14. !26

  15. !27

  16. !28

  17. !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
  18. !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
  19. !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
  20. 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