Giter Club home page Giter Club logo

telemetry-devcontainer's Introduction

Devcontainer with OpenTelemetry, Prometheus+Grafana, Jaeger and Zipkin

Disclaimer

This is personal playground template project to get working configuration for the telemetry (distributed tracing) and metrics within Devcontainers. All credits for OpenTelemetry and OpenTelemetry Collector Contrib projects.

The test demo server was taken from the OpenTelemetry Collector Demo without any changes. It is written in go language but that is not important for the matter of the example. The demo server is using OpenTelemetry API to report telemetry traces to the open source distributed tracing applications like Jaeger and Zipkin through special OpenTelemetry connector. The demo test server can be replaced with any application of your language choice as soon as it is using OpenTelemetry API.

The demo endpoint can be triggered as HTTP GET to http://localhost:7080/hello Please che Devcontainer configuration for the list of the exposed ports.

Configuration

  1. OpenTelemetry collector providing OpenTelemetry API.
  2. Jaeger and Zipkin to collect distributed traces (telemetry).
  3. Prometheus to collect metrics.
  4. Grafana default username/pwd: admin/admin
  5. Two different devcontainer with different network configurations:
  • Bridged network - default in docker-compose
  • DB network - default in devcontainers

Limitations

The common approach I found in devcontainer template examples is to configure Devcontainer network to use network mode like this (when using docker-container configuration):

...
    network_mode: service:telemetry-test-db

where "telemetry-test-db" is the network used by DB service. That allows to use Devcontainer "forwardPorts" (in the devcontainer.json) to forward ports outside of the Devcontainer.

I wasn't able to make this network configuration work properly. So, I have configured more classic bridge network within the Devcontainer and have port forwarding "standard" docker-compose way. It doesn't show port forwarded in Devcontainer "Ports" panel (at the bottom of the VSCode). But all ports are still forwarded with docker-compose itself so available at the host system.

References

  1. Developing inside a Container
  2. OpenDelemetry Configuration documentation
  3. OpenTelemetry and OpenTelemetry Collector Contrib projects.
  4. Jaeger documentation
  5. Zipkin documentation
  6. Prometheus documentation
  7. Grafana documentation

telemetry-devcontainer's People

Contributors

dmorozov avatar

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.