Giter Site home page Giter Site logo

asaaki / surfing-the-tide Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 551 KB

๐Ÿ”ญ๐ŸŒŠ๐Ÿ„๐Ÿปโ€โ™€๏ธ Integration example of tide + opentelemetry-tide with surf + opentelemetry-surf

License: Apache License 2.0

Rust 64.28% Dockerfile 18.85% Makefile 5.21% JavaScript 10.50% Shell 1.16%
rust-lang tide surf opentelemetry opentelemetry-rust opentelemetry-tide opentelemetry-surf

surfing-the-tide's Introduction

surfing-the-tide

A fullstack telemetry showcase.

Integration example of
  tide + opentelemetry-tide
with
  surf + opentelemetry-surf

On top of that, the whole docker-compose setup provides you with the following:

  • nginx as the "ingress" service (public port 8080)
  • tide based "frontend" servers (upstream of nginx)
  • tide based "backend" servers (called via surf in frontend server)
  • multiple frontends and backends for distribution and load balancing
  • jaeger tracing pipeline with individual services (agent, collector, query UI)
  • elasticsearch cluster for tracing data storage (3 nodes)
  • prometheus service for metrics collection
  • nginx-prometheus-exporter for basic nginx metrics
  • grafana as a dashboard solution

Only nginx, jaeger query UI, and grafana are publicly exposed

Why is there no logging facility in place?

I believe we should rethink what, how, and why we log. With tracing and properly emitted events via spans, we can achieve the same insights as our good old logs. what we need is maybe a better way to access and/or postprocess those trace based log events. Also keep in mind that you need 100 % tracing, no downsampling allowed, otherwise you loose information. But if we replace our way of logging, then 100 % tracing might not be an issue after all.

The same goes for error reporting by the way. Nothing prevents you from attaching your beloved stacktraces to the span events if you so desire. Yet again, we "just" need better interfaces and integrations for that.

Usage

# start all services (docker compose)
make dc.up

# Make a request or two ...
curl http://localhost:8080/

# Open browser and view the traces
firefox http://localhost:16686/

You should see traces with multiple spans, for nginx, the front(end)-server, and (backend) server.

example jaeger search example jaeger trace

As well as some metrics in grafana, too:

example grafana dashboard for prometheus metrics

surfing-the-tide's People

Contributors

asaaki avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  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.