Apache HTTP Server 自动插桩

Apache HTTP Server 自动插桩可在无需手动修改代码的情况下,自动从 Apache web server 收集遥测数据。此插桩会捕获 HTTP 请求和响应信息,包括请求路径、状态码以及时间数据。

Operator 会将 OpenTelemetry Apache module 注入到 Apache HTTP Server 容器中,并自动配置该 module 将遥测数据导出到指定的后端。这使你能够了解 web server 性能和请求模式。

启用 Apache HTTP Server 插桩

要为 Apache HTTP Server 启用自动插桩,请为你的 pod 或 namespace 添加注解:

apiVersion: v1
kind: Pod
metadata:
  name: apache-server
  annotations:
    instrumentation.opentelemetry.io/inject-apache-httpd: "true"
spec:
  containers:
  - name: httpd
    image: httpd:latest

当 pod 创建时,Operator 会自动注入所需的插桩组件。

配置参考

有关详细的配置选项、参数和高级使用场景,请参阅 OpenTelemetry Operator 官方文档:

Apache HTTP Server Auto-instrumentation Documentation