forked from google/trillian
-
Notifications
You must be signed in to change notification settings - Fork 0
RA-7777: [Trillian] Added event timing that conforms to opentelemetry standards. #2
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
Open
himaschal
wants to merge
13
commits into
master
Choose a base branch
from
RA-7777_opentelemetry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…equest to response. Added transaction_id and span_id to the requests and propogate them through to the gRpc calls to help trace a request from end to end. NB. this also requires changes on the certificate-transparency-go project (ctfe) to be useful.
… user input Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…orrect behavior. Each service should generate its own span id
…ence" This reverts commit c6dd30a.
- Replace legacy transaction_id with standard trace_id (32-char hex) - Generate OpenTelemetry-standard IDs using crypto/rand (128-bit trace, 64-bit span) - Implement proper service boundary handling (trace_id propagates, span_id doesn't) - Add gRPC metadata support for x-trace-id header propagation - Update HTTP middleware to integrate with logging system - Add sanitization for security in log output (newline removal) - Update all tests to reflect new field names and behavior - Maintain backward compatibility for Trillian's role as backend gRPC service - Add MiddlewareFunc for HTTP handler function wrapping - Ensure proper trace correlation across CTFE->Trillian service calls
| /trillian_map_server | ||
| default.etcd | ||
| cockroach-data/ | ||
| server/.DS_Store |
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.
change this to just .DS_Store and it will exclude it from all folders.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes made:
This PR introduces basic OpenTelemetry-style trace and span ID propagation and structured logging middleware to the Trillian server. The changes are focused on improving observability and request tracing for both HTTP and gRPC endpoints.
The are 2 health endpoints exposed in terms of the trillian project:
/metricswhich uses the prometheus http handler and by default are not logged (this is standard practice) ie. we will not see any logs for this/healthzwhich uses the standard http handler, runs on schedule, and we will see logs for theseWe can also see that the gRpc call is logged (tested from invoking the
get-sthcall and tracing through)Expected:
Both the CTFE and Logserver should have the same trace_id and different span id's
CTFE logs:
Logserver (Trillian):