Use the AppDynamics SDK to integrate
with your Applications
Stefan Marx
Director Solution Architecture, AppDynamics
APPDYNAMICS CONFIDENTIAL AND PROPRIETARY 2
Notice
The information and materials included in this presentation (collectively, the
“Materials”) are the proprietary information of AppDynamics, Inc. (“AppDynamics” or
the “Company”). No part of the Materials may be reproduced, distributed,
communicated or displayed in any form or by any means, or used to make any
derivative work, without prior written permission from AppDynamics.
The Materials may contain product roadmap information of AppDynamics.
AppDynamics reserves the right to change any product roadmap information at any
time, for any reason and without notice. This information is intended to outline
AppDynamics' general product direction, it is not a guarantee of future product
features, and it should not be relied on in making a purchasing decision. The
development, release, and timing of any features or functionality described for
AppDynamics' products remains at AppDynamics' sole discretion. AppDynamics
reserves the right to change any planned features at any time before making them
generally available as well as never making them generally available.
All third-party trademarks, including names, logos and brands, referenced by
AppDynamics in this presentation are property of their respective owners. All
references to third-party trademarks are for identification purposes only and shall be
considered nominative fair use under trademark law. © 2016 AppDynamics, Inc. All
rights reserved.
Bio {
age: 42,
apm_since: 2007,
appdynamics_since: 2013,
role: “Director Solution Architecture”,
region: “EMEA”,
country: “Germany”,
history: [
“Java Developer”,
“Agile and technology Coach”,
“Product Manager”
],
hobbies: [“photography”,”technology”,
”electronics”,”programming languages”,
“reading”,”kids&Family”]
}
AppDynamics SDK
While agent configurationis
great and flexible, sometimes custom use of API and
SDK provided by AppDynamics unlocks paths
for better Integration !
AppDynamics Confidential and Proprietary 5
REST
API
Events
{
use: [
“data”,
“automation”,
“configuration”
],
audience: [
“report”,
“external Tool”,
“developer”
],
Tools: [
“curl”,
“bash scripting”,
“java”,
”python”,
“groovy”
]
}
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
{
use: [
“alerts”,
“integration”,
“automation”
],
audience: [
“process”,
“incident Mngmt”,
“devops”
],
Tools: [
“bash”,
“html/http”,
“extension”
]
}
UC: Data Export
AppDynamics Confidential and Proprietary 6
JSON Data
XML Stream
curl -X GET
"http://controller.appdynamics.com/controller/r
est/applications/ECommerce/metric-data?..."
Curl
ADQLResult res = connection.query()
.withADQL("select series(eventTimestamp, '10m') as tsAgg," +
"count(*) as cc FROM mobile_session_record")
.withStart(start.getTime())
.execute(true);
Adql
String q = "export aggregated 'Average Response Time
(ms)' from " +
"'Business Transaction Performance'." +
"'Business Transactions'." +
"* as tier . * as transaction " +
"on Application 'Fulfillment' for 1 day";
executeQuery(q,new TableDataPrinter(),"TABLE");
Custom Metric Framework
UC: Application Flowmap
AppDynamics Confidential and Proprietary 7
UC: Flow map Export
AppDynamics Confidential and Proprietary 8
UC: Remedation & Alerts
AppDynamics Confidential and Proprietary 9
for ( HREvent event : events ) {
// Send any new event
if (event.isNew()) {
alertIntegration.send(event)
}
if (event.isUpdate()) {
alertIntegration.update(event.uuid, event)
}
// Send Memory Event
if (event.healthrule == “Memory Alert”) {
node.executeScript(“restartVM.sh”)
}
}
Controller Health rules & Policies
Alert Receiver
SNMP
Mail
HTTP
Machine Agent
Agent Communication
API
AppDynamics Confidential and Proprietary10
Why use API at all ?
AppDynamics Confidential and Proprietary 11
Modern Application
often are build based
on cascading
frameworks and use
heavily customized
and tuned
communication
protocols.
AppDynamics Confidential and Proprietary 12
Sometimes Integration with AppDynamics Agents via Agent API is
the best option to ensure a tight integration with custom Code that
will work anywhere even without specific configuration. This is
particular useful whenever a common (in house) Framework is
used in many different applications !
API usage & capabilities
AppDynamics Confidential and Proprietary13
AppDynamics Confidential and Proprietary 14
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Start and correlate
Transactions
• Mainly used for custom Frameworks or complex BT Naming
decisions.
• Will be packaged with Framework and enable “OOTB” support.
• Similar to POJO BT Detection.
• Especially important for PHP and Python Libraries that are not
supported by the OOTB Agent.
• Transaction Correlation in Custom Communication channels.
• Custom Correlation is possible in Java/.Net but need accessible
Payload location.
• Custom Correlation via API call doesn’t require any special Agent
configuration
AppDynamics Confidential and Proprietary 15
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Detect Exit Points
• Detect and declare custom exit points.
• Useful for Frameworks that do declare non-standard communication
Channels or Methods
• pooled-async communications
• Binary transmission channels
• Framework can declare exit point, properties and error status
AppDynamics Confidential and Proprietary 16
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Send Events / Metrics
• Sending direct metrics is very useful whenever MIDC’s can not
directly access the Metrics in a numeric format.
• No Configuration is needed on the Controller to support those
metrics.
• Complex decision process is possible, allowing only sending metrics
based on current application state.
• Sending direct Events can flag specific POI or trigger additional
behavior. This might not be possible outside of the current
Application State.
• Sending direct custom metrics and Events is supported for Java only.
Other technologies can use local Machine Agent listening port for
metrics and event rest call for events
Sample Metric and Event Chain
AppDynamics Confidential and Proprietary 17
Load Manager
Load Bots
Step 1
Step 2
Step 3
Step 4
• Load Manager will send new Event whenever new Step is reached!
• Frontend will send number of active Processing nodes as Metric
• Frontend will send event when a Failover or auto scale happens
• Frontend-events and Load-increase-events will start
Diagnostic Session on Frontend Component
Frontend
Processing
Warehouse
Audit
AppDynamics Confidential and Proprietary 18
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Add Diagnostic
Information
• Snapshot Information can be added based on current Application
State.
• Similar to Method Invocation Data Collectors (MIDC)
When to use API:
• Information might be hard to reach or needs to be constructed on the
fly.
• Information will be required in all Application using this framework.
• Information retrieval might be version specific, multiple versions
might be in use at the same time.
AppDynamics Confidential and Proprietary 19
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Retrieve current
Transaction
Information
• Retrieve current transaction ID and Information
• Very useful to enhance logfiles and other Information
Writes Log Lines that include
Transaction and Execution UUID
Log Monitoring
Analytics Agent captures Logfiles
and extracts Transaction UUIDs
AppDynamics User
Use correlated information in debug
sessions and problem management
AppDynamics Confidential and Proprietary 20
API
{
use: [
“data”,
“correlation”,
“embed”
],
audience: [
“developer”
],
Languages: [
“Java”,
“PHP”,
“Python”,
”Node.js”,
“C/C++”,
“mobile
]
}
Start and correlate
Transactions
Send Events / Metrics
Add Diagnostic
Information
Retrieve current
Transaction
Information
Java
Detect Exit points
PHP/Python Node.JS C/C++ Mobile
P
P
P
N/A
N/A
AppDynamics Confidential and Proprietary 21
Using AppDynamics Agent APIs allows tight integration especially
with custom frameworks and reusable components that are
part of multiple monitored Application. It allows Developer to gain
direct and full access about data formats and content and prevents
missing configuration and misinterpreted Results.
Using AppDynamics Rest API features allows DevOps to control,
automate and manage large scale AppDynamics implementations.
It allows rich data export and will enable tight integration of
AppDynamics in Alert and Incident Management procedures.
Using these advanced features will transform
reactive troubleshooting to proactive Monitoring.
Please give us your feedback—Session T6097
• Complete the online survey you'll receive via
email later today or via text at:
Text this number: 878787
Text this word: APPSPHERE
• Every time you submit a session survey, your
name will be entered in a random drawing.
We're giving away Amazon Echos
to 5 lucky winners!
• Thank you for your input
APPDYNAMICS CONFIDENTIAL AND PROPRIETARY 22
Win!
Thank you

Use AppDynamics SDK to Integrate with your Applications - AppSphere16

  • 1.
    Use the AppDynamicsSDK to integrate with your Applications Stefan Marx Director Solution Architecture, AppDynamics
  • 2.
    APPDYNAMICS CONFIDENTIAL ANDPROPRIETARY 2 Notice The information and materials included in this presentation (collectively, the “Materials”) are the proprietary information of AppDynamics, Inc. (“AppDynamics” or the “Company”). No part of the Materials may be reproduced, distributed, communicated or displayed in any form or by any means, or used to make any derivative work, without prior written permission from AppDynamics. The Materials may contain product roadmap information of AppDynamics. AppDynamics reserves the right to change any product roadmap information at any time, for any reason and without notice. This information is intended to outline AppDynamics' general product direction, it is not a guarantee of future product features, and it should not be relied on in making a purchasing decision. The development, release, and timing of any features or functionality described for AppDynamics' products remains at AppDynamics' sole discretion. AppDynamics reserves the right to change any planned features at any time before making them generally available as well as never making them generally available. All third-party trademarks, including names, logos and brands, referenced by AppDynamics in this presentation are property of their respective owners. All references to third-party trademarks are for identification purposes only and shall be considered nominative fair use under trademark law. © 2016 AppDynamics, Inc. All rights reserved.
  • 3.
    Bio { age: 42, apm_since:2007, appdynamics_since: 2013, role: “Director Solution Architecture”, region: “EMEA”, country: “Germany”, history: [ “Java Developer”, “Agile and technology Coach”, “Product Manager” ], hobbies: [“photography”,”technology”, ”electronics”,”programming languages”, “reading”,”kids&Family”] }
  • 4.
    AppDynamics SDK While agentconfigurationis great and flexible, sometimes custom use of API and SDK provided by AppDynamics unlocks paths for better Integration !
  • 5.
    AppDynamics Confidential andProprietary 5 REST API Events { use: [ “data”, “automation”, “configuration” ], audience: [ “report”, “external Tool”, “developer” ], Tools: [ “curl”, “bash scripting”, “java”, ”python”, “groovy” ] } { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } { use: [ “alerts”, “integration”, “automation” ], audience: [ “process”, “incident Mngmt”, “devops” ], Tools: [ “bash”, “html/http”, “extension” ] }
  • 6.
    UC: Data Export AppDynamicsConfidential and Proprietary 6 JSON Data XML Stream curl -X GET "http://controller.appdynamics.com/controller/r est/applications/ECommerce/metric-data?..." Curl ADQLResult res = connection.query() .withADQL("select series(eventTimestamp, '10m') as tsAgg," + "count(*) as cc FROM mobile_session_record") .withStart(start.getTime()) .execute(true); Adql String q = "export aggregated 'Average Response Time (ms)' from " + "'Business Transaction Performance'." + "'Business Transactions'." + "* as tier . * as transaction " + "on Application 'Fulfillment' for 1 day"; executeQuery(q,new TableDataPrinter(),"TABLE"); Custom Metric Framework
  • 7.
    UC: Application Flowmap AppDynamicsConfidential and Proprietary 7
  • 8.
    UC: Flow mapExport AppDynamics Confidential and Proprietary 8
  • 9.
    UC: Remedation &Alerts AppDynamics Confidential and Proprietary 9 for ( HREvent event : events ) { // Send any new event if (event.isNew()) { alertIntegration.send(event) } if (event.isUpdate()) { alertIntegration.update(event.uuid, event) } // Send Memory Event if (event.healthrule == “Memory Alert”) { node.executeScript(“restartVM.sh”) } } Controller Health rules & Policies Alert Receiver SNMP Mail HTTP Machine Agent Agent Communication
  • 10.
  • 11.
    Why use APIat all ? AppDynamics Confidential and Proprietary 11 Modern Application often are build based on cascading frameworks and use heavily customized and tuned communication protocols.
  • 12.
    AppDynamics Confidential andProprietary 12 Sometimes Integration with AppDynamics Agents via Agent API is the best option to ensure a tight integration with custom Code that will work anywhere even without specific configuration. This is particular useful whenever a common (in house) Framework is used in many different applications !
  • 13.
    API usage &capabilities AppDynamics Confidential and Proprietary13
  • 14.
    AppDynamics Confidential andProprietary 14 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Start and correlate Transactions • Mainly used for custom Frameworks or complex BT Naming decisions. • Will be packaged with Framework and enable “OOTB” support. • Similar to POJO BT Detection. • Especially important for PHP and Python Libraries that are not supported by the OOTB Agent. • Transaction Correlation in Custom Communication channels. • Custom Correlation is possible in Java/.Net but need accessible Payload location. • Custom Correlation via API call doesn’t require any special Agent configuration
  • 15.
    AppDynamics Confidential andProprietary 15 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Detect Exit Points • Detect and declare custom exit points. • Useful for Frameworks that do declare non-standard communication Channels or Methods • pooled-async communications • Binary transmission channels • Framework can declare exit point, properties and error status
  • 16.
    AppDynamics Confidential andProprietary 16 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Send Events / Metrics • Sending direct metrics is very useful whenever MIDC’s can not directly access the Metrics in a numeric format. • No Configuration is needed on the Controller to support those metrics. • Complex decision process is possible, allowing only sending metrics based on current application state. • Sending direct Events can flag specific POI or trigger additional behavior. This might not be possible outside of the current Application State. • Sending direct custom metrics and Events is supported for Java only. Other technologies can use local Machine Agent listening port for metrics and event rest call for events
  • 17.
    Sample Metric andEvent Chain AppDynamics Confidential and Proprietary 17 Load Manager Load Bots Step 1 Step 2 Step 3 Step 4 • Load Manager will send new Event whenever new Step is reached! • Frontend will send number of active Processing nodes as Metric • Frontend will send event when a Failover or auto scale happens • Frontend-events and Load-increase-events will start Diagnostic Session on Frontend Component Frontend Processing Warehouse Audit
  • 18.
    AppDynamics Confidential andProprietary 18 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Add Diagnostic Information • Snapshot Information can be added based on current Application State. • Similar to Method Invocation Data Collectors (MIDC) When to use API: • Information might be hard to reach or needs to be constructed on the fly. • Information will be required in all Application using this framework. • Information retrieval might be version specific, multiple versions might be in use at the same time.
  • 19.
    AppDynamics Confidential andProprietary 19 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Retrieve current Transaction Information • Retrieve current transaction ID and Information • Very useful to enhance logfiles and other Information Writes Log Lines that include Transaction and Execution UUID Log Monitoring Analytics Agent captures Logfiles and extracts Transaction UUIDs AppDynamics User Use correlated information in debug sessions and problem management
  • 20.
    AppDynamics Confidential andProprietary 20 API { use: [ “data”, “correlation”, “embed” ], audience: [ “developer” ], Languages: [ “Java”, “PHP”, “Python”, ”Node.js”, “C/C++”, “mobile ] } Start and correlate Transactions Send Events / Metrics Add Diagnostic Information Retrieve current Transaction Information Java Detect Exit points PHP/Python Node.JS C/C++ Mobile P P P N/A N/A
  • 21.
    AppDynamics Confidential andProprietary 21 Using AppDynamics Agent APIs allows tight integration especially with custom frameworks and reusable components that are part of multiple monitored Application. It allows Developer to gain direct and full access about data formats and content and prevents missing configuration and misinterpreted Results. Using AppDynamics Rest API features allows DevOps to control, automate and manage large scale AppDynamics implementations. It allows rich data export and will enable tight integration of AppDynamics in Alert and Incident Management procedures. Using these advanced features will transform reactive troubleshooting to proactive Monitoring.
  • 22.
    Please give usyour feedback—Session T6097 • Complete the online survey you'll receive via email later today or via text at: Text this number: 878787 Text this word: APPSPHERE • Every time you submit a session survey, your name will be entered in a random drawing. We're giving away Amazon Echos to 5 lucky winners! • Thank you for your input APPDYNAMICS CONFIDENTIAL AND PROPRIETARY 22 Win!
  • 23.