Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/config/.rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[global]
disable = ["line-length", "ul-style", "no-inline-html", "fenced-code-language"]

[no-duplicate-heading]
siblings-only = true

[no-trailing-punctuation]
punctuation = ".,;:"

[ol-prefix]
style = "ordered"
5 changes: 5 additions & 0 deletions .github/config/flint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
setup_migration_version = 2

[checks.lychee]
check_all_local = true
14 changes: 5 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,19 @@ jobs:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

# this is not a required check to avoid blocking pull requests if external links break
link-check:
uses: ./.github/workflows/reusable-link-check.yml

markdown-lint-check:
uses: ./.github/workflows/reusable-markdown-lint.yml
lint:
uses: ./.github/workflows/reusable-lint-check.yml

required-status-check:
needs:
- build
- test-declarative-configuration-run
- markdown-lint-check
- lint
runs-on: ubuntu-latest
if: always()
steps:
- if: >
needs.build.result != 'success' ||
needs.test-declarative-configuration-run.result != 'success' ||
needs.markdown-lint-check.result != 'success'
run: exit 1
needs.lint.result != 'success'
run: exit 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable - Link check
name: Reusable - Lint check

on:
workflow_call:
Expand All @@ -7,7 +7,7 @@ permissions:
contents: read

jobs:
link-check:
lint-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -16,16 +16,18 @@ jobs:

- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1

- name: Link check for pull requests
- name: Lint for pull requests
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: mise run lint:links
run: mise run lint

- name: Link check for pushes and scheduled workflows
- name: Lint for pushes and workflow dispatches
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:links --full
run: mise run lint
23 changes: 0 additions & 23 deletions .github/workflows/reusable-markdown-lint.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .markdownlint.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ To build the project, run:
./gradlew assemble
```

## Markdown linting
## Linting

This repository uses [markdownlint](https://github.com/DavidAnson/markdownlint) via `markdownlint-cli2` managed by [mise](https://github.com/jdx/mise).
This repository uses [flint](https://github.com/grafana/flint) managed by [mise](https://github.com/jdx/mise) to run the configured lint checks, including Markdown and link validation.

To check all Markdown files:
To run all lint checks:

```bash
mise run lint:markdown
mise run lint
```

(note: Windows users may need to run `mise install` first)

To automatically fix fixable issues:

```bash
mise run lint:markdown --fix
mise run lint:fix
```

## Style guide
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,73 +23,73 @@ To build the all of examples, run:

- [Using the SDK AutoConfiguration module](autoconfigure)
- This module contains a fully functional example of using the autoconfigure
SDK extension module to configure the SDK using only environment
variables (or system properties).
SDK extension module to configure the SDK using only environment
variables (or system properties).
- Note: the `opentelemetry-sdk-extension-autoconfigure` module is still
experimental at this time.
experimental at this time.
- [Manual instrumentation of HTTP](http)
- This module provides an example of writing manual instrumentation for
HTTP, both client and server.
HTTP, both client and server.
- Note: More production-ready instrumentation for HTTP is provided as part
of the [OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation)
project.
of the [OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation)
project.
- [Manual span creation and baggage propagation](manual-tracing)
- This module provides an example of manually creating spans using the
OpenTelemetry API with the ExtendedTracer.
OpenTelemetry API with the ExtendedTracer.
- Additionally, it demonstrates how to use the OpenTelemetry API to
propagate baggage items.
propagate baggage items.
- [Configuring the Jaeger Exporter](jaeger)
- This module contains a fully functional example of configuring the
OpenTelemetry SDK to use a Jaeger exporter and send spans to it
using the OpenTelemetry API.
OpenTelemetry SDK to use a Jaeger exporter and send spans to it
using the OpenTelemetry API.
- Note: This example requires Docker to be installed.
- [Using the OpenTelemetry Java Agent](javaagent)
- This module demonstrates using the OpenTelemetry Java Agent with a simple
Spring Boot application. Traces, metrics, and logs are exported to a
collector via OTLP.
Spring Boot application. Traces, metrics, and logs are exported to a
collector via OTLP.
- [Spring native image telemetry with OpenTelemetry Spring Starter](spring-native)
- This module demonstrates using the OpenTelemetry Spring Boot starter with a
GraalVM native image. Traces and metrics are exported to a collector via OTLP.
GraalVM native image. Traces and metrics are exported to a collector via OTLP.
- [Configuring Log Appenders](log-appender)
- This module demonstrates how to configure the Log4j and Logback appenders to
bridge logs into the OpenTelemetry Log SDK.
bridge logs into the OpenTelemetry Log SDK.
- [Configuring the Logging Exporters](logging)
- This module contains a fully functional example of configuring the
OpenTelemetry SDK to use a logging exporter.
OpenTelemetry SDK to use a logging exporter.
- [Exporting application logs using JSON logging in Kubernetes](logging-k8s-stdout-otlp-json)
- This module demonstrates how to export application logs using JSON logging
in Kubernetes.
in Kubernetes.
- [Using the OpenTelemetry metrics API](metrics)
- This module contains examples of using the OpenTelemetry metrics APIs.
- [Using OpenTelemetry Micrometer shim](micrometer-shim)
- This module contains an example of a typical Micrometer setup (Spring Boot
with Spring Boot Actuator) configured to bridge metrics to OpenTelemetry
with the Micrometer shim.
with Spring Boot Actuator) configured to bridge metrics to OpenTelemetry
with the Micrometer shim.
- Note: The Micrometer shim is still experimental at this time.
- [Setting up OTLP exporters](otlp)
- OTLP is the OpenTelemetry Protocol. This module demonstrates how to
configure the OTLP exporters and send data to the OpenTelemetry Collector
using them.
configure the OTLP exporters and send data to the OpenTelemetry Collector
using them.
- Note: This example requires Docker to be installed.
- [Setting up the Prometheus exporter](prometheus)
- This module shows how to configure the OpenTelemetry SDK to expose an
endpoint that can be scraped by Prometheus.
endpoint that can be scraped by Prometheus.
- Note: The Prometheus metric reader is still experimental at this time.
- [Manually Configuring the SDK](sdk-usage)
- This module shows some concrete examples of manually configuring the
OpenTelemetry SDK for tracing.
OpenTelemetry SDK for tracing.
- [Telemetry Testing](telemetry-testing)
- This module demonstrates how to test OpenTelemetry instrumentation with
MockServer.
MockServer.
- [Setting up the Zipkin exporter](zipkin)
- This module contains a fully functional example of configuring the
OpenTelemetry SDK to use a Zipkin exporter and send spans to a
Zipkin backend using the OpenTelemetry API.
OpenTelemetry SDK to use a Zipkin exporter and send spans to a
Zipkin backend using the OpenTelemetry API.
- Note: This example requires Docker to be installed.
- [Declarative Configuration with the OpenTelemetry Java Agent](javaagent-declarative-configuration)
- This module demonstrates how to use declarative configuration with the
OpenTelemetry Java Agent to configure tracing behavior, including
excluding specific endpoints from tracing.
OpenTelemetry Java Agent to configure tracing behavior, including
excluding specific endpoints from tracing.
- Note: This example requires Java 17 or higher.
- [Declarative Configuration with the OpenTelemetry Spring Boot Starter](spring-declarative-configuration)
- This module demonstrates how to use declarative configuration with the
Expand Down
23 changes: 16 additions & 7 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tools]
lychee = "0.24.2"
k3d = "5.8.3"
"go:github.com/grafana/oats" = "0.6.1"
k3d = "5.8.3"
kubectl = "1.36.0"
markdownlint-cli2 = "0.22.1"

# Linters
"aqua:grafana/flint" = "0.22.2"
lychee = "0.24.2"
rumdl = "0.1.91"

[settings]
# Only install tools explicitly defined in the [tools] section above
Expand All @@ -16,7 +19,13 @@ windows_default_file_shell_args = "bash"
unix_default_file_shell_args = "bash"
use_file_shell_for_executable_tasks = true

# Pick the tasks you need from flint (https://github.com/grafana/flint)
[tasks."lint:links"]
description = "Check for broken links in changed files + all local links"
file = "https://raw.githubusercontent.com/grafana/flint/8b7082196051b576d0b8dde43e26d620e7c277b3/tasks/lint/links.sh" # v0.22.2
[env]
FLINT_CONFIG_DIR = ".github/config"

[tasks.lint]
description = "Run all lints"
run = "flint run"

[tasks."lint:fix"]
description = "Auto-fix lint issues"
run = "flint run --fix"
4 changes: 2 additions & 2 deletions spring-declarative-configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ If the behavior is not what you expect, here are a few things to check:

- **Health checks are still traced**
- Verify the `rules` section under `otel.tracer_provider.sampler.rule_based_routing` in
`application.yaml`
`application.yaml`
- Ensure the `pattern` matches your actual actuator paths (e.g., `/actuator.*`)
- Confirm that `span_kind` is set to `SERVER` (or another correct span kind for your traffic)

Expand All @@ -243,7 +243,7 @@ If the behavior is not what you expect, here are a few things to check:
- Make sure you are modifying the correct `application.yaml` for the active Spring profile
- Verify that all configuration keys are indented correctly under the `otel:` root
- Double-check that any placeholders use `:` for defaults (e.g.,
`${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318}`)
`${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318}`)

If issues persist, compare your configuration to:

Expand Down
Loading