Commit 9931364
Statsbeat + smoke test (#1660)
* Statsbeat
* Fix merge conflicts
* Add Statsbeat Helper
* Track instrumentation list and encode it as long
* Track instrumentation names
* Add java.vendor to the feature list
* Add Attach statsbeat
* Add azure metadata service api call
* Put common custom dimensions in the base statsbeat
* Test azure metadata sevice call on both linux and windows
* Add statbest metric names
* Add scheduler to send statsbeat
* Reset after each interval
* Refactor update frequency interval
* Remove unused imports
* Increment network statsbeat counters
* Add tests
* Add tests for encode/decode feature
* Add StatsbeatModule
* Use non-static methods
* Add unit tests for NetworkStatsbeat
* Add tests for AttachStatsbeat
* Add tests for FeatureStatsbeat
* Refactor tests
* Update instrumentations map
* Sort instrumentation list alphabetically
* Fix failed tests
* Send statsbeat to a testing ikey
* Refactor
* Refactor
* Fix nullpointerexception in instrumentation list
* Send network statsbeats when its count is not zero
* Refactor
* Move private instance variables to the top of the class
* Reinit resourceProviderId after reset
* Track request durations
* Remove unnecessary changes
* Fix merge conflicts
* Set feature statsbeat to have daily interval
* Clean up logs
* Reset after send is done
* Add smoke test
* Use the default ingestion endpoint if statsbeat's endpoint is unknown
* Get statsbeat ikey from the config
* Delete StatsbeatTelemetry
* Make smoke test work
* Make smoke test stable
* Revert a line
* Fix unit tests compilation errors
* Make feature interval configurable
* Fix not seeing network and attach statsbeat in smoketest
* Update smoke test config
* Validate more statsbeats in the smoke test
* Enable more smoke test app servers for Statsbeat
* Address comments
* Address comments
* Fix lgtm
* Make MetricTelemetry class final since there is no need for StatsbeatTelemetry
* Update statsbeat iKey to be a workspace based mode
* Fix spotbug, make constants package protected
* No need for lazy init
* User more efficient entrySet instead of keySet
* Fix spotbugs
* Init azure metadata service in AttachStatsbeat
* No need for lazy init
* Fix nullpointerexception in ErrorHandlerTest and ThrottlingHandlerTest
* Fix exception messages
* Fix a nullpointerexception
* Handle race condition between send and reset
* Add unit test for race condition
* Make sense to make metadata service have the same interval as AttachStatsbeat
* Decide precisely when to shutdown AzureMetadataService
* Clean up debug logs
* Avoid reading resources from signed jar - logging configuration
* Avoid reading resources from signed jar - sdk version
* Add ignore matcher for ai agent classes
* Add signed jar access debug option
* Convert appsvc logging configuration also
* CLEAN UP SHADOW JAR
* Update submodule
* Cleanup
* Igore a test for now
* Fix Illegal reflective access by org.junit.contrib.java.lang.system.EnvironmentVariables
* Fix unit tests
* Remove unused instance var
* Fix test failures
* Delete a console output log
* Fix spotbug DC_DOUBLECHECK
* Fix statsbeat smoke test not sending 'Request Duration'
* Fix a compiling error in unit test
* Address feedback
* Make statsbeat config internal and skip parsing the connection string
* Address feedback
* Track total and count for request durations
* Address more feedback
* Address feedback
* Use BitSet and move decode to a test utils class
* Remove transient properties since it's not using failOnUnknown on json adapter
* Refactor AttachStatsbeat
* Refactor AzureMetadataService
* Reduce visibility
* Refactor StatsbeatModule
* Introduce resetForTest
* Make a couple things volatile
* A bit more
* Simplify
* Update singleton naming a bit
* Reduce reliance on singletons for testing
* Reduce reliance on singletons for testing
* Synchronization
* Use long instead of double
* Fix a compiling error
* Remove unused methods
* Remove unused imports
* Fix statsbeat module is not properly initialized
* Use AtomicLong for consistency
* Fix array index out of bound
* Fix ThrottlingTest
* Fix ErrorHandlerTest
* Reuse requestSuccessCount for requestDurationCount
* Throw an exception when init gets called more than once
* Switch expected and actual parameters in tests
* Atomicity
* Can not be null
* Inline
* Warning message
* Remove null check
* Remove null check
* Add name to TODO
* Remove getInterval method
* Extract ResourceProvider into enum
* Extract OperatingSystem into enum
* Extract Feature enum
* Fix ErrorHandlerTest and ThrottleingHandlerTest
* Convert CustomDimensions to use explicit fields
* Move more constants out of Constants
* Move more constants out of Constants
* Move more constants out of Constants
* Move more constants out of Constants
* Remove unused field
* Add todo
* Small renaming
* Remove StatsbeatHelper
* Comments
* Send base 64 encoded string instead of utf-8 string for instrumentation and feature
* Add missing copyrights
* Add a comment
* Spotbugs
* Remove todos
* Fix instrumentation is empty in the payload
* WithoutPadding on Base64 encoder
Co-authored-by: Trask Stalnaker <[email protected]>1 parent 3abc5f2 commit 9931364
File tree
46 files changed
+1813
-17
lines changed- agent
- agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal
- wasbootstrap/configuration
- exporter/src/main/java/com/microsoft/applicationinsights/agent
- instrumentation
- core/src
- main/java/com/microsoft/applicationinsights
- channel/concrete
- inprocess
- internal
- channel
- common
- config/connection
- statsbeat
- telemetry
- test
- java/com/microsoft/applicationinsights/internal
- channel/common
- statsbeat
- resources
- test/smoke
- appServers/global-resources
- testApps/Statsbeat
- src
- main/webapp
- WEB-INF
- smokeTest
- java/com/microsoft/applicationinsights/smoketest
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+1813
-17
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| |||
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
203 | 215 | | |
204 | 216 | | |
205 | 217 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | | - | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| |||
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
189 | 203 | | |
190 | 204 | | |
191 | 205 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
138 | | - | |
| 141 | + | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
75 | | - | |
76 | 89 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
0 commit comments