nginxinc/nginx-otel

How to change the unknown_service:nginx to nginx_service

Closed this issue · 1 comments

Describe the bug

How to set the otel_service_name name; and which section I need to add in nginx configuration?

The documentation did not make it clear where to set this in the nginx configuration.
https://nginx.org/en/docs/ngx_otel_module.html#otel_trace_context

image

To reproduce

Steps to reproduce the behavior:

Run below docker-compose
Docker compose file
otel-config.yaml file
nginx.conf file

docker-compose up

call URL from browser "http://localhost:8082/api/UserRequest/add?num1=5&num2=24"

Expected behavior

In a Jaeger UI nginx service name should be shown as 'nginx_service'

Your environment

  • Version/release of this project or specific commit
  • Target deployment platform

Additional context

Please Provide me sample of otel_service_name name; in nginx.conf

The doc says it right there:

Context: http