-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add optional Opentracing #111
Conversation
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.
Good job,
Close |
util/tele/tele.go
Outdated
// Return tracer | ||
func Tracer() trace.Tracer { | ||
return tracer{ | ||
Tracer: otel.Tracer("capz"), |
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.
"capz" ?
cloud/opentracing/traces.go
Outdated
if err != nil { | ||
return err | ||
} | ||
fmt.Printf("Begin registering opentelemetry\n") |
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.
Println
@@ -7,6 +7,7 @@ | |||
- [Troubleshooting](./topics/troubleshooting.md) | |||
- [Cluster-Autoscaler](./topics/cluster-autoscaler.md) | |||
- [How to config](./topics/config.md) | |||
- [How to enable tracing](./topics/tracing.md) |
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 don't see the doc
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.
Ok i change it
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.
Good job.
I'm still thinking that this feature is too early to integrate. Right now, we do not use this tool to diagnostic performance.
Could we stall this PR and wait when we need to optimize ? (CC @jerome-jutteau)
docs/src/topics/tracing.md
Outdated
@@ -0,0 +1,10 @@ | |||
# Add tracing | |||
|
|||
You can use jaeger or Zipkin as backend for opentelemetry. |
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.
- "Jaeger"
- "OpenTelemetry"
controllers/osccluster_controller.go
Outdated
ctx, _, publicIpDone := tele.StartSpanWithLogger(ctx, "controllers.OscClusterControllers.publicIpReconcile") | ||
|
||
publicIpSvc := r.getPublicIpSvc(ctx, *clusterScope) | ||
reconcilePublicIp, err := reconcilePublicIp(ctx, clusterScope, publicIpSvc) | ||
if err != nil { | ||
clusterScope.Error(err, "failed to reconcile publicIp") | ||
conditions.MarkFalse(osccluster, infrastructurev1beta1.PublicIpsReadyCondition, infrastructurev1beta1.PublicIpsFailedReason, clusterv1.ConditionSeverityWarning, err.Error()) | ||
publicIpDone() | ||
return reconcilePublicIp, err | ||
} | ||
publicIpDone() | ||
conditions.MarkTrue(osccluster, infrastructurev1beta1.PublicIpsReadyCondition) |
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.
Taking a step back mae me realize that the suitable place to these functions would be directly in each function (for example in this case at the beginning of the reconcilePublicIp
)
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.
What do you think ?
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.
Maybye keep here so that it is simple to add new ones in the futur ?
What do you think ?
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.
@outscale-mdr Are you ok with the changes ?
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.
It is easier to put the code for tracing at the beginning of the function rather than in the middle of another
To be freeze |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add optional opentracing with:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #130
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs: