open-telemetry / opentelemetry-cpp-contrib

https://opentelemetry.io/
Apache License 2.0
121 stars 130 forks source link

nginx: It is not a main Request, not starting interaction #266

Open lework opened 1 year ago

lework commented 1 year ago

conf

NginxModuleEnabled ON;
NginxModuleOtelSpanExporter otlp;
NginxModuleOtelExporterEndpoint xxx.com:4317;
NginxModuleServiceName app;
NginxModuleServiceNamespace test;
NginxModuleServiceInstanceId app-hostname;
NginxModuleResolveBackends ON;
NginxModuleTraceAsError ON;

log

2023/03/17 10:34:31 [error] 26#26: *205 mod_opentelemetry: otel_startInteraction: It is not a main Request, not starting interaction, client: 10.130.39.184, server: default, request: "POST /test HTTP/1.1", host
: "promotion.api.ickey.cn", referrer: "test.com"
Coldilocks commented 1 year ago

I got the same error log by referring to this blog:https://opentelemetry.io/blog/2022/instrument-nginx/

nginx version: 1.18.0


[error] 80486#80486: *1 mod_opentelemetry: otel_startInteraction: It is not a main Request, not starting interaction, client: ::1, server: _, request: "GET / HTTP/1.1", host: "localhost:8080"
none0nfg commented 2 months ago

Faced the same problem