Skip to content

Commit

Permalink
Merge pull request #374 from ScalaConsultants/373-otel-extension-fat-…
Browse files Browse the repository at this point in the history
…jar-publish

373 otel extension fat jar publish
  • Loading branch information
lgajowy authored Apr 12, 2022
2 parents 52f407a + b0acf7b commit 262d241
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ Add this entry to your `application.conf`:

### OpenTelemetry Extension:

Download the latest OTEL Extension jar from https://github.com/ScalaConsultants/mesmer/releases and add a parameter when
running your JVM:
Download the latest OTEL Extension fat jar from Maven repository and add a parameter when running your JVM:

```
java -javaagent:opentelemetry-javaagent110.jar \ -- this is the OpenTelemetry Agent
-Dotel.javaagent.extensions=mesmer-otel-extension.jar -- this is our OTEL Agent Extension
-Dotel.javaagent.extensions=mesmer-otel-extension-assembly.jar -- this is our OTEL Agent Extension fat jar
```

### Exporter:
Expand Down
19 changes: 16 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Dependencies._
import sbt.Package.{ MainClass, ManifestAttributes }


lazy val scala213 = "2.13"

inThisBuild(
List(
Expand All @@ -19,6 +21,12 @@ inThisBuild(
"Piotr Jósiak",
"piotr.josiak@gmail.com",
url("https://github.com/worekleszczy")
),
Developer(
"lgajowy",
"Łukasz Gajowy",
"lukasz.gajowy@gmail.com",
url("https://github.com/lgajowy")
)
),
scalacOptions ++= Seq("-deprecation", "-feature"),
Expand Down Expand Up @@ -86,7 +94,7 @@ lazy val otelExtension = (project in file("otel-extension"))
scalatest
},
assembly / test := {},
assembly / assemblyJarName := "mesmer-otel-extension.jar",
assembly / assemblyJarName := s"${name.value}_${scalaBinaryVersion.value}-${version.value}-assembly.jar",
assemblyMergeStrategySettings,
Test / fork := true,
Test / parallelExecution := true,
Expand All @@ -95,7 +103,12 @@ lazy val otelExtension = (project in file("otel-extension"))
Tests.Group(name = test.name, tests = Seq(test), runPolicy = group.runPolicy)
}
}),
Test / testOnly / testGrouping := (Test / testGrouping).value
Test / testOnly / testGrouping := (Test / testGrouping).value,
assembly / artifact := {
val art = (assembly / artifact).value
art.withClassifier(Some("assembly"))
},
addArtifact(assembly / artifact, assembly)
)
.dependsOn(core % "provided->compile;test->test;compile->compile")

Expand Down
4 changes: 0 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ object Dependencies {

val akkaMultiNodeTestKit = Seq("com.typesafe.akka" %% "akka-multi-node-testkit" % AkkaVersion % Test)

val slf4jApi = Seq("org.slf4j" % "slf4j-api" % "1.7.33")

val reflection: String => Seq[ModuleID] = version => Seq("org.scala-lang" % "scala-reflect" % version)

val exampleDependencies = Seq(
"io.circe" %% "circe-core" % CirceVersion,
"io.circe" %% "circe-generic" % CirceVersion,
Expand Down

0 comments on commit 262d241

Please sign in to comment.