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?