-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(telemetry): Support both new and deprecated OpenTelemetry runtime metrics #999
Open
ijsong
wants to merge
4
commits into
main
Choose a base branch
from
new_and_deprecated_opentelemetry_runtime_metrics
base: main
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 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
This commit deprecates the error field in AppendResult as a step towards implementing atomic append operations while maintaining backward compatibility. Previously, the Append RPC could return partial success/failure results, with some log entries in a batch being appended successfully and others failing. This was indicated by the error field in AppendResult. To support atomic append operations without breaking existing clients, the error field is deprecated instead of being removed completely. This change allows clients to continue using the error field for now, but they should be aware that it will be removed in a future release. Clients should start migrating to the new atomic append API as soon as possible. The following changes were made to deprecate the error field: - The error field in AppendResult is marked as deprecated in the protobuf definition. - The Append RPC implementation no longer populates the error field. The next step is to implement atomic append operations in the client API. This will enable clients to append multiple log entries atomically, which will help to resolve #843.
This PR reduces append wait groups to a single object for each append batch. The append wait groups are part of the following structs: - appendContext - commitWaitTask - sequenceTask Previously, multiple append wait groups existed because each log entry in a batch had its own wait group. With the changes for issue #843, a single append wait group now corresponds to an entire batch. This PR consolidates the list of append wait groups into a single append wait group. TODO: We are still on the road to resolving #843. The rest of the work mostly involves cleaning up the code base.
This PR removes the totalBytes field from the appendContext struct. It modifies prepareAppendContext to return totalBytes instead of changing the appendContext struct. Through this PR, the appendContext becomes slightly simple.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #999 +/- ##
==========================================
+ Coverage 79.91% 79.98% +0.07%
==========================================
Files 178 178
Lines 21408 21417 +9
==========================================
+ Hits 17108 17131 +23
+ Misses 3504 3497 -7
+ Partials 796 789 -7 ☔ View full report in Codecov by Sentry. |
…e metrics This commit enables Varlog to support both new and deprecated OpenTelemetry runtime metrics. Previously, Varlog only supported the deprecated runtime instrumentation. This change ensures backward compatibility by simultaneously setting the `OTEL_GO_X_DEPRECATED_RUNTIME_METRICS` environment variable and using the new version. This enhancement allows Varlog to leverage the latest OpenTelemetry features while maintaining compatibility with older versions, collecting more comprehensive runtime metrics.
3ac7750
to
d0cd709
Compare
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.
What this PR does
This commit enables Varlog to support both new and deprecated OpenTelemetry
runtime metrics.
Previously, Varlog only supported the deprecated runtime instrumentation. This
change ensures backward compatibility by simultaneously setting the
OTEL_GO_X_DEPRECATED_RUNTIME_METRICS
environment variable and using the newversion.
This enhancement allows Varlog to leverage the latest OpenTelemetry features
while maintaining compatibility with older versions, collecting more
comprehensive runtime metrics.