GithubHelp home page GithubHelp logo

isabella232 / example-greeting-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from honeycombio/example-greeting-service

0.0 0.0 0.0 59 KB

A silly microservices app for testing interoperability

Go 39.12% Ruby 9.99% Starlark 11.56% Python 39.33%

example-greeting-service's Introduction

greeting-service

This is a ridiculously overengineered greeting service! It's sole purpose is to create a greeting, composed of a name and a message. The name will be one of the 10 most popular baby names in the USA in a particular year. The year will be chosen at random. The message will be chosen from a pre-canned list of 10 or so messages.

The system is composed of several services, each with a specific responsibility:

  • frontend - This service acts as an API aggregation layer. It depends on the name service and the message service.
  • name-service - This service returns a random name. It depends on the year service.
  • year-service - This service returns a random year.
  • message-service - This service returns a random message from a list.

Each service can be written in any language, and they should use a combination of instrumentation techniques. Some will be instrumented with a Honeycomb beeline and some with other standards, like OpenTelemetry. The idea is to use these to test compabitility between various types of services. The motivating use case is testing trace context header compatibility between Honeycomb and OpenTelemetry.

Each service reads it's configuration from the environment. Specific environment variables:

  • HONEYCOMB_WRITE_KEY - Your honeycomb API key
  • HONEYCOMB_DATASET - The name of the dataset you want to write to

Caveats

Port and host names hardcoded. We should use docker-compose or something for this. These services are stupid!

All of these statements are true!

Running

There is a Tiltfile to run these services on a local host using https://tilt.dev/ - after installing Tilt, running tilt up should spin up all of the services.

Tips

For go services, use the go modules file to replace our beeline (and optionally the opentelemetry-sdk) with a copy on your local machine, so you can test in-progress changes:

module main

go 1.14

replace github.com/honeycombio/beeline-go => /home/paul/projects/beeline-go

...

Or in Ruby, modify the gemfile:

source "https://rubygems.org"

gem "honeycomb-beeline", path: "/home/paul/projects/beeline-ruby"

In Python, modify pyproject.toml:

honeycomb-beeline = { path = "/Users/doug/src/github.com/honeycombio/beeline-python" }

example-greeting-service's People

Contributors

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