]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
tracer/osd/librados/build/rgw: rgw and osd end2end tracing using opentelemetry
authorOmri Zeneva <ozeneva@redhat.com>
Wed, 24 Aug 2022 13:57:11 +0000 (09:57 -0400)
committerYuval Lifshitz <ylifshit@redhat.com>
Tue, 6 Feb 2024 08:01:42 +0000 (08:01 +0000)
commit320a2179a3c6c1981a0fd2494938515997c1bfad
tree0c083b5c8ed3c467f99952346dda7abfad5a5f19
parentce47bb15f0e2fe2da9279a79f6ea13562e567d08
tracer/osd/librados/build/rgw: rgw and osd end2end tracing using opentelemetry

* build: add opentelemetry to cmake system
crimson targets that uses Message.cc/h are built before opentelemetry (o-tel), so we need to build o-tel eralier so we also add the library to the include path earlier
this shoud work for WITH_JAEGER flag both the ON/OFF cases, and for librados where the compilation flag is ignored

* msg/tracer: add o-tel trace to Messages with decode/encode function in tracer.h
some files that uses Message.cc/h just need the encode/decode functions  and not all others functions.
some crimson targets does not link with ceph_context (common) which is required for tracer.cc file. so we just need to include that functions

* librados: Add opentelemtry trace param for aio_operate and operate methods
in order to propagate the trace info I added the otel-trace as an extra param.
in some places, there already was a blkin trace info, and since it is not used in other places we can safely change it to o-tel trace info.
this will be done in another commit, so the cleanup of blkin trace will be in a dedicated commit

* osd: use the o-tel trace of the msg as a parent span of the osd trace
if there is a valid span in the msg, we will add this op to the request
trace, otherwise it will start a new trace for the OSD op

* rgw: pass put obj trace info to librados
in order to make it possible, I saved the trace info inside the sal::Object, so we can use it later when writing the object to rados
it could be used also later for read ops.
note the trace field of req_state is initalized only in rgw_process, so it's also required in librgw request flow

* prevent breaking channges to kSize. make sure that changes between components built with
different versions of OTEL do not break message compatibility

Signed-off-by: Omri Zeneva <ozeneva@redhat.com>
31 files changed:
cmake/modules/BuildOpentelemetry.cmake
src/CMakeLists.txt
src/common/tracer.cc
src/common/tracer.h
src/include/rados/librados.hpp
src/include/rados/librados_fwd.hpp
src/librados/IoCtxImpl.cc
src/librados/IoCtxImpl.h
src/librados/librados_asio.h
src/librados/librados_cxx.cc
src/messages/MOSDOp.h
src/msg/Message.cc
src/msg/Message.h
src/osd/OSD.cc
src/osdc/Objecter.cc
src/osdc/Objecter.h
src/rgw/driver/rados/rgw_putobj_processor.cc
src/rgw/driver/rados/rgw_putobj_processor.h
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/driver/rados/rgw_sal_rados.cc
src/rgw/driver/rados/rgw_sal_rados.h
src/rgw/driver/rados/rgw_tools.cc
src/rgw/driver/rados/rgw_tools.h
src/rgw/rgw_aio.cc
src/rgw/rgw_aio.h
src/rgw/rgw_lib.cc
src/rgw/rgw_op.cc
src/rgw/rgw_sal.h
src/rgw/rgw_sal_filter.h
src/rgw/rgw_sal_store.h