Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 40 additions & 1 deletion ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -823,4 +823,43 @@ END OF CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL PUBLIC LICENSE
* limitations under the License.
*/
============================================================================================================================
END OF FILE FROM /commons-lang-LANG_3_6/src/main/java/org/apache/commons/lang3/StringUtils.java NOTICE, INFORMATION AND LICENSE
END OF FILE FROM /commons-lang-LANG_3_6/src/main/java/org/apache/commons/lang3/StringUtils.java NOTICE, INFORMATION AND LICENSE

=========================================
protobuf-java

Copyright 2008 Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.

* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
=========================================
43 changes: 40 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,45 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
}
}

plugins {
id 'com.github.johnrengelman.shadow' version '2.0.1'
}

apply from: "$buildScriptsDir/common-java.gradle"
apply from: "$buildScriptsDir/publishing.gradle"

apply plugin: 'com.google.protobuf'

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.14.0'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java { }
}
task.plugins {
grpc { }
}
}
}
}

import org.apache.tools.ant.taskdefs.condition.Os

boolean skipWinNative = (System.properties['skipWinNative'] ?: 'false').toBoolean()
Expand Down Expand Up @@ -54,6 +86,9 @@ dependencies {
compile ([group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'])
compile ([group: 'com.google.guava', name: 'guava', version: '20.0'])
compile ([group: 'com.google.code.gson', name: 'gson', version: '2.8.2'])
compile ([group: 'com.google.protobuf', name:'protobuf-java', version:'3.6.1'])
compile ([group: 'io.grpc', name: 'grpc-stub', version: '1.14.0'])
compile ([group: 'io.grpc', name: 'grpc-protobuf', version: '1.14.0'])
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
testCompile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
Expand All @@ -65,10 +100,12 @@ shadowJar {
relocate 'org.apache.http', "${dependenciesPrefix}.http"
relocate 'eu.infomas.annotation', "${dependenciesPrefix}.annotation"
relocate 'org.apache.commons', "${dependenciesPrefix}.apachecommons"
relocate 'com.google.common', "${dependenciesPrefix}.googlecommon"
relocate 'javax.annotation', "${dependenciesPrefix}.javaxannotation"
relocate 'com.google.gson', "${dependenciesPrefix}.gson"
relocate 'com.google.thirdparty', "${dependenciesPrefix}.google.thirdparty"
relocate 'com.google', "${dependenciesPrefix}.google"
relocate 'io.grpc', "${dependenciesPrefix}.io.grpc"
relocate 'io.opencensus', "${dependenciesPrefix}.io.opencensus"

exclude '**/*.proto'
}

jar {
Expand Down
28 changes: 28 additions & 0 deletions core/src/main/proto/Availability.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "google/protobuf/duration.proto";

message Availability {
int32 ver = 1;

string id = 2;

string name = 3;

google.protobuf.Duration duration = 4;

bool success = 5;

string runLocation = 6;

string message = 7;

map<string, string> properties = 8;

map<string, double> measurements = 9;
}
34 changes: 34 additions & 0 deletions core/src/main/proto/DataPoint.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "google/protobuf/wrappers.proto";
import "DataPointType.proto";

message DataPoint
{
string ns = 1;

string name = 2;

// Metric type. Single measurement or aggregated value
DataPointType kind = 3;

// Single value for a Measurement, sum of individual measurements for an Aggregation
double value = 4;

// should not be set for a measurement
google.protobuf.Int32Value count = 5;

// should not be set for a measurement
google.protobuf.DoubleValue min = 6;

// should not be set for a measurement
google.protobuf.DoubleValue max = 7;

// should not be set for a measurement
google.protobuf.DoubleValue stdDev = 8;
}
12 changes: 12 additions & 0 deletions core/src/main/proto/DataPointType.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

enum DataPointType
{
Measurement = 0;
Aggregation = 1;
}
34 changes: 34 additions & 0 deletions core/src/main/proto/Dependency.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

message Dependency {
int32 ver = 1;

string name = 2;

string id = 3;

string resultCode = 4;

google.protobuf.Duration duration = 5;

// the default is interpreted as true
google.protobuf.BoolValue success = 6;

string data = 7;

string type = 8;

string target = 9;

map<string, string> properties = 10;

map<string, double> measurements = 11;
}
16 changes: 16 additions & 0 deletions core/src/main/proto/Event.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

message Event {
int32 ver = 1;

string name = 2;

map<string, string> properties = 3;

map<string, double> measurements = 4;
}
23 changes: 23 additions & 0 deletions core/src/main/proto/Exception.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "ExceptionDetails.proto";
import "SeverityLevel.proto";

message Exception {
int32 ver = 1;

repeated ExceptionDetails exceptions = 2;

SeverityLevel severityLevel = 3;

string problemId = 4;

map<string, string> properties = 5;

map<string, double> measurements = 6;
}
27 changes: 27 additions & 0 deletions core/src/main/proto/ExceptionDetails.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "StackFrame.proto";
import "google/protobuf/wrappers.proto";

message ExceptionDetails {
int32 id = 1;

int32 outerId = 2;

string typeName = 3;

string message = 4;

// the default is true
google.protobuf.BoolValue hasFullStack = 5;

string stack = 6;

repeated StackFrame parsedStack = 7;

}
18 changes: 18 additions & 0 deletions core/src/main/proto/Message.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "SeverityLevel.proto";

message Message {
int32 ver = 1;

string message = 2;

SeverityLevel severityLevel = 3;

map<string, string> properties = 4;
}
17 changes: 17 additions & 0 deletions core/src/main/proto/Metric.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "DataPoint.proto";

message Metric {
int32 ver = 1;

// only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.
repeated DataPoint metrics = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still believe that this List should be depreciated from the MetricData class which is creating this non-sense. Indeed we can bring in all the fields in the MetricData class inside the DataPoint class and just deprecate the whole class itself. It is of no use IMO and is just taking Memory footprint. Anyways, can be a conversation for seperate PR.


map<string, string> properties = 3;
}
21 changes: 21 additions & 0 deletions core/src/main/proto/PageView.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
syntax = "proto3";
package contracts;

option csharp_namespace = "Microsoft.LocalForwarder.Library.Inputs.Contracts";
option java_package = "com.microsoft.localforwarder.library.inputs.contracts";
option java_multiple_files = true;

import "google/protobuf/duration.proto";
import "Event.proto";

message PageView {
Event event = 1;

string url = 2;

google.protobuf.Duration duration = 3;

string id = 4;

string referrerUri = 5;
}
Loading