Skip to content

Instantly share code, notes, and snippets.

Introduction

I just found the following article in the OpenTelemetry blog

Announcing a Community Demo for OpenTelemetry
https://opentelemetry.io/blog/2022/demo-announcement/

This is a demo kit for OpenTelemetry, where an e-commerce site is built with microservices in various languages. In addition, metrics and traces are already instrumented, and if you have a Docker environment at hand, you can just docker compose up to get it running. As a demonstration of OpenTelemetry, you can see traces and metrics in Jeager and Prometheus. In this article, I would like to send them to Datadog so that I can see them in Datadog.

version: '3'
services:
nginx0:
image: nginxplus
ports:
- "8080:80"
labels:
- com.datadoghq.ad.check_names=["nginx"]
- com.datadoghq.ad.instances=[{"nginx_status_url":"http://%%host%%:80/api/","use_plus_api":true}]
- com.datadoghq.ad.init_configs=[{}]
@shigeya-dd
shigeya-dd / slowing_nginx.md
Last active July 19, 2020 14:17
Slowing nginx randomly with njs

Slowing nginx randomly with njs

I needed to add some random latency to my nginx server to simulate slower network. So, I created small njs (nginx javascript) snipet to implement the latency.

wait.js

var fs = require('fs');
var INDEX = "/usr/share/nginx/html/index.html";