SCF 云产品中心提供云函数 SCF 函数调用日志的一站式采集,方便用户管理与使用,助力快速构建 SCF 访问分析的可观测性。
前提条件
功能特性
批量开启云函数日志采集。
统一云函数调用日志检索分析入口。
操作介绍
开启云函数调用日志采集
步骤一:进入 SCF 云产品中心
1. 登录 日志服务控制台。在左侧导航栏中,单击云产品中心,进入云产品中心页面。![](https://qcloudimg.tencent-cloud.cn/image/document/2a22206d3e81a95284f03977781ae30f.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/2a22206d3e81a95284f03977781ae30f.png)
2. 在云产品日志中心中,找到云函数 SCF, 并点击进入云函数 SCF 日志中心。
![](https://qcloudimg.tencent-cloud.cn/image/document/c06f4fef167d255dab72f0798ee9d336.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/c06f4fef167d255dab72f0798ee9d336.png)
步骤二:开启云函数调用日志采集
1. 在云函数列表中,找到并勾选一个或多个目标云函数。
![](https://qcloudimg.tencent-cloud.cn/image/document/19448969ca5fc40522bf9c18f48b1d4e.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/19448969ca5fc40522bf9c18f48b1d4e.png)
2. 点击开启日志采集。
![](https://qcloudimg.tencent-cloud.cn/image/document/1bf66d8861b783de37655af7475c25e5.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/1bf66d8861b783de37655af7475c25e5.png)
3. 在开启日志采集弹窗中,点击确认。
![](https://qcloudimg.tencent-cloud.cn/image/document/c647a8ec198a0594ba149556d6232846.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/c647a8ec198a0594ba149556d6232846.png)
查看云函数调用日志
1. 完成开启云函数调用日志采集后,在云函数列表中,找到已开启函数调用日志采集的云函数。
2. 点击函数调用日志所在的目标日志主题名称,跳转日志检索页,即可检索分析函数调用日志。
![](https://qcloudimg.tencent-cloud.cn/image/document/2e8ae4b276366142ee0afc6e06ac3858.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/2e8ae4b276366142ee0afc6e06ac3858.png)
关闭云函数调用日志采集
1. 在云函数列表中,找到并勾选已开启函数调用日志采集的云函数。
2. 点击关闭日志采集。
![](https://qcloudimg.tencent-cloud.cn/image/document/d804c2e631a6b1c6573b5b589b63c78b.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/d804c2e631a6b1c6573b5b589b63c78b.png)
3. 在关闭采集弹窗中,需再次确认关闭,然后点击确认即可关闭选中云函数的日志采集。
![](https://qcloudimg.tencent-cloud.cn/image/document/e5d3ab9ff4b4a827ad0b0f88dd0314c1.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/e5d3ab9ff4b4a827ad0b0f88dd0314c1.png)