Code Monkey home page Code Monkey logo

Comments (7)

lalitb avatar lalitb commented on May 26, 2024 1

Looks like the alpine 3.15 package repository comes with a newer abseil library. This can be causing conflict between the abseil library used internally in opentelemetry-cpp sdk and one coming from the repository. This can be resolved by changing the order of header includes in nginx instrumentation as described here.
As this change would be required in nginx instrumentation, would let @seemk to further reply on that :)

from opentelemetry-cpp-contrib.

esigo avatar esigo commented on May 26, 2024

Hi @longwuyuan thanks for reaching out to us. Any reason for not installing re2?
I could get the build working by installing re2 and re2-dev.

You may consider upgrading to the latest version of opentelemetry 1.2.0.
Also clone was slow, you may consider using
git clone --branch v$OPENTELEMETRY_CPP_VERSION --depth=1 --recursive https://github.com/open-telemetry/opentelemetry-cpp opentelemetry-cpp-$OPENTELEMETRY_CPP_VERSION

from opentelemetry-cpp-contrib.

longwuyuan avatar longwuyuan commented on May 26, 2024

@esigo thanks a lot. I added re2 and re2-dev to the apk add command in build.sh and that error was resolved.

However I am curious you had a working build. I get below error when I run docker build -t my image . ;

...
...
#9 151.2   nginx http fastcgi temporary files: "fastcgi_temp"                                                                                                                                                                                           
#9 151.2   nginx http uwsgi temporary files: "uwsgi_temp"                                                                                                                                                                                               
#9 151.2   nginx http scgi temporary files: "scgi_temp"                                                                                                                                                                                                 
#9 151.2                                                                                                                                                                                                                                                
#9 151.2 make -f objs/Makefile modules                                                                                                                                                                                                                  
#9 151.2 make[1]: Entering directory '/tmp/build/nginx-1.19.10'                                                                                                                                                                                         
#9 151.2 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.2        -o objs/addon/src/agent_config.o \                                                                                                                                                                                                      
#9 151.2        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/agent_config.cpp                                                                                                                
#9 151.2 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.2        -o objs/addon/src/nginx_config.o \                                                                                                                                                                                                      
#9 151.2        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/nginx_config.cpp                                                                                                                
#9 151.3 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.3        -o objs/addon/src/otel_ngx_module.o \                                                                                                                                                                                                   
#9 151.3        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/otel_ngx_module.cpp                                                                                                             
#9 151.7 cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \                                                        
#9 151.7        -o objs/addon/src/propagate.o \                                                                                                                                                                                                         
#9 151.7        /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/propagate.cpp                                                                                                                   
#9 153.4 In file included from /usr/include/absl/synchronization/mutex.h:73,                                                                                                                                                                            
#9 153.4                  from /usr/include/grpcpp/impl/codegen/sync.h:32,                                                                                                                                                                              
#9 153.4                  from /usr/include/grpcpp/impl/codegen/client_context.h:55,                                                                                                                                                                    
#9 153.4                  from /usr/include/grpcpp/impl/codegen/call_op_set.h:34,                                                                                                                                                                       
#9 153.4                  from /usr/include/grpcpp/impl/codegen/server_context.h:35,                                                                                                                                                                    
#9 153.4                  from /usr/include/grpcpp/impl/codegen/async_stream.h:26,                                                                                                                                                                      
#9 153.4                  from /usr/include/grpcpp/impl/codegen/async_generic_service.h:26,                                                                                                                                                             
#9 153.4                  from /usr/local/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:25,                                                                                                                                    
#9 153.4                  from /usr/local/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11,                                                                                                                                                 
#9 153.4                  from /tmp/build/opentelemetry-cpp-contrib-f48500884b1b32efc456790bbcdc2e6cf7a8e630/instrumentation/nginx/src/otel_ngx_module.cpp:21:                                                                                          
#9 153.4 /usr/include/absl/synchronization/internal/per_thread_sem.h:84:10: error: reference to 'base_internal' is ambiguous                                                                                                                            
#9 153.4    84 |   friend absl::base_internal::ThreadIdentity* CreateThreadIdentity();                                                                                                                                                                  
#9 153.4       |          ^~~~                                                                                                 
...
...

from opentelemetry-cpp-contrib.

longwuyuan avatar longwuyuan commented on May 26, 2024

Thanks @lalitb , will wait for @seemk comments

from opentelemetry-cpp-contrib.

lalitb avatar lalitb commented on May 26, 2024

@longwuyuan Just to add, if you don't want to wait for fix in nginx instrumentation, the alternate solution would be to build opentelemetry-cpp using externally installed abseil library. This can be achieved by adding -DWITH_ABSEIL=ON cmake option in opentelemetry-cpp build here.

from opentelemetry-cpp-contrib.

longwuyuan avatar longwuyuan commented on May 26, 2024

@lalitb thank you very much for the update. We have, for now, used alpine v3.14.4 to release ingress-nginx-controller v1.1.3, to get the openssl & libxml CVE patches.

After this activity settles, I expect that an attempt at moving to alpine v3.15.X+ will occur in near future .

@dmathieu is working on kubernetes/ingress-nginx#7621 so tagging here @rikatz

from opentelemetry-cpp-contrib.

longwuyuan avatar longwuyuan commented on May 26, 2024

All done by "@esigo" in ingress-nginx

from opentelemetry-cpp-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.