三人行必有我师
APM

APM

APM(二):监控 Python 服务

EasysearchINFINI Labs 小助手 发表了文章 • 0 个评论 • 33 次浏览 • 3 小时前 • 来自相关话题

上一篇我们已经安装好了 Skywalking 和 Easysearch,这次我们来写个简单的 Python 服务,并把它的服务调用信息发送给 Skywalking,通过 Skywalking 的 Web UI 进行展示。

启动后端服务

先启动好后端服务,包括 Skywalking 和 Easysearch。启动完成后能通过 Web UI 访问 Skywalking。

构建 Python 服务

我们编写一个简单的 Flask 服务程序,只要访问 localhost:8081/a 就会返回 "Hello, I'm Service A!" 信息。

from flask import Flask

app = Flask(__name__)

@app.route('/a', methods=['GET'])

def service_b():
    return "Hello, I'm Service A!"

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8081)

运行前,要安装好依赖。

pip3 install flask
pip3 install apache-skywalking

依赖关系展示如下:

设置环境变量

为了让服务能成功把相关信息发送到 Skywalking 后端,启动前我们还要设置两个环境变量告诉服务程序该往哪里发送信息。

export SW_AGENT_COLLECTOR_BACKEND_SERVICES=localhost:11800
export SW_AGENT_NAME=AService-python

启动 Python 程序

一切准备妥当后,运行我们的服务程序。

sw-python run python3 AService.py

程序启动后会监听 8081 端口。

我们通过浏览器访问下。

在 Skywalking 的 Web UI 上查看服务的信息是否采集到。

可以看到服务 A 的调用信息都已经被记录到 Skywalking 中了。

作者:杨帆,极限科技(INFINI Labs)高级解决方案架构师、《老杨玩搜索》栏目 B 站 UP 主,拥有十余年金融行业服务工作经验,熟悉 Linux、数据库、网络等领域。目前主要从事 Easysearch、Elasticsearch 等搜索引擎的技术支持工作,服务国内私有化部署的客户。

社区日报 第1398期 (2022-05-18)

社区日报kin122 发表了文章 • 0 个评论 • 1898 次浏览 • 2022-05-18 12:35 • 来自相关话题

1. Elasticsearch ILM 索引生命周期管理常见坑及避坑指南 https://blog.csdn.net/laoyang3 ... 31708 2. Elasticsearch — 写入和搜索优化建议(需要梯子) https://db-universe.medium.com ... e5259 3. elasticsearch APM 优化(需要梯子) https://medium.com/squad-engin ... 8bed5 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup B站:https://ela.st/bilibili
1. Elasticsearch ILM 索引生命周期管理常见坑及避坑指南 https://blog.csdn.net/laoyang3 ... 31708 2. Elasticsearch — 写入和搜索优化建议(需要梯子) https://db-universe.medium.com ... e5259 3. elasticsearch APM 优化(需要梯子) https://medium.com/squad-engin ... 8bed5 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup B站:https://ela.st/bilibili

社区日报 第1362期 (2021-03-30)

社区日报kin122 发表了文章 • 0 个评论 • 1829 次浏览 • 2022-03-30 09:46 • 来自相关话题

1. Elastic Stack最佳实践:7.10.1与7.14.2的性能比较 https://cloud.tencent.com/deve ... 59814 2. Elasticsearch:如何提高查询性能 https://elasticstack.blog.csdn ... 13496 3. Elastic APM:在全量和采样中寻找平衡 https://cloud.tencent.com/deve ... 64413 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup
1. Elastic Stack最佳实践:7.10.1与7.14.2的性能比较 https://cloud.tencent.com/deve ... 59814 2. Elasticsearch:如何提高查询性能 https://elasticstack.blog.csdn ... 13496 3. Elastic APM:在全量和采样中寻找平衡 https://cloud.tencent.com/deve ... 64413 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup

spring boot项目集成apm部署到docker后启动报错

回复

ElasticsearchRicardo_hx 发起了问题 • 1 人关注 • 0 个回复 • 2764 次浏览 • 2021-01-04 14:58 • 来自相关话题

尝鲜Kibana7.6.1启动报错(Elastic APM initialization error),有人遇到过吗,

Kibanazqc0512 回复了问题 • 2 人关注 • 1 个回复 • 5338 次浏览 • 2020-04-27 09:40 • 来自相关话题

elastic APM 怎么监控elasticsearch 怎么配置这玩意?

Elasticsearchzqc0512 回复了问题 • 3 人关注 • 4 个回复 • 4271 次浏览 • 2020-04-17 09:13 • 来自相关话题

apm 不支持websphere application server 9

回复

Beatsinternetafei 回复了问题 • 1 人关注 • 1 个回复 • 2214 次浏览 • 2019-05-27 13:45 • 来自相关话题

APM 链路追踪

Elasticsearchwajika 回复了问题 • 4 人关注 • 1 个回复 • 3825 次浏览 • 2019-04-23 11:17 • 来自相关话题

apm-server的javaagent的application_packages是什么意思?

默认分类rochy 回复了问题 • 3 人关注 • 1 个回复 • 4677 次浏览 • 2019-02-12 22:12 • 来自相关话题

APM server 启动后只有 IPV6 生效

默认分类zqc0512 回复了问题 • 3 人关注 • 2 个回复 • 3474 次浏览 • 2018-09-05 14:25 • 来自相关话题

Elastic 收购 Opbeat,进入 APM 领域

资讯动态medcl 发表了文章 • 2 个评论 • 5199 次浏览 • 2017-06-23 10:53 • 来自相关话题

IMG_7227.PNG
IMG_7226.JPG
IMG_7224.JPG
  https://www.elastic.co/blog/we ... amily https://techcrunch.com/2017/06 ... tion/     Today, at Elastic’s customer event in London, the company announced it has acquired Opbeat, a SaaS-application performance management vendor for an undisclosed amount. All 15 employees have already joined the Elastic team. Opbeat focuses on monitoring applications written in Javascript. What’s more, it maps production application issues directly to the relevant developer source code, making it easier to fix the problem without having to hunt in the code to find the problem area. Elastic is probably best known for its search product, Elasticsearch, an open source search tool that runs on some of the world’s biggest properties including Wikipedia, Yelp and eBay. In recent years, the company has moved beyond straight search and into analytics, particularly focusing on log data that puts them squarely in competition with companies like Splunk. Last year, it pulled all of the products together into a platform play they called Elastic Stack. Elastic CEO Shay Banon sees today’s acquisition through a strategic lens, giving his company a leg up on the competition by offering not only a way to search log data, but also giving insights into the applications that are generating the data and why they may be performing poorly. Rasmus Makwarth, who was CEO at Opbeat says joining Elastic allows the company to speed up the product roadmap and take advantage of the breadth of the Elastic platform. “We’ve been running a SaaS platform for some time now, giving application insights to developers, but haven’t been able to give customers insight into the entire application,” he explained. Joining Elastic lets his company take advantage of the search tool, as well as analytics, logging and data visualization available on the Elastic platform to greatly expand the vision. Opbeat’s employees have already joined Elastic and are working with the Elastic team to build an on-prem application to go with the existing SaaS piece. Banon said that the company hopes to take advantage of Opbeat’s cloud background to expand its cloud offerings. Taking a cloud-native application and engineering it to be on-prem is no simple task, but the two companies hope to have an on-prem version ready in several month. It’s worth noting that Opbeat was using Elasticsearch in its product, but as Banon pointed out using a product and making it part of the stack are two different matters, and it will take a significant engineering effort to incorporate the new company into the fold as both a cloud and on-prem product. You may recall that Cisco bought APM vendor AppDynamics earlier this year for $3.7 billion right before the company was about to IPO. While Banon wouldn’t reveal today’s purchase price, he joked that it was substantially less than that. Given that Opbeat was founded in 2013 in Copenhagen, Denmark and has raised approximately $2.8 million, that’s a fair bet. The company will remain in Denmark.

spring boot项目集成apm部署到docker后启动报错

回复

ElasticsearchRicardo_hx 发起了问题 • 1 人关注 • 0 个回复 • 2764 次浏览 • 2021-01-04 14:58 • 来自相关话题

尝鲜Kibana7.6.1启动报错(Elastic APM initialization error),有人遇到过吗,

回复

Kibanazqc0512 回复了问题 • 2 人关注 • 1 个回复 • 5338 次浏览 • 2020-04-27 09:40 • 来自相关话题

elastic APM 怎么监控elasticsearch 怎么配置这玩意?

回复

Elasticsearchzqc0512 回复了问题 • 3 人关注 • 4 个回复 • 4271 次浏览 • 2020-04-17 09:13 • 来自相关话题

apm 不支持websphere application server 9

回复

Beatsinternetafei 回复了问题 • 1 人关注 • 1 个回复 • 2214 次浏览 • 2019-05-27 13:45 • 来自相关话题

APM 链路追踪

回复

Elasticsearchwajika 回复了问题 • 4 人关注 • 1 个回复 • 3825 次浏览 • 2019-04-23 11:17 • 来自相关话题

apm-server的javaagent的application_packages是什么意思?

回复

默认分类rochy 回复了问题 • 3 人关注 • 1 个回复 • 4677 次浏览 • 2019-02-12 22:12 • 来自相关话题

APM server 启动后只有 IPV6 生效

回复

默认分类zqc0512 回复了问题 • 3 人关注 • 2 个回复 • 3474 次浏览 • 2018-09-05 14:25 • 来自相关话题

APM(二):监控 Python 服务

EasysearchINFINI Labs 小助手 发表了文章 • 0 个评论 • 33 次浏览 • 3 小时前 • 来自相关话题

上一篇我们已经安装好了 Skywalking 和 Easysearch,这次我们来写个简单的 Python 服务,并把它的服务调用信息发送给 Skywalking,通过 Skywalking 的 Web UI 进行展示。

启动后端服务

先启动好后端服务,包括 Skywalking 和 Easysearch。启动完成后能通过 Web UI 访问 Skywalking。

构建 Python 服务

我们编写一个简单的 Flask 服务程序,只要访问 localhost:8081/a 就会返回 "Hello, I'm Service A!" 信息。

from flask import Flask

app = Flask(__name__)

@app.route('/a', methods=['GET'])

def service_b():
    return "Hello, I'm Service A!"

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8081)

运行前,要安装好依赖。

pip3 install flask
pip3 install apache-skywalking

依赖关系展示如下:

设置环境变量

为了让服务能成功把相关信息发送到 Skywalking 后端,启动前我们还要设置两个环境变量告诉服务程序该往哪里发送信息。

export SW_AGENT_COLLECTOR_BACKEND_SERVICES=localhost:11800
export SW_AGENT_NAME=AService-python

启动 Python 程序

一切准备妥当后,运行我们的服务程序。

sw-python run python3 AService.py

程序启动后会监听 8081 端口。

我们通过浏览器访问下。

在 Skywalking 的 Web UI 上查看服务的信息是否采集到。

可以看到服务 A 的调用信息都已经被记录到 Skywalking 中了。

作者:杨帆,极限科技(INFINI Labs)高级解决方案架构师、《老杨玩搜索》栏目 B 站 UP 主,拥有十余年金融行业服务工作经验,熟悉 Linux、数据库、网络等领域。目前主要从事 Easysearch、Elasticsearch 等搜索引擎的技术支持工作,服务国内私有化部署的客户。

社区日报 第1398期 (2022-05-18)

社区日报kin122 发表了文章 • 0 个评论 • 1898 次浏览 • 2022-05-18 12:35 • 来自相关话题

1. Elasticsearch ILM 索引生命周期管理常见坑及避坑指南 https://blog.csdn.net/laoyang3 ... 31708 2. Elasticsearch — 写入和搜索优化建议(需要梯子) https://db-universe.medium.com ... e5259 3. elasticsearch APM 优化(需要梯子) https://medium.com/squad-engin ... 8bed5 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup B站:https://ela.st/bilibili
1. Elasticsearch ILM 索引生命周期管理常见坑及避坑指南 https://blog.csdn.net/laoyang3 ... 31708 2. Elasticsearch — 写入和搜索优化建议(需要梯子) https://db-universe.medium.com ... e5259 3. elasticsearch APM 优化(需要梯子) https://medium.com/squad-engin ... 8bed5 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup B站:https://ela.st/bilibili

社区日报 第1362期 (2021-03-30)

社区日报kin122 发表了文章 • 0 个评论 • 1829 次浏览 • 2022-03-30 09:46 • 来自相关话题

1. Elastic Stack最佳实践:7.10.1与7.14.2的性能比较 https://cloud.tencent.com/deve ... 59814 2. Elasticsearch:如何提高查询性能 https://elasticstack.blog.csdn ... 13496 3. Elastic APM:在全量和采样中寻找平衡 https://cloud.tencent.com/deve ... 64413 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup
1. Elastic Stack最佳实践:7.10.1与7.14.2的性能比较 https://cloud.tencent.com/deve ... 59814 2. Elasticsearch:如何提高查询性能 https://elasticstack.blog.csdn ... 13496 3. Elastic APM:在全量和采样中寻找平衡 https://cloud.tencent.com/deve ... 64413 编辑:kin122 归档:https://ela.st/cn-daily-all 订阅:https://ela.st/cn-daily-sub 沙龙:https://ela.st/cn-meetup

Elastic 收购 Opbeat,进入 APM 领域

资讯动态medcl 发表了文章 • 2 个评论 • 5199 次浏览 • 2017-06-23 10:53 • 来自相关话题

IMG_7227.PNG
IMG_7226.JPG
IMG_7224.JPG
  https://www.elastic.co/blog/we ... amily https://techcrunch.com/2017/06 ... tion/     Today, at Elastic’s customer event in London, the company announced it has acquired Opbeat, a SaaS-application performance management vendor for an undisclosed amount. All 15 employees have already joined the Elastic team. Opbeat focuses on monitoring applications written in Javascript. What’s more, it maps production application issues directly to the relevant developer source code, making it easier to fix the problem without having to hunt in the code to find the problem area. Elastic is probably best known for its search product, Elasticsearch, an open source search tool that runs on some of the world’s biggest properties including Wikipedia, Yelp and eBay. In recent years, the company has moved beyond straight search and into analytics, particularly focusing on log data that puts them squarely in competition with companies like Splunk. Last year, it pulled all of the products together into a platform play they called Elastic Stack. Elastic CEO Shay Banon sees today’s acquisition through a strategic lens, giving his company a leg up on the competition by offering not only a way to search log data, but also giving insights into the applications that are generating the data and why they may be performing poorly. Rasmus Makwarth, who was CEO at Opbeat says joining Elastic allows the company to speed up the product roadmap and take advantage of the breadth of the Elastic platform. “We’ve been running a SaaS platform for some time now, giving application insights to developers, but haven’t been able to give customers insight into the entire application,” he explained. Joining Elastic lets his company take advantage of the search tool, as well as analytics, logging and data visualization available on the Elastic platform to greatly expand the vision. Opbeat’s employees have already joined Elastic and are working with the Elastic team to build an on-prem application to go with the existing SaaS piece. Banon said that the company hopes to take advantage of Opbeat’s cloud background to expand its cloud offerings. Taking a cloud-native application and engineering it to be on-prem is no simple task, but the two companies hope to have an on-prem version ready in several month. It’s worth noting that Opbeat was using Elasticsearch in its product, but as Banon pointed out using a product and making it part of the stack are two different matters, and it will take a significant engineering effort to incorporate the new company into the fold as both a cloud and on-prem product. You may recall that Cisco bought APM vendor AppDynamics earlier this year for $3.7 billion right before the company was about to IPO. While Banon wouldn’t reveal today’s purchase price, he joked that it was substantially less than that. Given that Opbeat was founded in 2013 in Copenhagen, Denmark and has raised approximately $2.8 million, that’s a fair bet. The company will remain in Denmark.