TLDR Riccardo was experiencing errors with OpenTelemetry in Actix-Server. Ashish recommended checking the data model, adjusting OTEL exporter settings, and enabling the gRPC protocol; yet, results are still not evident.
its failing because no value is set for start_time_unix_nano
ok, I'm check the data, I want to user OpenTelemetry with PHP...
sure
check this for data model
Ashish if I try with first data example, I got: ```{"code":400,"message":"Invalid json: the structure must be {\"resourceSpans\":[]}"}```
On the server now: ```[2023-10-06T12:37:34Z INFO actix_web::middleware::logger] 172.16.2.3 "POST /api/default/traces HTTP/1.1" 400 83 "447" "-" "curl/7.88.1" 0.000484```
So it's better :slightly_smiling_face:
With PHP if I set `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` I don't receive data... I don't understand what I'm doing wrong
```env OTEL_PHP_AUTOLOAD_ENABLED=true \
OTEL_METRICS_EXPORTER=none \
OTEL_LOGS_EXPORTER=none \
OTEL_SERVICE_NAME=smb \
OTEL_TRACES_EXPORTER=otlp \
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic XXXX" \
OTEL_EXPORTER_OTLP_ENDPOINT=
I'm trying with this example:
```OTEL_EXPORTER_OTLP_ENDPOINT = localhost:5081```
please note this is for non-HA deployemnet
Ok, actually I've remote host behind haproxy and I forward only port 5080
```docker run -d --name "openobserve" --volumes-from openobserve-data -e ZO_DATA_DIR="/data" -p 5080:5080 \ -e ZO_ROOT_USER_PASSWORD="XXX" \ public.ecr.aws/zinclabs/openobserve:latest```
So, I've to expose also port 5081?
yes
Ok, I'm trying...
but I need to set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc` to `grpc` correct?
yes..if you want to use grpc with proto
since you are gone forward to 5081 it has to be grpc
ok...
I've to check my configuration, because I didn't see any traces...
Riccardo
Fri, 06 Oct 2023 12:21:20 UTC```thread 'actix-server worker 2' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73 thread 'actix-server worker 3' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73 thread 'actix-server worker 0' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73 thread 'actix-server worker 1' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73 thread 'actix-server worker 2' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73 thread 'actix-server worker 3' panicked at 'called `Option::unwrap()` on a `None` value', src/service/traces/otlp_http.rs:237:73```