-
Notifications
You must be signed in to change notification settings - Fork 1
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
Basic Jaeger Tracing Added #1
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
…321/ceph into suab321321_jaegerTracing Signed-off-by: Abhinav Singh <[email protected]>
a54fd8a
to
05e1442
Compare
05e1442
to
d0a8211
Compare
Signed-off-by: Abhinav Singh <[email protected]>
d0a8211
to
eeebe21
Compare
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
*env.auth_registry, &client_io, env.olog, | ||
null_yield, scheduler.get() ,&http_ret); | ||
int ret; | ||
#ifdef WITH_JAEGER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of having function definition changed everywhere with 2 alternatives, can you try testing adding span to RGWSimpleRequest https://github.com/ideepika/ceph/blob/jaeger-rebase-8.0/src/rgw/rgw_rest_client.h#L10:L10
@@ -1257,6 +1257,21 @@ int RGWDeleteObj_ObjStore_SWIFT::verify_permission() | |||
} | |||
} | |||
|
|||
int RGWDeleteObj_ObjStore_SWIFT::verify_permission(Jager_Tracer& tracer, const Span& parent_span) | |||
{ | |||
Span span = tracer.child_span("rgw_rest_swift.cc RGWDeleteObj_ObjStore_SWIFT::verify_permission", parent_span); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mentioned you were going to try using a global tracer, can you explain your approach here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ideepika the tracer is global, but the spans are not, each "Root" span denotes a new client request and that "Root" span will contain its serveral follow_up spans and child spans.
In the above example I m creating a new child span, parent_span
is the span created in the function which is calling this function RGWDeleteObj_ObjStore_SWIFT::verify_permission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suab321321 I understand that, my question is : is it important to pass the tracer to the function, or are you keeping the tracer globally unique for rgw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ideepika yes it is mandatory to pass the tracer as an argument, even if I make the tracer an extern
and use this as global tracer, but I wont be able to make the Span
an extern variable.I understand that by making and tracer
and Span
global I dont have to pass the variable as argument which in turn will prevent the creating of overloaded function, but the span variable is an issue here
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @suab321321 !
Nice work till now, a few suggestions:
- can you cleanup commits, with eliminating changes which are unrelated to jaeger.
- can you also add a screenshot of jaeger trace with each commit addition, that way it would be easier to follow your code updates.
- we can test the span traversal using req_state as we discuss, since that would change a lot of this code, I would rather help you out in that first, let's keep review stalled uptil then.
@@ -6725,7 +6725,7 @@ int RGWDeleteObj::verify_permission() | |||
int RGWDeleteObj::verify_permission(Jager_Tracer& tracer, const Span& parent_span) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Jager_Tracer/Jaeger_Tracer
int RGWListBuckets::verify_permission(Jager_Tracer& tracer, const Span& parent_span) | ||
{ | ||
Span span = tracer.child_span("rgw_op.cc RGWListBuckets::verify_permission", parent_span); | ||
rgw::Partition partition = rgw::Partition::aws; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove non-jaeger changes in the further cleanups, it would make work easier for reviewer, hence better focus on feedback.
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
Signed-off-by: Abhinav Singh <[email protected]>
{ | ||
Span span=tracer.child_span("common_init.cc common_preinit()",parent_span); | ||
// set code environment | ||
ANNOTATE_BENIGN_RACE_SIZED(&g_code_env, sizeof(g_code_env), "g_code_env"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these changes part of your code? If not can you clean them up?
std::unique_ptr<opentracing::Span> childSpan(const char *, const std::unique_ptr<opentracing::Span> &); | ||
std::unique_ptr<opentracing::Span> followUpSpan(const char *, const std::unique_ptr<opentracing::Span> &); | ||
~jTracer(){ | ||
opentracing::Tracer::Global()->Close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
@@ -165,13 +167,103 @@ void global_pre_init( | |||
g_conf().complain_about_parse_error(g_ceph_context); | |||
} | |||
|
|||
#ifdef WITH_JAEGER | |||
void global_pre_init( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove unrelated changes, it would really help in reviewing your work better + faster
@@ -0,0 +1,64 @@ | |||
#ifndef TRACER_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there are two files src/common/jaegerTracer and this one, can you move them to src/common/JaegerTracer{.h/cc}
Changes addressing comments in PR - commit to be squashed prior to merge Signed-off-by: Paul Cuzner <[email protected]>
Signed-off-by: Abhinav Singh [email protected]
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard backend
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox