nginx-opentracing
nginx-opentracing copied to clipboard
Provide an image that can be used without customizing
Is it possible to have a version of the image built so that it can be configured using environment variables rather than building a custom image?
What options do you want to configure from environmental variables?
Keep in mind that by default nginx drops all the environmental variables when it forks a worker. http://nginx.org/en/docs/ngx_core_module.html#env
OPENTRACING_ENDPOINT
is basically the only one I can think of. That will allow the traces to go to a specific server. So the :zipkin
image will go use the zipkin library vs :datadog or :jaeger
The reason for specific images is so that not all libraries will be loaded to support some IF-THEN-ELSE condition in the configuration file
# Load a vendor tracer
opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/jaeger-nginx-config.json;
# or
# opentracing_load_tracer /usr/local/lib/liblightstep_tracer_plugin.so /path/to/config;
# or
# opentracing_load_tracer /usr/local/lib/libzipkin_opentracing_plugin.so /path/to/config;
# or
# opentracing_load_tracer /usr/local/lib/libdd_opentracing_plugin.so /path/to/config;
A testcontainers integration test can be created to start up zipkin (or whatever backend server) and the nginx-with-opentracing:zipkin
and make a http call for the home page to and then followed by a REST API query to zipkin server to see if the entry was added successfully.