From eb70bb21ee0a9d91c6bd0a0d8f532af8daf555e4 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Tue, 17 Dec 2024 16:24:20 +0100 Subject: [PATCH] add example for OTLP logging via stdout and k8s --- {logging-otlp => logging-k8s-stdout-otlp-json}/Dockerfile | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/README.md | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/build.gradle.kts | 2 +- {logging-otlp => logging-k8s-stdout-otlp-json}/build.sh | 0 .../generate-traffic.sh | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/k3d.sh | 0 .../k8s/collector-configmap.yaml | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/k8s/dice.yaml | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/k8s/lgtm.yaml | 0 {logging-otlp => logging-k8s-stdout-otlp-json}/oats.yaml | 0 .../src/main/java/com/grafana/example/RollController.java | 0 .../src/main/java/com/grafana/example/SpringBootApp.java | 0 .../src/main/resources/logback-spring.xml | 0 settings.gradle.kts | 2 +- 14 files changed, 2 insertions(+), 2 deletions(-) rename {logging-otlp => logging-k8s-stdout-otlp-json}/Dockerfile (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/README.md (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/build.gradle.kts (86%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/build.sh (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/generate-traffic.sh (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/k3d.sh (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/k8s/collector-configmap.yaml (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/k8s/dice.yaml (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/k8s/lgtm.yaml (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/oats.yaml (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/src/main/java/com/grafana/example/RollController.java (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/src/main/java/com/grafana/example/SpringBootApp.java (100%) rename {logging-otlp => logging-k8s-stdout-otlp-json}/src/main/resources/logback-spring.xml (100%) diff --git a/logging-otlp/Dockerfile b/logging-k8s-stdout-otlp-json/Dockerfile similarity index 100% rename from logging-otlp/Dockerfile rename to logging-k8s-stdout-otlp-json/Dockerfile diff --git a/logging-otlp/README.md b/logging-k8s-stdout-otlp-json/README.md similarity index 100% rename from logging-otlp/README.md rename to logging-k8s-stdout-otlp-json/README.md diff --git a/logging-otlp/build.gradle.kts b/logging-k8s-stdout-otlp-json/build.gradle.kts similarity index 86% rename from logging-otlp/build.gradle.kts rename to logging-k8s-stdout-otlp-json/build.gradle.kts index acaf7cc13..bf8ba3aa7 100644 --- a/logging-otlp/build.gradle.kts +++ b/logging-k8s-stdout-otlp-json/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } description = "OpenTelemetry Example for Java Agent with Stdout logging" -val moduleName by extra { "io.opentelemetry.examples.javagent.stdout-logging" } +val moduleName by extra { "io.opentelemetry.examples.javagent.logging-k8s-stdout-otlp-json" } java { toolchain { diff --git a/logging-otlp/build.sh b/logging-k8s-stdout-otlp-json/build.sh similarity index 100% rename from logging-otlp/build.sh rename to logging-k8s-stdout-otlp-json/build.sh diff --git a/logging-otlp/generate-traffic.sh b/logging-k8s-stdout-otlp-json/generate-traffic.sh similarity index 100% rename from logging-otlp/generate-traffic.sh rename to logging-k8s-stdout-otlp-json/generate-traffic.sh diff --git a/logging-otlp/k3d.sh b/logging-k8s-stdout-otlp-json/k3d.sh similarity index 100% rename from logging-otlp/k3d.sh rename to logging-k8s-stdout-otlp-json/k3d.sh diff --git a/logging-otlp/k8s/collector-configmap.yaml b/logging-k8s-stdout-otlp-json/k8s/collector-configmap.yaml similarity index 100% rename from logging-otlp/k8s/collector-configmap.yaml rename to logging-k8s-stdout-otlp-json/k8s/collector-configmap.yaml diff --git a/logging-otlp/k8s/dice.yaml b/logging-k8s-stdout-otlp-json/k8s/dice.yaml similarity index 100% rename from logging-otlp/k8s/dice.yaml rename to logging-k8s-stdout-otlp-json/k8s/dice.yaml diff --git a/logging-otlp/k8s/lgtm.yaml b/logging-k8s-stdout-otlp-json/k8s/lgtm.yaml similarity index 100% rename from logging-otlp/k8s/lgtm.yaml rename to logging-k8s-stdout-otlp-json/k8s/lgtm.yaml diff --git a/logging-otlp/oats.yaml b/logging-k8s-stdout-otlp-json/oats.yaml similarity index 100% rename from logging-otlp/oats.yaml rename to logging-k8s-stdout-otlp-json/oats.yaml diff --git a/logging-otlp/src/main/java/com/grafana/example/RollController.java b/logging-k8s-stdout-otlp-json/src/main/java/com/grafana/example/RollController.java similarity index 100% rename from logging-otlp/src/main/java/com/grafana/example/RollController.java rename to logging-k8s-stdout-otlp-json/src/main/java/com/grafana/example/RollController.java diff --git a/logging-otlp/src/main/java/com/grafana/example/SpringBootApp.java b/logging-k8s-stdout-otlp-json/src/main/java/com/grafana/example/SpringBootApp.java similarity index 100% rename from logging-otlp/src/main/java/com/grafana/example/SpringBootApp.java rename to logging-k8s-stdout-otlp-json/src/main/java/com/grafana/example/SpringBootApp.java diff --git a/logging-otlp/src/main/resources/logback-spring.xml b/logging-k8s-stdout-otlp-json/src/main/resources/logback-spring.xml similarity index 100% rename from logging-otlp/src/main/resources/logback-spring.xml rename to logging-k8s-stdout-otlp-json/src/main/resources/logback-spring.xml diff --git a/settings.gradle.kts b/settings.gradle.kts index 5560173d6..dcc6107c5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,7 +31,7 @@ include( ":opentelemetry-examples-javaagent", ":opentelemetry-examples-log-appender", ":opentelemetry-examples-logging", - ":opentelemetry-examples-logging-otlp", + ":opentelemetry-examples-logging-k8s-stdout-otlp-json", ":opentelemetry-examples-manual-tracing", ":opentelemetry-examples-metrics", ":opentelemetry-examples-micrometer-shim",