-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ryan Fitzpatrick
committed
Aug 19, 2020
1 parent
2bef20a
commit d23263b
Showing
19 changed files
with
570 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.DEFAULT_GOAL := build | ||
|
||
.PHONY: build | ||
build: | ||
./gradlew build | ||
|
||
.PHONY: lint | ||
lint: | ||
./gradlew spotlessApply | ||
|
||
.PHONY: check | ||
check: | ||
./gradlew spotlessCheck | ||
|
||
.PHONY: clean | ||
clean: | ||
./gradlew clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# OpenTelemetry Java Contrib | ||
|
||
This project is intended to provide helpful libraries and standalone OpenTelemetry-based utilities that don't fit | ||
the express scope of the [OpenTelemetry Java](https://github.com/open-telemetry/opentelemetry-java) or | ||
[Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation) projects. If you need an | ||
easier way to bring observability to remote JVM-based applications and workflows that isn't easily satisfied by an SDK | ||
feature or via bytecode instrumentation, this project is hopefully for you. | ||
|
||
*This project is in its early stages and doesn't provide any assurances of stability or production readiness.* | ||
|
||
## Getting Started | ||
|
||
```bash | ||
# Build the complete project | ||
$ make build | ||
|
||
# Clean artifacts | ||
$ make clean | ||
|
||
# Apply formatting | ||
$ make lint | ||
``` | ||
|
||
## Contributing | ||
|
||
The Java Contrib project was initially formed to provide methods of easy remote JMX metric gathering and reporting, | ||
which is actively in development. If you have an idea for a similar use case in the metrics, traces, or logging | ||
domain we would be very interested in supporting it. Please | ||
[open an issue](https://github.com/open-telemetry/opentelemetry-java-contrib/issues/new/choose) to share your idea or | ||
suggestion. PRs are always welcome and greatly appreciated, but for larger functional changes a pre-coding introduction | ||
can be helpful to ensure this is the correct place and that active or conflicting efforts don't exist. | ||
|
||
## Owners | ||
|
||
- [Anuraag Agrawal](https://github.com/anuraaga), AWS | ||
- [Pablo Collins](https://github.com/pmcollins), Splunk | ||
- [Ryan Fitzpatrick](https://github.com/rmfitzpatrick), Splunk (maintainer) | ||
- [Trask Stalnaker](https://github.com/trask), Microsoft | ||
|
||
For more information on the OpenTelemetry community please see the | ||
[community content project](https://github.com/open-telemetry/community). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
id 'com.diffplug.spotless' version '5.1.1' | ||
} | ||
|
||
description = 'OpenTelemetry Contrib libraries and utilities for the JVM' | ||
|
||
allprojects { | ||
group = 'io.opentelemetry.contrib' | ||
version = '0.0.1' | ||
|
||
apply from: "$rootDir/gradle/spotless.gradle" | ||
apply from: "$rootDir/gradle/dependencies.gradle" | ||
|
||
it.ext.contrib = "$rootDir/gradle/contrib.gradle" | ||
|
||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Example Library | ||
|
||
This is an example library intended to be used as a template for easy additions to the OpenTelemetry Java Contrib project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apply from: project.contrib | ||
|
||
description = 'An example OpenTelemetry Java Contrib library' | ||
|
||
jar { | ||
manifest { | ||
attributes('Main-Class': 'io.opentelemetry.contrib.example.Library') | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
contrib/example/src/main/java/io/opentelemetry/contrib/example/Library.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.opentelemetry.contrib.example; | ||
|
||
public class Library { | ||
|
||
public boolean myMethod() { | ||
return true; | ||
} | ||
|
||
public static void main(String... args) { | ||
System.out.println("ExampleLibrary.main"); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
contrib/example/src/test/groovy/io/opentelemetry/contrib/example/LibraryTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.opentelemetry.contrib.example | ||
|
||
import spock.lang.Specification | ||
|
||
class LibraryTest extends Specification { | ||
|
||
def 'testSomeLibraryMethod'() { | ||
when: 'we create Library instance' | ||
def classUnderTest = new Library() | ||
|
||
then: 'it provides its method' | ||
classUnderTest.myMethod() == true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
org.gradle.daemon=false | ||
org.gradle.parallel=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'groovy' | ||
|
||
ext.releaseJavaVersion = JavaVersion.VERSION_1_7 | ||
ext.testJavaVersion = JavaVersion.VERSION_1_8 | ||
|
||
java { | ||
archivesBaseName = "${rootProject.name}-${project.name}" | ||
sourceCompatibility = project.releaseJavaVersion | ||
targetCompatibility = project.releaseJavaVersion | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
compileTestJava { | ||
sourceCompatibility = project.testJavaVersion | ||
targetCompatibility = project.testJavaVersion | ||
} | ||
|
||
dependencies { | ||
testImplementation project.libraries.spock | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
ext { | ||
versions = [ | ||
otelStable : '0.7.1' | ||
] | ||
|
||
libraries = [ | ||
// otel | ||
otelApi : "io.opentelemetry:opentelemetry-api:${versions.otelStable}", | ||
otelSdk : "io.opentelemetry:opentelemetry-sdk:${versions.otelStable}", | ||
otelExporterInMemory : "io.opentelemetry:opentelemetry-exporters-inmemory:${versions.otelStable}", | ||
otelExporterJaeger : "io.opentelemetry:opentelemetry-exporters-jaeger:${versions.otelStable}", | ||
otelExporterLogging : "io.opentelemetry:opentelemetry-exporters-logging:${versions.otelStable}", | ||
otelExporterOtlp : "io.opentelemetry:opentelemetry-exporters-otlp:${versions.otelStable}", | ||
otelExporterPrometheus : "io.opentelemetry:opentelemetry-exporters-prometheus:${versions.otelStable}", | ||
otelExporterZipkin : "io.opentelemetry:opentelemetry-exporters-zipkin:${versions.otelStable}", | ||
otelProto : "io.opentelemetry:opentelemetry-proto:${versions.otelStable}", | ||
|
||
// testing | ||
spock : dependencies.create('org.spockframework:spock-core:1.3-groovy-2.5', { | ||
exclude group: 'org.codehaus.groovy', module: 'groovy-all' | ||
}) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apply plugin: 'com.diffplug.spotless' | ||
apply plugin: 'groovy' | ||
|
||
spotless { | ||
format 'misc', { | ||
target '**/*.md', '.gitignore' | ||
indentWithSpaces(20) | ||
trimTrailingWhitespace() | ||
endWithNewline() | ||
} | ||
java { | ||
target '**/src/*/java/**/*.java' | ||
googleJavaFormat() | ||
indentWithSpaces() | ||
licenseHeaderFile rootProject.file('gradle/java.license.header'), '(package|import|public)' | ||
} | ||
groovy { | ||
target '**/*.groovy' | ||
greclipse() | ||
indentWithSpaces() | ||
licenseHeaderFile rootProject.file('gradle/java.license.header'), '(package|import|class)' | ||
} | ||
groovyGradle { | ||
target '**/*.gradle' | ||
greclipse() | ||
indentWithSpaces() | ||
} | ||
} | ||
|
||
check.dependsOn 'spotlessCheck' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.