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

Move opentelemetry-exporter-jaeger from Quarkus to Quarkiverse #1

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "org.apache.maven.plugins:maven-compiler-plugin"
5 changes: 5 additions & 0 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Quarkus OpenTelemetry Exporters
release:
current-version: "0"
next-version: "999-SNAPSHOT"

48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:
name: Build on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: [windows-latest, macos-latest, ubuntu-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Prepare git
run: git config --global core.autocrlf false
if: startsWith(matrix.os, 'windows')

- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
cache: 'maven'

- name: Build with Maven
run: mvn -B formatter:validate clean install --file pom.xml
25 changes: 25 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Quarkiverse Pre Release

on:
pull_request:
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: pre release

steps:
- uses: radcortez/project-metadata-action@master
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- name: Validate version
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
run: |
echo '::error::Cannot release a SNAPSHOT version.'
exit 1
52 changes: 52 additions & 0 deletions .github/workflows/quarkus-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Quarkus ecosystem CI"
on:
workflow_dispatch:
watch:
types: [started]

# For this CI to work, ECOSYSTEM_CI_TOKEN needs to contain a GitHub with rights to close the Quarkus issue that the user/bot has opened,
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository

env:
ECOSYSTEM_CI_REPO: quarkusio/quarkus-ecosystem-ci
ECOSYSTEM_CI_REPO_FILE: context.yaml
JAVA_VERSION: 11

#########################
# Repo specific setting #
#########################

ECOSYSTEM_CI_REPO_PATH: quarkiverse-opentelemetry-exporter

jobs:
build:
name: "Build against latest Quarkus snapshot"
runs-on: ubuntu-latest
# Allow <ADMIN> to manually launch the ecosystem CI in addition to the bots
if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot' || github.actor == '<ADMIN>'

steps:
- name: Install yq
run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}

- name: Checkout repo
uses: actions/checkout@v2
with:
path: current-repo

- name: Checkout Ecosystem
uses: actions/checkout@v2
with:
repository: ${{ env.ECOSYSTEM_CI_REPO }}
path: ecosystem-ci

- name: Setup and Run Tests
run: ./ecosystem-ci/setup-and-test
env:
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
86 changes: 86 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Quarkiverse Release

on:
pull_request:
types: [closed]
paths:
- '.github/project.yml'

jobs:
release:
runs-on: ubuntu-latest
name: release
if: ${{github.event.pull_request.merged == true}}

steps:
- uses: radcortez/project-metadata-action@main
name: Retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- uses: actions/checkout@v3

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Configure Git author
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"

- name: Maven release ${{steps.metadata.outputs.current-version}}
run: |
git checkout -b release
mvn -B release:prepare -Prelease -DpreparationGoals="clean install" -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
git add docs/modules/ROOT/pages/includes/attributes.adoc
git commit -m "Update stable version for documentation"
fi
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

- name: Adjust tag for documentation changes
run: |
git checkout ${{steps.metadata.outputs.current-version}}
mvn -B clean install -DskipTests -DskipITs
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
git add docs/modules/ROOT/pages/includes/attributes.adoc
git commit -m "Update stable version for documentation"
# Move the tag after inclusion of documentation adjustments
git tag -f ${{steps.metadata.outputs.current-version}}
fi
# Go back to main
git checkout main

- name: Push changes to ${{github.base_ref}}
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{github.base_ref}}

- name: Push tags
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
branch: ${{github.base_ref}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
/.idea/.gitignore
/.idea/
/docs/modules/ROOT/pages/includes/
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing

Pile on! The help is welcome.

## Contributing an additional registry

It should be easy enough to follow the model of other registry implementations and sort out what else needs to happen to make your new registry work well.

### Docs

* The `docs` folder contains the root of the tree for building documentation.
* Configuration docs are automatically generated. They will show up in the `target` directory of root project after you build.
* The `docs` module build will copy those files into the `docs/modules/ROOT/pages/includes` directory
* Create a document, `micrometer-registry-<name>` for the new module in the `docs/modules/ROOT/pages/` directory.
It should minimally contain the following:
```asciidoc
= <Pretty Registry Name> // (1)

include::./includes/attributes.adoc[]

== Configuration
include::./includes/quarkus-micrometer-export-<name>.adoc[] // (2)
```
1. Each registry has a nice name for titles. ;)
2. If you look in the `target` directory of the root project after a build, you should see three files generated for each registry: one for build configuration, one for runtime configuration, and one for both. Use the one that contains both, which should be named similarly.
* Add this document (alphabetically) to `docs/modules/ROOT/nav.adoc`
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# quarkus-opentelemetry-exporter
Quarkus extensions related with additional OpenTelemetry exporters
# Quarkus OpenTelemetry Exporters

## About Exporters

Exporters are OpenTelemetry SDK Plugins which implement the Exporter interface, and emit telemetry to consumers, usually observability vendors.
Currently, we support this implementation:
* Jaeger

## Documentation

The documentation for this extension is stored in the `docs/` directory.

Please ask questions on stackoverflow (using quarkus and opentelemetry tags, or join us in the Quarkus Zulip chatroom,

Work in progress
5 changes: 5 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: quarkus-opentelemetry-exporter
title: Quarkus Opentelemetry Exporter
version: dev
nav:
- modules/ROOT/nav.adoc
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* xref:index.adoc[Introduction]
* xref:quarkus-opentelemetry-exporter-jaeger.adoc[Quarkus Opentelemetry Exporter Jaeger]
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:project-version: 0

:examples-dir: ./../examples/
13 changes: 13 additions & 0 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
= Quarkus OpenTelemetry Exporter

include::./includes/attributes.adoc[]

TIP: Exporters are OpenTelemetry (OTel) SDK Plugins which implement the Exporter interface, and emit telemetry to consumers, usually observability vendors.

Quarkus already includes the default OTLP exporter. This project will host additional ones.

== Additional resources
* https://quarkus.io/guides/opentelemetry[Quarkus OpenTelemetry guide]
* https://opentelemetry.io/docs/concepts/data-collection/[OTel Data collection]

Please ask questions on stackoverflow (using `quarkus` and `opentelemetry` tags, or join us in the https://quarkusio.zulipchat.com/[Quarkus Zulip] chatroom,
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
= Quarkus Opentelemetry Exporter Jaeger

include::./includes/attributes.adoc[]

Exporters are OpenTelemetry SDK Plugins which implement the Exporter interface, and emit telemetry to consumers, usually observability vendors.

This exporter send data to Jaeger using native protocol, previous to OTLP.

== Installation

If you want to use this extension, you need to add the `io.quarkiverse.opentelemetry.exporter:quarkus-opentelemetry-exporter` extension first to your build file.

For instance, with Maven, add the following dependency to your POM file:

[source,xml,subs=attributes+]
----
<dependency>
<groupId>io.quarkiverse.opentelemetry.exporter</groupId>
<artifactId>quarkus-opentelemetry-exporter-jaeger</artifactId>
<version>{project-version}</version>
</dependency>
----

Please mind the quarkus-opentelemetry extension already includes the default OTLP exporter. To deactivate that default exporter and only have this Jaeger extension exporting data, please set the following property:

`quarkus.opentelemetry.tracer.exporter.otlp.enabled=false`

[[extension-configuration-reference]]
== Extension Configuration Reference

include::includes/quarkus-opentelemetry-tracer-exporter-jaeger.adoc[leveloffset=+1, opts=optional]
Loading