Skip to content

Commit

Permalink
Add Inferred spans extension (#47)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: Sylvain Juge <[email protected]>
  • Loading branch information
JonasKunz and SylvainJuge authored Jan 9, 2024
1 parent 230f33d commit b119f5e
Show file tree
Hide file tree
Showing 62 changed files with 12,115 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ examples/**/build/
*.ipr
*.iws
out/

# OS X
**/.DS_Store
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ version '0.0.1-SNAPSHOT'
defaultTasks("agent:assemble")

subprojects {
group = rootProject.group
version = rootProject.version

apply plugin: "java"
apply plugin: "maven-publish" //Allows to run ./gradle publishToMavenLocal for easy local testing
apply plugin: "com.diffplug.spotless"

ext {
Expand All @@ -23,6 +25,7 @@ subprojects {
}

repositories {
mavenLocal()
mavenCentral()
maven {
name = "sonatype"
Expand All @@ -32,9 +35,16 @@ subprojects {

spotless {
java {
target("src/**/*.java")
googleJavaFormat()

licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)")
target("src/**/*.java")
.named("default")

licenseHeaderFile(rootProject.file("buildscripts/spotless.reallogic.license.java"), "(package|import|public)")
.named("reallogic")
.onlyIfContentMatches("package co.elastic.otel.profiler.collections;")

}
}

Expand Down
33 changes: 33 additions & 0 deletions buildscripts/spotless.reallogic.license.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you 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.
*/
/*
* Copyright 2014-2020 Real Logic Limited.
*
* 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
*
* https://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.
*/
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ opentelemetryInstrumentationAlphaBom = { group = "io.opentelemetry.instrumentati
awsContribResources = { group = "io.opentelemetry.contrib", name = "opentelemetry-aws-resources", version.ref = "opentelemetryContribAlpha" }
contribResources = { group = "io.opentelemetry.contrib", name = "opentelemetry-resource-providers", version.ref = "opentelemetryContribAlpha" }

assertJ-core = "org.assertj:assertj-core:3.24.2"
assertj-core = "org.assertj:assertj-core:3.24.2"
awaitility = "org.awaitility:awaitility:4.2.0"
findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.0"

[bundles]

Expand Down
41 changes: 41 additions & 0 deletions inferred-spans/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
plugins {
`java-library`
}

dependencies {
compileOnly("io.opentelemetry:opentelemetry-sdk")
compileOnly(libs.findbugs.jsr305)
implementation("com.lmax:disruptor:3.4.4")
implementation("org.jctools:jctools-core:4.0.1")
implementation("com.blogspot.mydailyjava:weak-lock-free:0.18")

testCompileOnly(libs.findbugs.jsr305)
testImplementation("io.opentelemetry:opentelemetry-sdk")
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
testImplementation(libs.assertj.core)
testImplementation(libs.awaitility)
testImplementation("org.kohsuke:github-api:1.133")
testImplementation("org.apache.commons:commons-compress:1.21")
testImplementation("tools.profiler:async-profiler:1.8.3")
}

tasks.withType<Test>().all {
jvmArgs("-Djava.util.logging.config.file="+sourceSets.test.get().output.resourcesDir+"/logging.properties")
}


publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
}
}
}
Loading

0 comments on commit b119f5e

Please sign in to comment.