Giter VIP home page Giter VIP logo

sanjaydas9027 / springbootapp-otel_autoinstrumentation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.61 MB

In this project demonstrated implementation of OpenTelemetry auto instrumentation agents to send Logs, Traces and Metrics without making any code changes.

License: MIT License

Dockerfile 18.88% Java 35.11% CSS 3.42% HTML 42.60%
opentelemetry opentelemetry-java-agent spring-boot opensource

springbootapp-otel_autoinstrumentation's Introduction

Spring Boot Application with OTel Auto-Instrumentation

This is a sample application that utilizes OpenTelemetry (OTel) auto-instrumentation to seamlessly collect logs, traces, and metrics, and then send them to a specified endpoint. No code change is required for enabling OpenTelemetry instrumentation.

Installation Steps

Install Docker

Make sure Docker is installed on your system. You can use the following commands for installation:

sudo apt update
sudo apt install docker.io
sudo su -
usermod -aG docker ubuntu

Update Dockerfile

Update the Dockerfile with the necessary environment variables for OTel configuration. You can set the endpoint and, if applicable, provide authentication headers.

ENV OTEL_EXPORTER_OTLP_ENDPOINT="https://otel.kloudmate.com:4318"
ENV OTEL_EXPORTER_OTLP_HEADERS="Authorization=<YOUR_SECRET_KEY>"

# If no authentication is required, use the endpoint only
# ENV OTEL_EXPORTER_OTLP_ENDPOINT="https://webhook.site/ddd1f40d-e3f7-4178-93e2-5f35760feaca"

No code change is required within the application for enabling OpenTelemetry.

Docker Commands

Build the Docker image and run the container with the following commands:

docker build -t <imageName> .
docker run -p 8080:8080 <imageName>:<tag>

Access App

  • The application will be accessible on http://localhost:8080
  • RollDice will be accessible on http://localhost:8080/rolldice
  • To pass Player name use queryparameter ?player=<playername> i.e http://localhost:8080/rolldice?player=sanjay

Screenshots

Project Screenshot Project Screenshot

Logs

Project Screenshot Project Screenshot

Trace

Project Screenshot Project Screenshot

Metrics

Project Screenshot

springbootapp-otel_autoinstrumentation's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.