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

I have followed the following documentation -to send logstracesmetrics to Grafana using openteleme

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744807162a4594845.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信