Skip to content
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

chore(deps): add OTEL tracing and span logging for GRPC server #361

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Oct 10, 2024

TL;DR

Removed trace.WithNewRoot() from OpenTelemetry span creation and added tracing to GRPC requests.

What changed?

  • Removed trace.WithNewRoot() parameter from all otel.Tracer(TracerName).Start() calls across multiple files.
  • Added OpenTelemetry tracing to GRPC requests in the logGRPC function.
  • Updated the context in logGRPC to include trace and span IDs.

How to test?

  1. Run the CSI driver with OpenTelemetry tracing enabled.
  2. Perform various CSI operations (e.g., CreateVolume, DeleteVolume, NodePublishVolume).
  3. Verify that the traces are correctly propagated and that GRPC requests are now included in the trace.
  4. Ensure that removing trace.WithNewRoot() doesn't negatively impact the existing tracing functionality.

Why make this change?

This change improves the tracing capabilities of the CSI driver:

  1. Removing trace.WithNewRoot() allows for better trace continuity across operations, potentially providing more context in distributed tracing scenarios.
  2. Adding tracing to GRPC requests provides more granular insights into the communication between components, helping with debugging and performance analysis.

These improvements will enhance observability and make it easier to diagnose issues in production environments.

Copy link
Collaborator Author

sergeyberezansky commented Oct 10, 2024

Copy link

graphite-app bot commented Oct 10, 2024

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (10/10/24)

1 reviewer was added to this PR based on Sergey Berezansky's automation.

@sergeyberezansky sergeyberezansky force-pushed the sergey/add-trace-to-grpc-logging branch from 30f9a8e to 17bc6f4 Compare October 10, 2024 14:10
@sergeyberezansky sergeyberezansky added the enhancement New feature or request label Oct 10, 2024
@sergeyberezansky sergeyberezansky changed the base branch from sergey/fix-secret-example-docs to graphite-base/361 October 10, 2024 14:19
@sergeyberezansky sergeyberezansky force-pushed the sergey/add-trace-to-grpc-logging branch from 17bc6f4 to 1b46084 Compare October 10, 2024 14:21
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/361 to dev October 10, 2024 14:22
@sergeyberezansky sergeyberezansky force-pushed the sergey/add-trace-to-grpc-logging branch from 1b46084 to 751137f Compare October 10, 2024 14:22
Copy link
Collaborator Author

sergeyberezansky commented Oct 10, 2024

Merge activity

  • Oct 10, 12:13 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 10, 12:26 PM EDT: A user merged this pull request with Graphite.

@sergeyberezansky sergeyberezansky merged commit 5e45be0 into dev Oct 10, 2024
12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/add-trace-to-grpc-logging branch October 15, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant