Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure metrics using otel4s #396

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
501f8e1
Measure metrics using `otel4s`
iRevive Jun 9, 2022
67462d9
Merge branch 'main' into otel4s
iRevive Jun 9, 2022
8502140
Merge branch 'main' into otel4s
iRevive Jun 13, 2022
0a99a7b
Update otel4s
iRevive Jun 13, 2022
734fedf
Use `CrossType.Full`
iRevive Jun 13, 2022
4a178e8
Use `otel4s-testkit`
iRevive Jun 18, 2022
0aa2dd4
Merge branch 'main' into otel4s
iRevive Jul 3, 2022
a3b253d
Update `otel4s-testkit`
iRevive Jul 3, 2022
1e16c63
Generate headers, update `ci.yml`
iRevive Jul 3, 2022
7f172fb
Use snapshot version of `otel4s`
iRevive Aug 3, 2022
c5e6572
Merge branch 'main' into otel4s
iRevive Aug 3, 2022
016178b
Use `Resolver.sonatypeOssRepos`
iRevive Aug 3, 2022
3fd620a
Merge branch 'main' into otel4s
iRevive Jan 25, 2023
831588c
Use `otel4s` snapshot
iRevive Jan 25, 2023
e17b987
Merge branch 'main' into otel4s
iRevive Feb 8, 2023
369482e
Use `0.1.0` of `otel4s`
iRevive Feb 8, 2023
bbee8bf
Merge branch 'main' into otel4s
iRevive Mar 30, 2024
8792c34
Update otel4s to `0.5.0`
iRevive Mar 30, 2024
8afd322
Move otel4s integration to a separate module
iRevive Mar 31, 2024
00e75ee
generate CI workflow
iRevive Mar 31, 2024
8212c5b
Update build.sbt
iRevive Apr 16, 2024
8e12526
build.sbt: update previous mima artifacts for otel4s
iRevive Apr 16, 2024
98da94d
add scaladocs, update tests
iRevive Apr 16, 2024
f7a16b7
fix compilation issue
iRevive Apr 16, 2024
041bd81
make mima happy
iRevive Apr 16, 2024
6bfb557
Use otel4s `0.7.0`
iRevive May 5, 2024
0aae98b
Merge branch 'main' into otel4s
iRevive May 5, 2024
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
127 changes: 97 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ jobs:
os: [ubuntu-latest]
scala: [2.12, 2.13, 3]
java: [temurin@8]
project: [rootJS, rootJVM, rootNative]
project: [coreJVM, coreJS, coreNative, otel4sJVM, otel4sJS, otel4sNative]
exclude:
- project: otel4sJVM
scala: 2.12
- project: otel4sJS
scala: 2.12
- project: otel4sNative
scala: 2.12
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -80,11 +87,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p core/.native/target core/.js/target core/.jvm/target project/target
run: mkdir -p otel4s/.native/target core/.native/target otel4s/.js/target otel4s/.jvm/target core/.js/target core/.jvm/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar core/.native/target core/.js/target core/.jvm/target project/target
run: tar cf targets.tar otel4s/.native/target core/.native/target otel4s/.js/target otel4s/.jvm/target core/.js/target core/.jvm/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down Expand Up @@ -121,92 +128,152 @@ jobs:
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
run: sbt +update

- name: Download target directories (2.12, rootJS)
- name: Download target directories (2.12, coreJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-coreJVM

- name: Inflate target directories (2.12, rootJS)
- name: Inflate target directories (2.12, coreJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.12, rootJVM)
- name: Download target directories (2.12, coreJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-coreJS

- name: Inflate target directories (2.12, rootJVM)
- name: Inflate target directories (2.12, coreJS)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.12, rootNative)
- name: Download target directories (2.12, coreNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-coreNative

- name: Inflate target directories (2.12, rootNative)
- name: Inflate target directories (2.12, coreNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13, rootJS)
- name: Download target directories (2.13, coreJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-coreJVM

- name: Inflate target directories (2.13, rootJS)
- name: Inflate target directories (2.13, coreJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13, rootJVM)
- name: Download target directories (2.13, coreJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-coreJS

- name: Inflate target directories (2.13, rootJVM)
- name: Inflate target directories (2.13, coreJS)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13, rootNative)
- name: Download target directories (2.13, coreNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-coreNative

- name: Inflate target directories (2.13, rootNative)
- name: Inflate target directories (2.13, coreNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, rootJS)
- name: Download target directories (2.13, otel4sJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-otel4sJVM

- name: Inflate target directories (3, rootJS)
- name: Inflate target directories (2.13, otel4sJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, rootJVM)
- name: Download target directories (2.13, otel4sJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-otel4sJS

- name: Inflate target directories (3, rootJVM)
- name: Inflate target directories (2.13, otel4sJS)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, rootNative)
- name: Download target directories (2.13, otel4sNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-otel4sNative

- name: Inflate target directories (3, rootNative)
- name: Inflate target directories (2.13, otel4sNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, coreJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-coreJVM

- name: Inflate target directories (3, coreJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, coreJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-coreJS

- name: Inflate target directories (3, coreJS)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, coreNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-coreNative

- name: Inflate target directories (3, coreNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, otel4sJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-otel4sJVM

- name: Inflate target directories (3, otel4sJVM)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, otel4sJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-otel4sJS

- name: Inflate target directories (3, otel4sJS)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, otel4sNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-otel4sNative

- name: Inflate target directories (3, otel4sNative)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
36 changes: 33 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ ThisBuild / startYear := Some(2019)
ThisBuild / licenses := Seq(License.MIT)
ThisBuild / tlSiteApiUrl := Some(url("https://www.javadoc.io/doc/org.typelevel/keypool_2.12"))

lazy val root = tlCrossRootProject.aggregate(core)
lazy val root = tlCrossRootProject.aggregate(core, otel4s)

ThisBuild / githubWorkflowBuildMatrixAdditions := {
val projects = core.componentProjects ++ otel4s.componentProjects

Map("project" -> projects.map(_.id).toList)
}

ThisBuild / githubWorkflowBuildMatrixExclusions ++= {
val projects = otel4s.componentProjects.map(_.id)
projects.map(project => MatrixExclude(Map("project" -> project, "scala" -> "2.12")))
}

lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
Expand Down Expand Up @@ -43,19 +54,38 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
ProblemFilters
.exclude[DirectMissingMethodProblem]("org.typelevel.keypool.KeyPoolBuilder.this"),
ProblemFilters
.exclude[DirectMissingMethodProblem]("org.typelevel.keypool.KeyPool#Builder.this")
.exclude[DirectMissingMethodProblem]("org.typelevel.keypool.KeyPool#Builder.this"),
ProblemFilters.exclude[DirectMissingMethodProblem]("org.typelevel.keypool.Pool#Builder.this")
)
)

lazy val otel4s = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("otel4s"))
.dependsOn(core)
.settings(commonSettings)
.settings(
name := "keypool-otel4s",
startYear := Some(2024),
crossScalaVersions := Seq(Scala213, Scala3),
libraryDependencies ++= Seq(
"org.typelevel" %%% "otel4s-core-metrics" % otel4sV,
"org.typelevel" %%% "otel4s-sdk-metrics-testkit" % otel4sV % Test
),
mimaPreviousArtifacts ~= { _.filterNot(_.revision.startsWith("0.4")) }
)

lazy val docs = project
.in(file("site"))
.settings(commonSettings)
.dependsOn(core.jvm)
.dependsOn(core.jvm, otel4s.jvm)
.enablePlugins(TypelevelSitePlugin)

val catsV = "2.10.0"
val catsEffectV = "3.5.4"

val otel4sV = "0.7.0"

val munitV = "1.0.0-RC1"
val munitCatsEffectV = "2.0.0-M5"

Expand Down
Loading