Coder Social home page Coder Social logo

Opentelemetry about codelab-monitoring HOT 4 CLOSED

prody1605 avatar prody1605 commented on August 15, 2024
Opentelemetry

from codelab-monitoring.

Comments (4)

qclaogui avatar qclaogui commented on August 15, 2024 1

Correct ! By default, the Alloy only expose 12345 :

More info: https://github.com/qclaogui/codelab-monitoring?tab=readme-ov-file#grafana-lgtmp-stack-default-port-mapping

from codelab-monitoring.

qclaogui avatar qclaogui commented on August 15, 2024

By default, the OpenTelemetry Java agent uses OTLP exporter. Just to send data to Grafana Alloy at OTEL_EXPORTER_OTLP_ENDPOINT: "http://alloy:4318". See:


Here is a similar example:
OTEL_EXPORTER_OTLP_ENDPOINT: "http://alloy:4318"

from codelab-monitoring.

qclaogui avatar qclaogui commented on August 15, 2024

Hi @prody1605, just found opentelemetry-java-examples https://github.com/open-telemetry/opentelemetry-java-examples/blob/d740b00e31e8f8520560273860b4cd651e5fb31c/javaagent/docker-compose.yml#L7

we can do some change in docker-compose.yml:

Try it

git clone https://github.com/open-telemetry/opentelemetry-java-examples && cd "$(basename "$_" .git)"
cd javaagent && ../gradlew bootJar

Replace docker-compose.yml with the following:

include:
- path: https://github.com/qclaogui/codelab-monitoring.git#main:docker-compose/monolithic-mode/traces/compose.yaml

services:
  app:
    build: ./
    environment:
      OTEL_SERVICE_NAME: "agent-example-app"
      OTEL_EXPORTER_OTLP_ENDPOINT: "http://alloy:4318"
    ports:
      - "8080:8080"
COMPOSE_EXPERIMENTAL_GIT_REMOTE=true docker compose up -d --remove-orphans

Once all containers are up and running you can search for traces in Grafana.

Navigate to http://localhost:3000

from codelab-monitoring.

prody1605 avatar prody1605 commented on August 15, 2024

Hi @qclaogui , Thanks for hints. And if i want to use opentelemetry-java-examples from other vm i need to expose port 4318:4138 on codelab-monitoring?

from codelab-monitoring.

Related Issues (5)

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.