Slide 1

Slide 1 text

KCD Austria 2024 PRESENTER Modern Java app CI/CD observability with OTel, Quarkus and Gradle #otel-cicd on the CNCF Slack Oleg Nenashev Gradle Inc.

Slide 2

Slide 2 text

Oleg Nenashev @oleg_nenashev

Slide 3

Slide 3 text

CNCF Slack, #otel-cicd SIG speakerdeck.com/onenashev

Slide 4

Slide 4 text

> whoami @oleg_nenashev oleg-nenashev Dr. Nenashev / Mr. Jenkins Community builder Developer Tools Hacker #RussiansAgainstPutin #StandWithUkraine 1.x

Slide 5

Slide 5 text

My first observability project, 2009 Oil flow meter and monitoring system Now: tundrasolutions.ca/products/neftemer

Slide 6

Slide 6 text

* parody content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

8 logz.io/blog/continuous-observability-cicd-pipelines/ changelog.com/shipit/27

Slide 9

Slide 9 text

OTel in Jenkins ● Traces can go through different tools, not just a single one ● Jenkins + Maven ● Maven + Jenkins Source: plugins.jenkins.io/opentelemetry/

Slide 10

Slide 10 text

10 Source: plugins.jenkins.io/opentelemetry/ Source reddit.com/r/Program merHumor/comment s/7zfgwg/frontend_vs _backend/ Analytics / Processing Data Ingestion

Slide 11

Slide 11 text

CI/CD Observability Data Processing 1

Slide 12

Slide 12 text

12 CI/CD Observability. Data Ingestion

Slide 13

Slide 13 text

13 And Java?

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

15 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 16

Slide 16 text

All things need 011y 16

Slide 17

Slide 17 text

Demo Time! 17 github.com/oleg-nenashev/opentelemetry-gradle-quarkus-demo BEWARE: I decided to do a GitHub Demo

Slide 18

Slide 18 text

18 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 19

Slide 19 text

19 See also: https://www.lucavall.in/blog/ci-cd-ob servability-on-github-actions-and-th e-role-of-opentelemetry GitHub Actions

Slide 20

Slide 20 text

Sounds Promising? 20

Slide 21

Slide 21 text

21

Slide 22

Slide 22 text

In the demo ● honeycombio/gha-buildevents ● krzko/setup-telemetry ● krzko/export-job-telemetry ● inception-health/otel-export-trace-action 22 Demo: github.com/oleg-nenashev/opentelemetry-gradle-quarkus-demo

Slide 23

Slide 23 text

23 https://twitter.com/oleg_nenashev/status/1741858998624665653

Slide 24

Slide 24 text

24 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 25

Slide 25 text

25

Slide 26

Slide 26 text

26 gradle --scan Gradle Profiler Java Tools and IDEs Gradle Observability

Slide 27

Slide 27 text

27 OpenTelemetry plugin for Gradle ● Injecting traces and spans to the Gradle execution ● Helps to find the slowest parts of your build with the Gradle OpenTelemetry build plugin. ● Created by Craig Atkinson ● craigatk/opentelemetry-gradle-plugin

Slide 28

Slide 28 text

Gradle Build Scan & Develocity

Slide 29

Slide 29 text

29 Gradle tasks tracing github.com/craigatk/ opentelemetry-gradle-plugin

Slide 30

Slide 30 text

Tests traces too! github.com/craigatk/opentelemetry-gradle-plugin

Slide 31

Slide 31 text

31 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 32

Slide 32 text

Source: https://dev.to/rogervinas/top-5-server-side-frameworks-for-kotlin-in-2022-quarkus-2bp

Slide 33

Slide 33 text

33 quarkus.io/guides/opentelemetry

Slide 34

Slide 34 text

In the demo ● Test Reporting from Quarkus ● Profiles for developer and test environments ● Manual: quarkusDev mode 34 Demo: github.com/oleg-nenashev/opentelemetry-gradle-quarkus-demo

Slide 35

Slide 35 text

35 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 36

Slide 36 text

And then the JVM? ● OpenTelemetry Java Agent ● JMX Java Flight Recorder ● Automatic data ingestion for metrics, logs and (some spans) 36 Demo: github.com/oleg-nenashev/opentelemetry-gradle-quarkus-demo

Slide 37

Slide 37 text

Java Flight Recorder (Java 17+ for LTS) 37 OTel Java Agent

Slide 38

Slide 38 text

38 Java All the Way Down Your Pipeline(s) Your Build Tool Your Framework Your JVM Your System Test Framework & JVM Java the stack up all the way

Slide 39

Slide 39 text

39 Did we say “modern Java”? Localstack Cloud Native Architecture

Slide 40

Slide 40 text

Observability of Distributed Systems * the same rabbithole

Slide 41

Slide 41 text

41 And it is not even CD… ● Relationships between Pipelines are even more complex ● Standardization is needed ● CDEvents project in the Continuous Delivery Foundation ● OTEP-0223 by Dotan Horowitz for adoption in OTel traces

Slide 42

Slide 42 text

Demo Time! 42 github.com/oleg-nenashev/opentelemetry-gradle-quarkus-demo BEWARE: I decided to do a GitHub Demo

Slide 43

Slide 43 text

43 Source: plugins.jenkins.io/opentelemetry/ Source reddit.com/r/Program merHumor/comment s/7zfgwg/frontend_vs _backend/ Analytics / Processing Data Ingestion

Slide 44

Slide 44 text

Learnings 44 ● Each tool has different OTel configuration ● Env propagation is fun ● Span/Traces propagation is partial ● Good luck with maintaining it in universal way :( Source reddit.com/r/Program merHumor/comment s/7zfgwg/frontend_vs _backend/

Slide 45

Slide 45 text

45

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

47 Adopt OTel and Open Standards in YOUR projects and libraries

Slide 48

Slide 48 text

48 Protip: Combine Tools for different Info Levels

Slide 49

Slide 49 text

+ ● Quarkus is supported by Gradle Inc. We provide caching, build scans and analytics for the project ● Public Instance: https://ge.quarkus.io/ gradle/develocity-oss-projects

Slide 50

Slide 50 text

50 Protip: Combine Tools for different Info Levels Pipeline / Steps Build Tool and App specifics

Slide 51

Slide 51 text

Takeaways ● Java is Observable ● Multiple Extra layers, you need to observe all ● Build Tools CAN be observable ● You’re responsible for the glue ● Integrated trace is a massive endeavour 51

Slide 52

Slide 52 text

References ● oleg-nenashev/opentelemetry-gradle-quarkus-demo ● github.com/craigatk/opentelemetry-gradle-plugin ● opentelemetry.io/docs/zero-code/java/agent ● quarkus.io/guides/opentelemetry ● plugins.jenkins.io/opentelemetry 52

Slide 53

Slide 53 text

GitHub: oleg-nenashev Twitter: @oleg_nenashev CNCF Slack, #otel-cicd SIG Questions? CNCF Project Booths

Slide 54

Slide 54 text

v Thank you!