Skip to content

Request and dependencies reporting enchancements #323

@lmolkova

Description

@lmolkova

[EDITED]

I have a simple service that calls google

'use strict';

const appInsights = require("applicationinsights"); //0.22.0
appInsights.setup("removed");
appInsights.start();

const express = require('express'); //4.15.4
const request = require('request'); //2.81.0

// Constants
const PORT = 8089;
const HOST = '0.0.0.0';

// App
const app = express();
app.get('/', (req, res) => {
    
  console.log('Starting request: GET google'); // Print the response status code   
  request("http://google.com", function (error, response, body) {
      console.log('Response from google statusCode: %s', response && response.statusCode);
    });

  res.send('Hello world\n');
});


app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);

Here is a request telemetry that is reported when I make a request
image

Here is dependencies that are tracked for this request:
image

  1. [SOLVED] Dependencies are not correlated with request
  2. (minor) Two dependencies are tracked (because of redirected request). Is it expected? Is it avoidable? It should be consistent between SDKs (.NET reports just one)
  3. (minor) Request parent Id should be null - new id has just been generated for this operation. It should be consistent with .NET SDK.
  4. (minor) what is the point of saving "undefined | roleName:undefined" in the 'source'?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions