Git Product home page Git Product logo

apm-toy-app's Introduction

apm-toy-app

A simple app to trace.

full_trace

Prerequisites

  1. Install docker and docker-compose (you can try sudo pip install docker-compose)
  2. (Optional) Install go and its dependency management tool
  3. You need a Datadog account. If you don't have one, just use the free trial.

Get the app running

  1. Get your Datadog API key (Integrations > APIs in the app) and paste it here

Note: each time you'll change your API key, you'll need to rebuild the datadog-agent docker image.

  1. Get your Datadog API key (Integrations > APIs) and paste it here
  2. Run the app
docker-compose up

This command should launch a minimal golang server along with redis, postgres and the datadog-agent.

  1. Go to http://localhost:8080/, you should get something like that:
(247 hits) - City: Utrecht, 234323 inhabitants

Each time you hit this URL, the golang server will return a different city and its population from postgres and will also tell you how many times you hit this endpoint.

Check the datadog-agent status

  1. Connect to the container running the datadog-agent
docker exec -it apmtoyapp_datadog_1 bash
  1. Run the info command of the agent
service datadog-agent info
  1. Check that postgres and redis are properly reporting metrics
 Checks
  ======

    postgres (5.16.0)
    -----------------
      - instance #0 [OK]
      - Collected 15 metrics, 0 events & 1 service check

    redisdb (5.16.0)
    ----------------
      - instance #0 [OK]
      - Collected 36 metrics, 0 events & 1 service check
      - Dependencies:
          - redis: 2.10.5
  1. Go in the Datadog app, Metrics > Explorer and check you can see your metrics in the app.

metrics explorer

Possible issues

  • If you encounter some dependency issues, try to run dep ensure (make sure you have dep installed).

  • If you want to make modifications to the datadog image, you have to manually rebuild it with docker build --no-cache datadog -t apmtoyapp_datadog.

apm-toy-app's People

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.