Commit d7b87ce
authored
LocalForwarderChannel (#723)
* added proto files to src folder. added protobuf codegen plugin to build
* set package for protobuf java files
* removed unneeded files; excluded *.proto from jar
* removed c# related file
* removed some extra spaces
* first pass at refactoring for channel implementation
* javadoc for type param; updated tests
* finished pull up of common methods to ATelemetryChannel.
updated build so IntelliJ can see generated code.
removed method overload from interface (bad practice...)
implemented simple LocalForwarderTelemetryTransmitter and Factory (doesn't have the retry logic like the InProcess Factory)
* ignore generated files.
updated build file to shadow services provided with grpc libraries.
* Surfaces type and envelope names for classes;
Also surfaces BaseData version number.
Deprecated *Telemetry classes who's *Data classes were also deprecated.
Some additional fields were surfaced which were previously hidden.
* if using localforwarder, force sdk quickpulse to be disabled.
Fixed some bug with QuickPulse grabbing CPU data before the first datum is initialized; i.e. skip if null.
Changed logic so a Nop channel is used if a custom channel is misconfigured and cannot be initialized.
* fixed case for key to be consistent with other SDKs
* added cleanup code to make thread shutdown more reliable.
* implemented channel with transformation functions from internal model to proto model.
* recognize if the given name is the default channel.
* Instead of disabling telemetry, just log a warning about channel configuration. This should still work if the channel is set after configuration.
Use singleton for nop channel and don't actually set channel in TelemetryConfiguration, just return NopTelemetryChannel instance.
Updated test to check for nop channel instead of null.
* set stddev to 0.0 in this helper method
* stubbed in test classes.
exposed some methods for testing
* added tests for transformation functions.
* use %n instead of \n in format string
* extracted the exception transformer functions for stackframe and exceptiondetails to be visiblefortesting
corrected one precondition which was casing issues.
* wrote tests for the utility functions in the localforwarder transformer functions
* extracted transmitter into its own class.
wrote test for transmitter.
* added assert to fail if timeout is reached
* wrote tests for localforwarderchanel.
exposed some methods for inserting mocks.
removed final from some classes so they could be mocked.
* added grpc-test to build and created proper transmitter test.
reworked parameters in transmitter constructor to be more easily testable.
removed endpoint field since it's not necessary to keep around.
* renamed abstract class to fit project conventions
* added javadoc
* using private lock object instead
* we should throw if it fails to configure
* ENVELOPE_NAME can be private
* MetricTelemetry.ENVELOPE_NAME cannot be private, though...
* fix spacing
* we only need 1 thread minimum
* remove redundant null check
* fixed typo
* Revert "ENVELOPE_NAME can be private"
This reverts commit 0fb0898.
* removed unused import
* added isInitialized to prevent calling initialize twice
* removed additional field in Envelope since it's generated.
* removed unused import.
* fixed tests after refactor
* remove enableRetry from ManagedChannel; we don't want to use experimental API
* removed commented code in build script
* updated TPN
* reworked shutdown to be aysnc. added retry to grpcchannel
* removed sync
* updated changelog
* added null check for test scenario1 parent 8f40f7f commit d7b87ce
File tree
44 files changed
+2576
-439
lines changed- azure-application-insights-spring-boot-starter/src/main/java/com/microsoft/applicationinsights/autoconfigure
- core
- src
- main/java/com/microsoft/applicationinsights
- channel/concrete
- inprocess
- localforwarder
- nop
- internal
- channel
- common
- config
- quickpulse
- shutdown
- telemetry
- test/java/com/microsoft/applicationinsights
- channel/concrete/localforwarder
- extensibility/initializer
- internal
- channel/common
- config
- telemetry
- test/performance/src/main/java/com/microsoft/applicationinsights/core/volume
- web/src/main/java/com/microsoft/applicationinsights/web/internal
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+2576
-439
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
862 | 866 | | |
863 | 867 | | |
864 | 868 | | |
865 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | | - | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | | - | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| |||
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
51 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
52 | 69 | | |
53 | 70 | | |
54 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
55 | 74 | | |
56 | 75 | | |
57 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
58 | 94 | | |
59 | 95 | | |
60 | 96 | | |
| |||
89 | 125 | | |
90 | 126 | | |
91 | 127 | | |
| 128 | + | |
92 | 129 | | |
93 | 130 | | |
94 | 131 | | |
95 | 132 | | |
| 133 | + | |
96 | 134 | | |
97 | 135 | | |
98 | 136 | | |
99 | 137 | | |
100 | 138 | | |
| 139 | + | |
101 | 140 | | |
102 | 141 | | |
103 | 142 | | |
| |||
114 | 153 | | |
115 | 154 | | |
116 | 155 | | |
117 | | - | |
118 | 156 | | |
119 | 157 | | |
120 | 158 | | |
121 | 159 | | |
122 | 160 | | |
123 | 161 | | |
124 | 162 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 163 | | |
134 | 164 | | |
135 | 165 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
0 commit comments