APM

开源应用程序性能监控

已经在 Elasticsearch 内存储日志和系统指标?使用 Elastic APM 将存储内容扩展至应用程序指标。只需四行代码,您即能拓宽视野,从而快速解决问题并对您推送的代码充满信心。

您是需要帮助的 Opbeat 客户吗?联系我们

Elastic APM UI 如今设有搜索框,整合了 Machine Learning 功能,针对 Ruby 和 Real User Monitoring (JavaScript) 新增了代理,并且面向 Java 和 Go 推出了公测版本。了解详情

搜索 + APM

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

Screenshot

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

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

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

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

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

收到警报,然后积极应对

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

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

Elastic APM 支持 Node.js、Python、Ruby 和 Real User Monitoring (JavaScript),而且我们正在针对包括 Java 和 Go 在内的更多编程语言进行开发。如果没有找到自己需要的内容,您可以自行构建,也可求助于开源社区

只需四行代码即可开始

使用现有集群或者从头安装 Elastic Stack,然后加快 APM 服务器的速度,接下来再添加些许代码以在您的应用上部署代理。只需完成上述步骤,即可将您的应用性能数据发送至 Elasticsearch。使用服务器端代理来跟踪您的应用程序,通过 Real User Monitoring (RUM) 收集浏览器中的任何问题。有问题或者想要调整您的安装?请访问 APM 文档,也可加入我们的 APM 论坛
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 the APM Server URL. If unspecified, 
# the agent will effectively be disabled.
export ELASTIC_APM_SERVER_URL=

# Set if APM Server requires a token.
export ELASTIC_APM_SECRET_TOKEN=
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.

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
Warning: The Java agent is currently in Beta and not meant for production use.
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、内存等。

了解详情

网站搜索

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

了解详情

安全分析

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

了解详情

应用搜索

搜索文档、地理数据等。

了解详情