Skip to content

Instantly share code, notes, and snippets.

@ericmustin
Created November 25, 2020 14:13
Show Gist options
  • Save ericmustin/3a66bf36840aadd4ccd58ebf8e7278c7 to your computer and use it in GitHub Desktop.
Save ericmustin/3a66bf36840aadd4ccd58ebf8e7278c7 to your computer and use it in GitHub Desktop.
Reproduction of OpenTelemetry Collector Zipkinv2 error tagging
'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();
function getOtelStats(req, res) {
res.status(500).send("An example error");
}
app.get('/api', getOtelStats);
app.listen(port, function () {
console.log("Running on port " + port);
});
receivers:
zipkin:
exporters:
logging:
processors:
batch:
timeout: 10s
service:
pipelines:
traces:
receivers: [zipkin]
processors: [batch]
exporters: [logging]
{
"name": "sample_otel_node_app",
"version": "1.0.0",
"description": "Demonstration",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "eric mustin",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"signalfx-tracing": "^0.10.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment