-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial gradle project * Github templates * set default and cmd line endings * Correct readme's instrumentation description
- Loading branch information
1 parent
2bef20a
commit c40c4da
Showing
22 changed files
with
640 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,4 @@ | ||
* text=auto eol=lf | ||
|
||
*.bat text eol=crlf | ||
*.cmd 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Description** | ||
A clear and concise description of what the bug is or observed behavior. | ||
|
||
**Steps to reproduce** | ||
Provide a (runnable) recipe for reproducing the error. | ||
|
||
**Expectation** | ||
A clear and concise description of what you expected to see. | ||
|
||
**What applicable config did you use?** | ||
Config: (e.g. the yaml config file) | ||
|
||
**Relevant Environment Information** | ||
Version: (e.g., `v0.0.1`, `2bef20a`, etc.) | ||
OS: (e.g., "Ubuntu 20.04") | ||
Compiler (if manually compiled): (e.g., "openJDK 1.8.0_252") | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: feature | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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 @@ | ||
**Description:** | ||
|
||
< Describe what is being changed or added. | ||
Ex. Bug fix - Describe the bug and how this fixes it. | ||
Ex. Feature addition - Describe what this provides and why. > | ||
|
||
**Existing Issue(s):** | ||
|
||
< Link any applicable issues. > | ||
|
||
**Testing:** | ||
|
||
< Describe what testing was performed and any tests were added. > | ||
|
||
**Documentation:** | ||
|
||
< Describe the documentation added. | ||
Please be sure to modify relevant existing documentation if needed. > | ||
|
||
**Outstanding items:** | ||
|
||
< Anything that these changes are intentionally missing | ||
that will be needed or can be helpful in the future. > |
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 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() | ||
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.