32
EVENT TRACING @ ACONEX

EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

  • Upload
    others

  • View
    16

  • Download
    4

Embed Size (px)

Citation preview

Page 1: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

EVENT TRACING @ ACONEX

Page 2: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

INTRODUCTION• Principal Architect @ Oracle - Construction &

Engineering GBU (CEGBU)

• An Engineer who's had his coding license taken away?

• Draw boxes on whiteboards & wave my hands about?

• PCP user & fan for ~14 years

Page 3: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

OUTLINE

• Key Problems we faced

• How PCP & Parfait help us

• Where PCP & Parfait fit into the broader monitoring suite

Page 4: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

ASSUMPTIONS

• Have an understanding of PCP

• Some understanding of Java

Page 5: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

ACONEX TECH STACK

Page 6: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

Apachehttpd

Application

IndexerDBOther Stuff Other Stuff

Page 7: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

TERMINOLOGY

Project

Organization

User

Page 8: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

CONTROLLER

• Servlet Main-entry point for requests

• Groups related Actions together

• Often linked to a particular screen within our application

• e.g. Document Search page - /SearchDocuments

Page 9: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

ACTION

• Specific user-initiated request from a particular screen

• e.g. zippedDownload

• Some actions are quick & cheap... others not so much...

Page 10: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

PROBLEMS

Averages Outliers

Page 11: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

WHAT DID WE TRY TO ACHIEVE?

Outliers Trends

Code Users

Page 12: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

SO HOW DO WE DO IT?

Page 13: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

Code

Page 14: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

PER-CONTROLLER METRICS

• Each Controller is an Instance Domain string

• Resource-specific Counters

• Elapsed Time

• CPU

• Database

• Heap

• Service Calls

Page 15: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

aconex.controllers.utime["mel/SearchDocuments"]aconex.controllers.db.count["mel/SearchDocuments"]...

Code✅

Page 16: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

Users& other Segmentations

Page 17: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

POPULATION SEGMENTATION

• Users

• Projects

• Threads & Thread Pools

• IP Addresses

Page 18: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

LOG4J

• Thread name

• MDC - Mapped Diagnostic Context

• Each Request - UserId, ProjectId is populated

Page 19: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

[2019-02-27 11:49:34,790 INFO ][it.timing.LoggerSink][tid=http-general-246936, rid=XHXenlcxTsaBgQao63SSVwAAA-0, rgi=, ip=120.22.220.1,uid=1476736294, pid=26905] |

Page 20: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

REQUESTS

• Each Request is mapped to a Controller & Action

• Executed by a Thread within the JVM

• Each Thread can have a name

• Threads belong to Thread Pools which have a common Prefix - e.g. http-extapi-123

Page 21: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

PER-THREAD ACCOUNTING• JVM

• ManagementFactory.getThreadMXBean()

• Parfait

• ThreadMetric

• EventTimer

• EventMetricCollector.startTiming(..)

Page 22: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

PARFAIT

• StandardThreadMetrics – set of standard per-thread JVM/OS Metrics (Elapsed, CPU, Heap)

• LoggerSink – log4j output at the end of the Request cycle

Page 23: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

[2019-02-27 11:49:34,790 INFO ][it.timing.LoggerSink][tid=http-

general-246936,rid=XHXenlcxTsaBgQao63SSVwAAA-0,rgi=,ip=120.22.220.1,uid=1476736294,pid=26905] || Top

mailThreadBffController:getMailThread mailThreadBffController:getMailThread Elapsed time: own 323.622595 ms, total 323.623111 ms Total CPU: own 2.688965 ms, total 2.692129 ms User CPU: own 0.0 ms,

total 0.0 ms System CPU: own 2.774263 ms, total 2.854661 ms Heap Bytes: own 136184 By,....

Users✅Projects✅

Page 24: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

• We have the raw data & taxonomy

• Aggregate / Summaries

• Original/OldSchool: sed/grep/awk

• Modern: Sumologic

AGGREGATIONS

Page 25: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

SHORT TERM ANALYSIS

Page 26: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM
Page 27: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

Outliers✅

Page 28: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

TRENDING

PCPArchives

Page 29: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

TRENDING

• Daily sync of PCP archives to central Repo

• Extract, Transform, Load (ETL) into SQL Server

• Metric values mapped into STAR schema

• SQL Server Analysis Reporting

Page 30: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM
Page 31: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

SUMMARY

Problems PCP & Parfait Bigger Picture

Page 32: EVENT TRACING @ ACONEX · PCP Conference 2019 - Event Tracing @ Aconex Created Date: 3/4/2019 12:54:01 AM

THANK YOU