Last active
June 1, 2021 11:38
-
-
Save Amit-Hora/ec478b891a043c14d98047981a9faef5 to your computer and use it in GitHub Desktop.
Nginx OPentracing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gists are compatible with Nginx v 1.18.0 | |
Step 1 - Download libstdc++.so.6.0.26.zip , location /home/centos | |
Step 2 - unzip /home/centos/libstdc++.so.6.0.26.zip -d /lib64/ | |
Step 3 - confirm you have GLIBCXX_3.4.26.You can use that using | |
strings /lib64/libstdc++.so.6 | grep GLIBCXX | |
Step 4 - Install opentracing module | |
cd /usr/lib64/nginx/modules | |
yum install wget | |
wget -O - https://github.com/opentracing-contrib/nginx-opentracing/releases/download/v0.13.0/linux-amd64-nginx-1.18.0-ngx_http_module.so.tgz | tar zxf - | |
Step 5 - Install vendor tracing lib | |
wget -O - https://github.com/lightstep/lightstep-tracer-cpp/releases/download/v0.9.0/linux-amd64-liblightstep_tracer_plugin.so.gz | gunzip -c > /usr/local/lib/liblightstep_tracer_plugin.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"access_token": "<YOUR LIGHTSTEP TOKEN>", | |
"component_name": "YOUR SERVICE NAME IN LIGHTSTEP", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx nginx; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
load_module modules/ngx_http_opentracing_module.so; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
opentracing on; | |
include /etc/nginx/mime.types; | |
default_type application/json; | |
opentracing_load_tracer /usr/local/lib/liblightstep_tracer_plugin.so /etc/nginx/lightstep-config.json; | |
log_format main '$time_iso8601 - $remote_addr $proxy_protocol_addr "$http_user_agent" ' | |
'"$request" $status $body_bytes_sent'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
server_tokens off; | |
keepalive_timeout 65; | |
include /etc/nginx/conf.d/service.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment