Commit 0d1b8f7
chore: disable native metrics when there are no credentials (#3567)
* chore: disable native metrics when there are no credentials
Native metrics were automatically disabled when the emulator is used, but
some clients (e.g. PGAdapter) set up the connection to the emulator manually
instead of setting the environment variable. Also, when using in-mem mock
servers, native metrics should be disabled, as they cannot be exported.
This PR therefore adds an additional check that disables native metrics
when the client uses a NoCredentials instance.
* chore: make method private1 parent 9a3d2ed commit 0d1b8f7
File tree
2 files changed
+8
-3
lines changed- google-cloud-spanner/src
- main/java/com/google/cloud/spanner
- test/java/com/google/cloud/spanner
2 files changed
+8
-3
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
1791 | 1792 | | |
1792 | 1793 | | |
1793 | 1794 | | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
1794 | 1799 | | |
1795 | 1800 | | |
1796 | 1801 | | |
| |||
1838 | 1843 | | |
1839 | 1844 | | |
1840 | 1845 | | |
1841 | | - | |
| 1846 | + | |
1842 | 1847 | | |
1843 | 1848 | | |
1844 | 1849 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
| 758 | + | |
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| |||
0 commit comments