Add datacenter tag to entry-spans
This will add a random "datacenter" tag on the entries where supported to improve showcasing geo capabilities.
This commit is contained in:
@@ -41,6 +41,24 @@ app.use((req, res, next) => {
|
||||
next();
|
||||
});
|
||||
|
||||
app.use((req, res, next) => {
|
||||
let dcs = [
|
||||
"us-east1",
|
||||
"us-east2",
|
||||
"us-east3",
|
||||
"us-east4",
|
||||
"us-central1",
|
||||
"us-west1",
|
||||
"us-west2",
|
||||
"eu-west3",
|
||||
"eu-west4"
|
||||
];
|
||||
let span = instana.currentSpan();
|
||||
span.annotate('custom.sdk.tags.datacenter', dcs[Math.floor(Math.random() * dcs.length)]);
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(bodyParser.json());
|
||||
|
||||
|
Reference in New Issue
Block a user