-
Notifications
You must be signed in to change notification settings - Fork 62
Delegate createReadStream #1611
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
Draft
danieljbruce
wants to merge
440
commits into
main
Choose a base branch
from
359913994-third-PR-CSM-separate-readrow
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.
Draft
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
with metricsCollectorData structure
Pass in latency buckets
different metric types are under metrics not scope metrics
…into 359913994-exporter-PR # Conflicts: # package.json # src/client-side-metrics/client-side-metrics-attributes.ts # src/client-side-metrics/metrics-handler.ts # test/metrics-collector/typical-method-call.txt
…s/nodejs-bigtable into 359913994-third-PR-CSM
# Conflicts: # src/client-side-metrics/operation-metrics-collector.ts # test/metrics-collector/metrics-collector.ts
…into 359913994-third-PR-CSM # Conflicts: # protos/protos.d.ts # src/client-side-metrics/operation-metrics-collector.ts # test/metrics-collector/metrics-collector.ts
Have to change the static variable on the mock instead
Fixes the linter errors
…into 359913994-third-PR-CSM # Conflicts: # src/client-side-metrics/operation-metrics-collector.ts # test/metrics-collector/metrics-collector.ts
The bigtable singleton makes it really confusing to read the code. Instead, let’s have a unique bigtable client for each test and mock it out each time as necessary so that we know the exact state of the client in each test.
…etrics design (#1605) * added metrics controller at the client level * renamed class * did some clean up around handler creation * fixed accidental deletion * use options instead of auth * fixed typo * don't pass project on each call * call getProjectId when setting up config manager * pulled out project id from metrics model * Fix: Resolve CSM branch compilation and auth issues This commit addresses compilation errors in the `csm_sanche` branch and ensures that authentication credentials can be passed to the `CloudMonitoringExporter`. The `csm_sanche` branch aimed to remove global singletons for client-side metrics. This change continues that effort by: - Fixing type errors and import issues in `ClientSideMetricsConfigManager`, `GCPMetricsHandler`, and `CloudMonitoringExporter`. - Modifying `CloudMonitoringExporter` and `GCPMetricsHandler` to accept an `options` object in their constructors. This object is passed down to the `MetricServiceClient`, allowing credentials to be provided. - Updating test files to align with these changes. - Adding new unit tests for `ClientSideMetricsConfigManager.getGcpHandlerForProject` to verify: - Correct instantiation of `GCPMetricsHandler`. - Propagation of the `options` object (for credentials). - Caching behavior of `GCPMetricsHandler` instances per project ID. These changes ensure that the client-side metrics functionality compiles correctly and that the exporter can be properly authenticated for sending metrics to Google Cloud Monitoring. * run the linter * Various changes to clarify types * Parameter should be in this position * Pass in project Id first * Name of the project * Go back to fetching OTEL instruments for each call * expect project id in the metrics collector * Make small change moving config manager Fix the tests because the mock has moved too * Debug current test of interest * Thread the projectId through the OTEL instruments again * Run the linter * Use metrics enabled to conditionally use metrics c Turn on metrics enabled Eliminate unnecessary parameter pass thrus * Don’t store options * Remove set options * Separate object for creating metrics collector Also adjust mocking for the system test. * remove the console logs * Only create one exporter per test * Remove console trace * Add fn to get the handler from the exporter * Add a test making sure the exporter gets the opts * Provide the proper mock for the metric service cli client * Each handler has a different instrument stack now So these tests need to change * cosmetic changes Add the check for the projectId again? * Fix compiler error for projectId * Address most of the comments Jules added * Remove unnecessary comments * Address header check * Remove unused imports * Removed automatically added comments * Pass in the projectId at constructor time * Fix the tests so they pass * Fix the manager tests * Move the instrument stack cache * Eliminate some proxyquire mocks * More changes required to bring handlers to the client * Resolve the remaining compile time errors * Fix the tests for createReadStream * Fix Should export a value ready for sending to the * Fix test due to metrics handler contract * Remove only * Add header * Change fake bigtable mock * Eliminate the assertion checks inside handler * Fix the projectId test * Remove onlys * Fix the hundred metrics handlers test * Add a test for 100 clients * Add retries to metric service client * Add a timeout to the hundred handlers * Remove console logs * Better test for many clients * No set console log * Eliminate hundred metrics handlers test * Fix issues with system tests due to new design * Remove onlys * separate variable for handlers --------- Co-authored-by: Daniel Sanche <d.sanche14@gmail.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…into 359913994-third-PR-CSM # Conflicts: # system-test/service-path.ts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: bigtable
Issues related to the googleapis/nodejs-bigtable API.
size: l
Pull request size is large.
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.
Description
Impact
Testing
Additional Information
Checklist
Fixes #issue_number_goes_here 🦕