Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add plumbing PR for client side metrics to support the open telemetry instruments #1569

Merged
merged 298 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from 244 commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
62a4b8b
Remove the TODOs
danieljbruce Jan 20, 2025
7c4f414
Add line back
danieljbruce Jan 20, 2025
83f53ae
Add comment
danieljbruce Jan 20, 2025
610eec0
Add version
danieljbruce Jan 20, 2025
a2b5951
Add version to client side metrics
danieljbruce Jan 20, 2025
5f67cad
linter
danieljbruce Jan 20, 2025
8f20c78
Generate documentation for AttemptInfo interface
danieljbruce Jan 20, 2025
9b1ba9d
Logger documentation
danieljbruce Jan 20, 2025
88e96c3
Generate more documentation
danieljbruce Jan 20, 2025
ed39628
Generate documentation
danieljbruce Jan 20, 2025
76b1249
Make sure test reports correct duration, zone
danieljbruce Jan 20, 2025
8d60cb1
Generate documentation for the dimensions to strin
danieljbruce Jan 20, 2025
19fef92
Add version to the dimensions
danieljbruce Jan 20, 2025
1ecfb1c
Fix the client name. The version is going to chan
danieljbruce Jan 20, 2025
d8a3960
Update the expected output file.
danieljbruce Jan 20, 2025
1d6b645
Fox bug, get cluster
danieljbruce Jan 20, 2025
acb1d3a
Add fake cluster to tests
danieljbruce Jan 20, 2025
c30b057
Remove console log
danieljbruce Jan 20, 2025
9ef079b
Generate more documentation
danieljbruce Jan 20, 2025
d5a0368
Require a call to fetch the project when using MT
danieljbruce Jan 20, 2025
ae532d8
use same date provider for all metrics tracers
danieljbruce Jan 20, 2025
b2bced9
In the metrics traceer, don’t fetch the project
danieljbruce Jan 20, 2025
e1dd61c
Remove only
danieljbruce Jan 20, 2025
cd97f35
Merge branch 'main' into 359913994-first-PR-add-infrastructure
danieljbruce Jan 20, 2025
9ec98df
Add open telemetry api
danieljbruce Jan 20, 2025
2457dbe
Merge branch '359913994-first-PR-add-infrastructure' of https://githu…
danieljbruce Jan 20, 2025
5a1a3aa
Add TestExecuteQuery_EmptyResponse to failures
danieljbruce Jan 20, 2025
1bd2d2b
TestExecuteQuery_SingleSimpleRow known failures
danieljbruce Jan 20, 2025
c2be338
Fix syntax in known failures
danieljbruce Jan 20, 2025
cd0d774
Add two tests to the known failures
danieljbruce Jan 20, 2025
e7caf36
TestSampleRowKeys_Retry_WithRetryInfo to known fai
danieljbruce Jan 20, 2025
7fd86d2
Change word dimensions to attributes
danieljbruce Jan 20, 2025
db05ff3
Change more docs to use Attributes instead of dim
danieljbruce Jan 20, 2025
9cc4b15
attributes
danieljbruce Jan 20, 2025
0142329
Test should use attributes as string
danieljbruce Jan 20, 2025
15d6e4a
For Windows replace carriage return
danieljbruce Jan 21, 2025
865529e
Update documentation with types
danieljbruce Jan 21, 2025
28fbfd8
Add metrics collector
danieljbruce Jan 23, 2025
5995789
Metrics handler, GCPMetricsHandler and tests add
danieljbruce Jan 24, 2025
a62b124
Remove only
danieljbruce Jan 24, 2025
bfc5883
Merge branch 'main' of https://github.com/googleapis/nodejs-bigtable …
danieljbruce Jan 24, 2025
0996d3c
Add metrics handlers parameter to Doc
danieljbruce Jan 24, 2025
ef8e3fe
Don’t require retries to be passed into metrics
danieljbruce Jan 24, 2025
c68a76f
Remove testMeterProvider
danieljbruce Jan 24, 2025
47a24b1
Remove the attributesToString function
danieljbruce Jan 24, 2025
b2600f2
Eliminate unused class
danieljbruce Jan 24, 2025
d4d3f6c
Generate documentation for the IMetricsHandler
danieljbruce Jan 24, 2025
b8dff1c
Generate documentation for GCPMetricsHandler
danieljbruce Jan 24, 2025
d50384f
Restrict attributes interfaces and solve compile
danieljbruce Jan 24, 2025
b5fc1f2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 24, 2025
1e5dc82
use undefined instead of null
danieljbruce Jan 24, 2025
c2ffbc6
Introduce enums for allowable values
danieljbruce Jan 24, 2025
1200b3c
Merge branch '359913994-first-PR-add-infrastructure' of https://githu…
danieljbruce Jan 24, 2025
9320149
Add more headers
danieljbruce Jan 24, 2025
4023361
Remove only
danieljbruce Jan 24, 2025
ef91733
Use null to pass values around. Not undefined
danieljbruce Jan 24, 2025
52b570c
Modify test step
danieljbruce Jan 24, 2025
6a6774f
Add metrics
danieljbruce Jan 24, 2025
10b6d30
Don’t provide first response latency
danieljbruce Jan 24, 2025
33c17c6
Remove firstResponseLatency from operation metrics
danieljbruce Jan 24, 2025
fbf2314
Expose interface allowing undefined not null
danieljbruce Jan 24, 2025
39fe861
Better explanations for design decision inline
danieljbruce Jan 24, 2025
8f13100
Use attempt start time not operation start time
danieljbruce Jan 27, 2025
48e0e95
Adjust tests for first response latency
danieljbruce Jan 27, 2025
66c4ab1
Remove TODO
danieljbruce Jan 27, 2025
e7c5b5f
Use the MethodName enum instead of string
danieljbruce Jan 28, 2025
98be351
Don’t use enum for streaming operation
danieljbruce Jan 28, 2025
efdfcea
Remove copy/pasted comment
danieljbruce Jan 28, 2025
4a6a476
Rename to OperationMetricsCollector
danieljbruce Jan 28, 2025
edfcf8a
Rename the method to getOperationAttributes
danieljbruce Jan 28, 2025
bc4998f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 28, 2025
7e6374d
Merge branch '359913994-first-PR-add-infrastructure' of https://githu…
gcf-owl-bot[bot] Jan 28, 2025
10b72ec
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 28, 2025
a72b51a
Merge branch '359913994-first-PR-add-infrastructure' of https://githu…
gcf-owl-bot[bot] Jan 28, 2025
47fd9d0
Add aggregate views to the GCP metrics handler
danieljbruce Jan 28, 2025
2a42162
Merge branch '359913994-first-PR-add-infrastructure' of https://githu…
danieljbruce Jan 28, 2025
9073f07
Adjust test based on enum changes
danieljbruce Jan 28, 2025
32d3983
Update the documentation to be more descriptive
danieljbruce Jan 28, 2025
9716c4a
Add the state machine to the metrics collector
danieljbruce Jan 29, 2025
d2b93ee
Use grpc code to report attempt/operation status
danieljbruce Jan 29, 2025
99f9577
Remove parameters from JS Documentation
danieljbruce Jan 29, 2025
c82e72d
Update interfaces and some metrics
danieljbruce Jan 30, 2025
759e829
Documentation for all the different interfaces
danieljbruce Jan 30, 2025
76b6f5a
use operation start time as the benchmark
danieljbruce Jan 30, 2025
1e840a4
Final operation status shouldn’t be included per a
danieljbruce Jan 30, 2025
7bf62e9
Move OnAttemptCompleteInfo
danieljbruce Jan 31, 2025
fca55b7
Provide AttemptOnlyAttributes in the only file
danieljbruce Jan 31, 2025
51afdce
Move over the OperationOnlyAttributes
danieljbruce Jan 31, 2025
57b1dc1
Adjust the guard so that it is earlier
danieljbruce Jan 31, 2025
0f850b7
Adjust the test output file
danieljbruce Jan 31, 2025
6c1e01b
Change streaming back to STREAMING/UNARY
danieljbruce Jan 31, 2025
2910408
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 31, 2025
2781561
Change metrics handler interface to support each metric
danieljbruce Jan 31, 2025
0b4d93e
Revert "Change metrics handler interface to support each metric"
danieljbruce Jan 31, 2025
1b6681b
Supply the projectId later in the client side
danieljbruce Feb 5, 2025
b6f1302
Remove the GCPMetricsHandler file
danieljbruce Feb 5, 2025
1ae82ff
Change location of the client-side-metrics-attribu
danieljbruce Feb 6, 2025
3ee5604
Change common test utilities folder name
danieljbruce Feb 6, 2025
124ed30
Remove aliases for grpc status
danieljbruce Feb 6, 2025
ef36a6f
Should be MethodName type
danieljbruce Feb 6, 2025
6829224
Rename variable as it expands beyond latency
danieljbruce Feb 6, 2025
dd603f1
Remove private methods for building attributes
danieljbruce Feb 6, 2025
b493c0d
Replace the logger class with a simple object
danieljbruce Feb 6, 2025
2f19f31
Remove only
danieljbruce Feb 6, 2025
dfe7d57
Remove the logger classes
danieljbruce Feb 6, 2025
02d752a
Add stubs
danieljbruce Feb 6, 2025
19d1d81
Revert "Remove the GCPMetricsHandler file"
danieljbruce Feb 6, 2025
48ff706
Add exporter and helper function
danieljbruce Feb 7, 2025
883ea1a
Add headers and fixture
danieljbruce Feb 7, 2025
ad9c85b
Add milliseconds unit
danieljbruce Feb 7, 2025
5a3bac2
Record to a histogram
danieljbruce Feb 7, 2025
4740c62
Add necessary elements to the GCPMetricsHandler
danieljbruce Feb 7, 2025
ee404f1
Pass an exporter into the GCPMetricsHandler
danieljbruce Feb 7, 2025
c997f0f
Move file to tests
danieljbruce Feb 7, 2025
3719257
Remove unused import
danieljbruce Feb 7, 2025
a6498f2
Adapt the fixture to include the projectId
danieljbruce Feb 7, 2025
e7d631d
More exporter code fixes
danieljbruce Feb 7, 2025
382ebef
Add the fixture. We are going to use it later
danieljbruce Feb 7, 2025
8ba3347
Solved compiler errors. Test almost passes
danieljbruce Feb 7, 2025
13382d2
Address the failing export test
danieljbruce Feb 7, 2025
948a3a3
Fixed the exporter. It now writes data properly.
danieljbruce Feb 10, 2025
c8bb0a8
Test should complete when the export doesnt error
danieljbruce Feb 10, 2025
78ec2e8
Add the fixture to the shared folder
danieljbruce Feb 10, 2025
e5ec89f
Remove two files not in this PR
danieljbruce Feb 10, 2025
5403a1b
delete empty file
danieljbruce Feb 10, 2025
176ed02
Remove files that are already in the other PR
danieljbruce Feb 10, 2025
08c1c1b
Remove the metrics handler fixture
danieljbruce Feb 10, 2025
be7673f
Use 3 metrics instead of 1
danieljbruce Feb 11, 2025
e6d6606
Replace with proper buckets
danieljbruce Feb 11, 2025
285454f
Change the metrics handler fixture
danieljbruce Feb 12, 2025
12a5cc7
Stop using stub in exporter
danieljbruce Feb 13, 2025
54239f3
Use more realistic buckets
danieljbruce Feb 13, 2025
86890aa
Remove the go request to export
danieljbruce Feb 13, 2025
a0fa7e4
Modify the fixtures to be more realistic
danieljbruce Feb 13, 2025
f5267c1
Change the mean
danieljbruce Feb 13, 2025
887d988
Remove only
danieljbruce Feb 13, 2025
075bf9b
Add the export input fixture
danieljbruce Feb 13, 2025
94f422c
Reducing export interval makes time complete
danieljbruce Feb 13, 2025
1c3c290
Add the GCPMetricsHandler test
danieljbruce Feb 13, 2025
b118bc1
Add a stub for the otel export
danieljbruce Feb 14, 2025
8aefe11
Test calling export is now working
danieljbruce Feb 14, 2025
a30d3ec
Remove old unused code
danieljbruce Feb 14, 2025
c3f2963
Change tests and json structure to work
danieljbruce Feb 14, 2025
67b6478
Update all the fixtures
danieljbruce Feb 14, 2025
8544410
Fix the view creation code
danieljbruce Feb 19, 2025
96dbc1c
Starting test for gcp-metrics-handler
danieljbruce Feb 19, 2025
416e18c
Put tests in the proper places
danieljbruce Feb 19, 2025
991f5c8
Replace start and end time with more recent values
danieljbruce Feb 19, 2025
09389ee
Utilize the new metrics handler interface
danieljbruce Feb 20, 2025
87d5592
Solve compiler errors resulting from metrics handl
danieljbruce Feb 20, 2025
9ad2ef8
Update the fixture
danieljbruce Feb 20, 2025
c59fcab
rewrite the metric to request method
danieljbruce Feb 20, 2025
5848588
Add interfaces to work with type guards
danieljbruce Feb 21, 2025
9c35dfb
Correct the compile error problems
danieljbruce Feb 21, 2025
07ec90d
Fix expected OTEL output test
danieljbruce Feb 21, 2025
bf54c8c
Remove TODOs
danieljbruce Feb 21, 2025
f226b5f
Fix test to compare pointwise
danieljbruce Feb 21, 2025
b42b4f4
connectivity error count corrections
danieljbruce Feb 21, 2025
54ac764
Correct the fixtures
danieljbruce Feb 21, 2025
eb8f14b
Eliminate tests using the old export input fixture
danieljbruce Feb 21, 2025
6ecb1a6
Add headers
danieljbruce Feb 21, 2025
fa0a56e
run linter
danieljbruce Feb 21, 2025
fcef83d
Modify the gcp-metrics-handler and test the proces
danieljbruce Feb 21, 2025
cd2efac
Remove only
danieljbruce Feb 21, 2025
eba027c
Use a fake projectId
danieljbruce Feb 21, 2025
5929a9d
Only call export once
danieljbruce Feb 21, 2025
3b48c8e
Ensure test suite completes
danieljbruce Feb 21, 2025
8edc4ab
Remove shutdown
danieljbruce Feb 21, 2025
8c9d23f
remove async
danieljbruce Feb 21, 2025
7b49f01
Don’t export the data twice
danieljbruce Feb 21, 2025
2ec12b6
Merge branch 'main' of https://github.com/googleapis/nodejs-bigtable …
danieljbruce Feb 24, 2025
b4f7705
Increase the timeout
danieljbruce Feb 24, 2025
2a32459
Use the PushMetricExporter interface
danieljbruce Feb 24, 2025
e5caa9e
Removed some interfaces that are not used anymore
danieljbruce Feb 24, 2025
fc114ff
Update JSdoc
danieljbruce Feb 24, 2025
6fb5944
Move fake start time and fake end time
danieljbruce Feb 24, 2025
ca6f05e
Remove the TODO
danieljbruce Feb 24, 2025
4bec216
Update documentation
danieljbruce Feb 24, 2025
bd4b0ac
Add additional information to the error reported
danieljbruce Feb 25, 2025
c191614
Move start time and end time
danieljbruce Feb 25, 2025
86be1ea
Try to use timestamps in order
danieljbruce Feb 25, 2025
3b0f081
Reduce timestamp delay
danieljbruce Feb 25, 2025
3ebb9ff
Remove only
danieljbruce Feb 25, 2025
cf32131
Inline addFakeRecentTimestamps
danieljbruce Feb 25, 2025
78a20d4
Move replace timestamps into the only file it
danieljbruce Feb 25, 2025
105b58b
Fix comment
danieljbruce Feb 25, 2025
d4022fd
Rename the metric types
danieljbruce Feb 26, 2025
7ea28d2
Generate documentation for the new classes
danieljbruce Feb 26, 2025
7848643
Add documentation for monitored resource
danieljbruce Feb 26, 2025
7229174
Generate documentation for the other metrics
danieljbruce Feb 26, 2025
7f4e167
Generate documentation for the constructor
danieljbruce Feb 26, 2025
c86196a
Get documentation for replaceTimestamps, fixtures
danieljbruce Feb 26, 2025
41c9b2d
Merge branch 'main' of https://github.com/googleapis/nodejs-bigtable …
danieljbruce Feb 26, 2025
d76fa14
Reduce the interval time
danieljbruce Feb 27, 2025
2f3b4e5
Make view list based on latencies
danieljbruce Feb 27, 2025
7a4b33e
Add a guard for count
danieljbruce Feb 28, 2025
5a09c33
Invert the for and if
danieljbruce Mar 6, 2025
aa18c1e
Pull all attributes out
danieljbruce Mar 6, 2025
791e70d
Eliminate the need for the type guard
danieljbruce Mar 6, 2025
2e21503
Eliminate the data points interface
danieljbruce Mar 6, 2025
e936aaa
only
danieljbruce Mar 6, 2025
ab07a58
Revert "Eliminate the need for the type guard"
danieljbruce Mar 6, 2025
7fe9a46
Pull timeseries into one variable
danieljbruce Mar 6, 2025
26b9ca7
Eliminate an unused import
danieljbruce Mar 6, 2025
29ef6b0
Add a comment that explains the usefulness
danieljbruce Mar 6, 2025
8fd59f4
Remove the gce instance setting
danieljbruce Mar 6, 2025
183bdb7
Eliminate the gcp cloud provider setting
danieljbruce Mar 6, 2025
92059aa
run all tests
danieljbruce Mar 6, 2025
af3aa73
Eliminate duplicate project id from monitored
danieljbruce Mar 6, 2025
422060e
Change the two metric names
danieljbruce Mar 6, 2025
f93a721
Extend the timeout so that the exporter has
danieljbruce Mar 7, 2025
ea230aa
Use spread syntax
danieljbruce Mar 7, 2025
5ecfb70
Changed metric to otel instruments
danieljbruce Mar 7, 2025
303c57c
Remove optional on Otel instruments
danieljbruce Mar 7, 2025
a822961
Rename initialize to getMetrics
danieljbruce Mar 7, 2025
31fe184
Pin promisify to version 4
danieljbruce Mar 7, 2025
30152d6
cast to string - compiler errors
danieljbruce Mar 7, 2025
9584c69
Change the latency buckets
danieljbruce Mar 13, 2025
082c049
Updated the resultCallback comment
danieljbruce Mar 13, 2025
f2e46a4
Change the test description
danieljbruce Mar 14, 2025
dfcf56e
Add a comment explaining what the test is about
danieljbruce Mar 14, 2025
35da5c6
Completed the test for two metrics handlers
danieljbruce Mar 14, 2025
b5ae964
remove only
danieljbruce Mar 14, 2025
b575010
Cast as histogram to make compile error go away
danieljbruce Mar 14, 2025
822c14e
Move the duplicate copies of replaceTimestamps
danieljbruce Mar 14, 2025
561889c
Take steps to eliminate the ExportInput interface
danieljbruce Mar 14, 2025
f423c57
Add a header
danieljbruce Mar 14, 2025
9076be1
Remove only
danieljbruce Mar 14, 2025
ead3f5e
Eliminate ExportInput and dependencies
danieljbruce Mar 14, 2025
fa6c3fd
Eliminate constant
danieljbruce Mar 14, 2025
a587d0c
Push conversion to status back to metrics collect
danieljbruce Mar 14, 2025
311d555
Change property names to match MetricServiceClient
danieljbruce Mar 14, 2025
117473b
Solve the app_profile_id issue
danieljbruce Mar 14, 2025
e4154af
It is actually app_profile not app_profile_id
danieljbruce Mar 14, 2025
0ccec5b
Add guards that stop the export call
danieljbruce Mar 17, 2025
9f94b9e
Remove only
danieljbruce Mar 17, 2025
7e76c39
Add a new test for ten metrics handlers
danieljbruce Mar 17, 2025
bb64fbe
Remove only
danieljbruce Mar 17, 2025
27f5bcd
Do not pass data through the Resource object
danieljbruce Mar 17, 2025
d1a292f
Add a test for writing duplicate points to MH
danieljbruce Mar 17, 2025
23a4d39
Eliminate interface
danieljbruce Mar 17, 2025
55dbd8f
Set connectivity error count to 1 (not increment)
danieljbruce Mar 17, 2025
3b4f54c
Latency improvement
danieljbruce Mar 20, 2025
1566d1f
Add latency optimizations and update fixtures
danieljbruce Mar 21, 2025
cab2a95
Update fixtures with new latency measurements
danieljbruce Mar 21, 2025
29c78cc
Check for first response latency first
danieljbruce Mar 21, 2025
28c81e0
Break metricsToRequest down into smaller fns
danieljbruce Mar 21, 2025
84fcc86
Refactor the metricToRequest function
danieljbruce Mar 21, 2025
2022022
Rename interface
danieljbruce Mar 21, 2025
d7b37db
Rename to getInstruments
danieljbruce Mar 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"precompile": "gts clean"
},
"dependencies": {
"@google-cloud/monitoring": "^4.1.0",
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.20.0",
"@google-cloud/opentelemetry-resource-util": "^2.4.0",
"@google-cloud/precise-date": "^4.0.0",
Expand Down
Loading
Loading