Apache HTTP Server 自动监测

Apache HTTP Server 自动监测实现了从 Apache Web 服务器自动收集遥测数据,无需手动修改代码。该监测捕获 HTTP 请求和响应信息,包括请求路径、状态码和时间数据。

Operator 会将 OpenTelemetry Apache 模块注入到 Apache HTTP Server 容器中,自动配置该模块将遥测数据导出到指定的后端。这为 Web 服务器性能和请求模式提供了可见性。

启用 Apache HTTP Server 监测

要启用 Apache HTTP Server 的自动监测,请为您的 pod 或命名空间添加注解:

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