gantt
dateFormat x
axisFormat %X:%L
title Trace 9a78cfeebd62a55a130068b0dbc01dc3
section Service emailservice
GET /return_order_deprecated :active, 1680500611600, 795ms
gantt
dateFormat x
title Example OpenTelemetry Trace as a Gantt Chart
section Database
Database Query :done, 2023-03-21T00:00:00.000Z, 500ms
Database Insert :active, 2023-03-21T00:00:02.000Z, 500ms
require 'opentelemetry/sdk' | |
require 'opentelemetry-instrumentation-sinatra' | |
require 'opentelemetry/exporter/otlp' | |
# Implements sampling based on a probability. | |
class DatadogTraceIdRatioBased < ::OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased | |
def initialize(probability) | |
@probability = probability | |
super(probability) | |
end |
otel-collector_1 | 2021-03-08T02:08:46.980Z INFO loggingexporter/logging_exporter.go:313 TracesExporter {"#spans": 18} | |
otel-collector_1 | 2021-03-08T02:08:46.981Z DEBUG loggingexporter/logging_exporter.go:352 ResourceSpans #0 | |
otel-collector_1 | Resource labels: | |
otel-collector_1 | -> service.name: STRING(sandbox_test_ruby) | |
otel-collector_1 | -> process.command: STRING(puma: cluster worker 0: 1 [sinatra-multivac]) | |
otel-collector_1 | -> deployment.environment: STRING(otel_sandbox) | |
otel-collector_1 | -> process.pid: STRING(7) | |
otel-collector_1 | -> telemetry.sdk.version: STRING(0.15.0) | |
otel-collector_1 | -> telemetry.sdk.language: STRING(ruby) | |
otel-collector_1 | -> telemetry.sdk.name: STRING(opentelemetry) |
'use strict'; | |
const tracer = require('signalfx-tracing').init({ | |
url: 'http://otel-collector:9411/v1/trace' | |
}) | |
const port = 4000; | |
const express = require('express'); | |
const app = express(); |
The Last Question by Isaac Asimov © 1956
The last question was asked for the first time, half in jest, on May 21, 2061, at a time when humanity first stepped into the light. The question came about as a result of a five dollar bet over highballs, and it happened this way: Alexander Adell and Bertram Lupov were two of the faithful attendants of Multivac. As well as any human beings could, they knew what lay behind the cold, clicking, flashing face -- miles and miles of face -- of that giant computer. They had at least a vague notion of the general plan of relays and circuits that had long since grown past the point where any single human could possibly have a firm grasp of the whole.
Multivac was self-adjusting and self-correcting. It had to be, for nothing human could adjust and correct it quickly enough or even adequately enough -- so Adell and Lupov attended the monstrous giant only lightly and superficially, yet as well as any men could. They fed it data, adjusted questions to its needs and translated th
sub vcl_recv { | |
declare local var.timemsec TIME; | |
declare local var.traceid INTEGER; | |
if(req.http.x-datadog-trace-id) { | |
} else{ | |
set var.traceid = randomint(0, 2147483647); | |
set var.traceid <<= 32; | |
set var.traceid |= randomint(0, 4294967295); |
1. Datadog https://a.cl.ly/4gu90zpp | |
dd api intake | |
+----------------------------------------------------------------------------------------------------------------------+ | |
| | | |
| | | |
| ^ | | |
| | | | |
| | | | |
| | | |
// cd into root of this directory | |
// npm install | |
// npm install -g http-echo-server | |
// different terminal window from run `http-echo-server` | |
// node index.js | |
const tracer = require('dd-trace').init({debug: false}) | |
const axios = require('axios') | |
const express = require('express') |