最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Opentelemetry Collector isn't able to send PHP application logsmetricstraces to Grafana - Stack Overflow

programmeradmin4浏览0评论

I have followed the following documentation - / to send logs/traces/metrics to Grafana using opentelemetry-collector from a php application and verified the changes. I have also checked the connectivity of the php-application and otel-collector by sending sample trace/log, which showed partialSuccess{} on sending successfully and can see the sample trace/log in Grafana as well which verifies the connectivity. But it is not able to show the actual logs/traces/metrics.

I am sure that the otel-collector config added is correct because we are able to see the data from a java application which was configured from - /

From the above zero-code/php/ configuration, we have installed the packages from Linux/PECL in our base docker image as per the documentation and installed SDKs in the main image using this base image and have added the Environment configuration in OKD deployment of the php-application as part of env, shown as below -

env:
 - name: IMAGE
   value: >-
     <image>
 - name: OTEL_PHP_AUTOLOAD_ENABLED
   value: 'true'
 - name: OTEL_SERVICE_NAME
   value: php-application
 - name: OTEL_TRACES_EXPORTER
   value: otlp
 - name: OTEL_METRICS_EXPORTER
   value: otlp
 - name: OTEL_LOGS_EXPORTER
   value: otlp
 - name: OTEL_EXPORTER_OTLP_PROTOCOL
   value: http/protobuf
 - name: OTEL_EXPORTER_OTLP_ENDPOINT
   value: '<otel-collector-service-url>:4318'
 - name: OTEL_PROPAGATORS
   value: 'baggage,tracecontext'

Also, seeing this weird warning in the pod of the php deployment $ php -m | grep opentelemetry PHP Warning: Module "opentelemetry" is already loaded in Unknown on line 0 opentelemetry

Can someone point out if anything that is done is wrong or any config changes required in the app side?

发布评论

评论列表(0)

  1. 暂无评论