Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown directive "otel_resource_attr" #88

Open
minimAluminiumalism opened this issue Jan 21, 2025 · 0 comments
Open

unknown directive "otel_resource_attr" #88

minimAluminiumalism opened this issue Jan 21, 2025 · 0 comments

Comments

@minimAluminiumalism
Copy link

Describe the bug

nginx-otel dosesn't support otel_resource_attr.

To reproduce

I tested nginx-otel on docker image docker pull nginx:otel and found it will it throws an error: nginx: [emerg] unknown directive "otel_resource_attr" in /etc/nginx/nginx.conf:39. But I found this param is already supported in #32

nginx conf

load_module modules/ngx_otel_module.so;

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;

    otel_exporter {
        endpoint host.docker.internal:4317;
    }
    otel_trace on;
    otel_service_name nginx-otel-demo;
    otel_trace_context propagate;
    otel_resource_attr token xxx;
    otel_resource_attr host.name 127.0.0.1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant