APM

开源应用程序性能监测

已经在 Elasticsearch 中存储日志和系统指标?使用 Elastic APM 可扩展到应用程序指标。通过四行代码即可纵观全局,以便快速解决问题,并对您推送的代码充满信心。

深入了解我们以开发者为中心的 APM 解决方案。 观看视频

Java 和 Go 代理程序现在发布 GA 版本!分布式跟踪(公测版)会采集请求的完整路径,并帮助您轻松定位到瓶颈问题。 了解详情

搜索 + APM

查找并修复代码中存在的问题归根结底就是搜索。我们的专用 UI 能够让您识别瓶颈并在代码层面准确定位到存在问题的地方。因此,您能够编写更好、更高效的代码,进而帮助您加快“开发-测试-部署”周期,让您的应用程序运行更快,客户体验更佳。

Screenshot

通过分布式跟踪将所有内容整合到一起

纳闷您的请求是如何流经整个基础架构的?通过分布式跟踪将所有内容整合到一起,清晰查看您的各项服务之间的交互情况。查找路径中哪个位置发生了延时问题,然后准确定位到需加以优化的组件。

您喜爱的仪表板现在体现出 APM 的特点

Elastic APM 使您的应用程序能够将性能指标发送到 Elasticsearch,以便在预置有仪表板的 Kibana 中实现可视化。

而且由于数据在 Elasticsearch 中存储为原始文档,跟踪数据可以与基础架构日志、服务器指标和安全事件共存,方便您在一个位置浏览所有数据。

通过 Machine Learning 功能检测异常响应时间

在 APM UI 内直接创建任务。通过 Machine Learning 功能(此功能可自动对您的数据建模)查找异常行为和存在问题的部分。

收到警报,然后积极应对

我们的仪表板十分美观,但有时候您很可能还需要关注其他方面。通过我们的 Alerting 功能,随时了解代码的运行表现。可以选择在遇到问题时接收电子邮件通知,也可以选择在一切运行正常时接收 Slack 通知。

便于开发人员使用,
支持多种语言

Elastic APM 支持 Java、Go、Node.js、Python、Ruby 和 Real User Monitoring (JavaScript),未来还会支持更多编程语言。如果没有发现自己想要的,您既可自行构建,也可求助于开源社区

只需四行代码即可开始

使用现有集群或者从头安装 Elastic Stack,然后启动 APM 服务器,接下来再添加些许代码以在您的应用程序上部署代理。 只需完成上述步骤,即可将您应用程序的性能数据发送至 Elasticsearch。 使用服务器端代理来跟踪您的应用程序,通过 Real User Monitoring (RUM) 收集浏览器中的任何问题。有问题或者想要调整您的安装? 请访问 APM 文档,也可加入我们的 APM 论坛

Download the Java agent:

Download the agent jar from Maven Central. Do not add the agent as a dependency to your application.

Start your application with javaagent flag:

Add the -javaagent flag and configure the agent with system properties.

java \
 -javaagent:/.../elastic-apm-agent-<version>.jar\
 -Delastic.apm.service_name=my-application\
 -Delastic.apm.server_url=http://localhost:8200\
 -Delastic.apm.application_packages=org.example\
 -jar my-application.jar
Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM Agent for Node.js as a dependency to your application.

Configure the agent to run inside your application process.

// Add this to the VERY top of the first 
// file loaded in your app
var apm = require('elastic-apm-node').start({
  // Override service name from package.json 
  // Allowed characters: a-z, A-Z, 0-9, -, _, 
  // and space
  serviceName: '',
  
  // Use if APM Server requires a token
  secretToken: '',
  
  // Set custom APM Server URL
  // Default: http://localhost:8200
  serverUrl: ''
})
Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent for Python as a dependency.

Configure the agent.

# Add the agent to the installed apps
INSTALLED_APPS = (
   'elasticapm.contrib.django',
   #...
 
)


ELASTIC_APM = {
  # Set required service name. 
  # Allowed characters:
  # a-z, A-Z, 0-9, -, _, and space
  'SERVICE_NAME': '',

  # Use if APM Server requires a token
  'SECRET_TOKEN': '',

  # Set custom APM Server URL (
  # default: http://localhost:8200)
  #
  'SERVER_URL': '',
}
# To send performance metrics, add our tracing middleware:
MIDDLEWARE = (
   'elasticapm.contrib.django.middleware.TracingMiddleware',
   #...
)
Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent for Python as a dependency.

Configure the agent.

# initialize using environment variables 
from elasticapm.contrib.flask import ElasticAPM
app = Flask(__name__)
apm = ElasticAPM(app)

# or configure to use ELASTIC_APM in your 
# application's settings
#
from elasticapm.contrib.flask import ElasticAPM
app.config['ELASTIC_APM'] = {
  # Set required service name. 
  # Allowed characters:
  # a-z, A-Z, 0-9, -, _, and space
  'SERVICE_NAME': '',

  # Use if APM Server requires a token
  'SECRET_TOKEN': '',

  # Set custom APM Server URL (
  # default: http://localhost:8200)
  #
  'SERVER_URL': '',
}
apm = ElasticAPM(app) 
Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent by adding the agent to your Gemfile

Configure the agent by creating the config file config/elastic_apm.yml

# Set service name - allowed characters: 
# a-z, A-Z, 0-9, -, _ and space
# Defaults to the name of your Rails app
# service_name: 'my-service'

# Use if APM Server requires a token
#
# secret_token: ''

# Set custom APM Server URL (
# default: http://localhost:8200)
#
# server_url: 'http://localhost:8200'
Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent by adding the agent to your Gemfile

Configure the agent by creating the config file config/elastic_apm.yml

# Set service name - allowed characters: 
# a-z, A-Z, 0-9, -, _ and space
#
# Defaults to the name of your Rails app
# service_name: 'my-service'

# Use if APM Server requires a token
#
# secret_token: ''

# Set custom APM Server URL (
# default: http://localhost:8200)
#
# server_url: 'http://localhost:8200'

Initialize the agent by including the middleware in your app and start the agent. Rack or compatible frameworks (like Sinatra):

# config.ru
  require 'sinatra/base'

  class MySinatraApp < Sinatra::Base
    use ElasticAPM::Middleware

    # ...
  end

  ElasticAPM.start(
    app: MySinatraApp, # required
    config_file: '' # optional
  )

  run MySinatraApp

  at_exit { ElasticAPM.stop }

Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent for JavaScript as a dependency to your application:

Configure the agent:

import { init as initApm } from 'elastic-apm-js-base'
var apm = initApm({

  // Set required service name 
  // (allowed characters: a-z, A-Z, 0-9, -, _, 
  // and space)
  serviceName: '',

  // Set custom APM Server URL (
  // default: http://localhost:8200)
  serverUrl: '',

  // Set service version (required for sourcemap 
  // feature)
  serviceVersion: ''
})

Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

Install the APM agent packages for Go.

Configure the agent:

# Set the service name. Allowed characters: 
# a-z, A-Z, 0-9, -, _, and space.
# If ELASTIC_APM_SERVICE_NAME is not specified,
# the executable name will be used.
export ELASTIC_APM_SERVICE_NAME=

# Set custom APM Server URL 
# (default: http://localhost:8200)
export ELASTIC_APM_SERVER_URL=

# Set if APM Server requires a token.
export ELASTIC_APM_SECRET_TOKEN=

Instrument your Go application by using one of the provided instrumentation modules or by using the tracer API directly:

import (
 "net/http"

 "go.elastic.co/apm/module/apmhttp"
)

func main() {
 mux := http.NewServeMux()
 ...
 http.ListenAndServe(":8080", apmhttp.Wrap(mux))
}

See the documentation for a detailed guide to instrumenting Go source code.

Open browser @
Launch the APM app OR navigate to the APM-* dashboards
What just happened?

The APM agent installed in your application collects and streams application performance metrics to your APM server, where they are processed and stored in Elasticsearch. In a matter of minutes you can start viewing your performance data either in the dedicated APM UI or prebuilt dashboards.

Advanced configuration?

Please refer to the APM documentation.

APM 只是对数据进行切片的一种方法

发生了安全事件?是网站还是服务器日志?亦或是包含大量文本的文档?将所有这些集中进 Elastic Stack,以扩展您的分析范围,降低运营成本,更大程度上丰富您的用例。

日志分析

快速、可扩展的日志记录分析。

了解详情

指标分析

数字统计:CPU、内存等。

了解详情

网站搜索

为您的站点轻松创建良好的搜索体验。

了解详情

安全分析

快速且规模化的交互式调查。

了解详情

应用搜索

搜索文档、地理数据等。

了解详情