-
Notifications
You must be signed in to change notification settings - Fork 122
Add opentelemetry tracing instrumentation #1125
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: sallyom <[email protected]>
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sallyom The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
res, err := resource.New(ctx, | ||
resource.WithAttributes( | ||
semconv.ServiceNameKey.String(config.ServiceName), | ||
semconv.ServiceVersionKey.String("1.0.0"), |
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.
Does it make sense to use debug/buildinfo here?
|
||
func StartGatewaySpan(ctx context.Context, operation string) (context.Context, trace.Span) { | ||
ctx, span := StartSpan(ctx, operation, operation) | ||
// TODO: Add common gateway attributes here | ||
return ctx, 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.
Maybe we want to replace them with something like:
func SetGatewayAttributes(span trace.Span, gateway Gateway) {
if gateway == nil {
return
}
span.SetAttributes(
AttrGatewaySomething.String(gateway.Something()),
)
}
Allowing a user to set attributes without the need to know the specific Keys?
conn, err := grpc.DialContext(ctx, config.ExporterEndpoint, | ||
grpc.WithTransportCredentials(insecure.NewCredentials()), | ||
grpc.WithBlock(), | ||
grpc.WithTimeout(5*time.Second), |
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.
Does this need to be configurable?
} | ||
|
||
if samplingRate := os.Getenv(envOTELSamplingRate); samplingRate != "" { | ||
if rate, err := strconv.ParseFloat(samplingRate, 64); err == nil { |
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.
Does it make sense to inform the user e.g. by failing during the creation whenever a value is not recognized?
hi @sallyom, this draft PR seems out of sync. |
No description provided.