MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.09k stars 21.13k forks source link

Feedback for Node.js Otel #122098

Closed jun110 closed 1 month ago

jun110 commented 2 months ago

I want to give you some feedback. Please review them.

1 There is a link for Python.

Although this is a description of Node.js, there is a link for Python. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=nodejs#included-instrumentation-libraries image

2 Updating "Included instrumentation libraries"

I think the information listed in "Included instrumentation libraries" is outdated. For example, there is no information about logs, and there is no HTTP/HTTPS in the Dependencies section. image

When I sent an HTTP request using axios in my environment, the Dependencies log was automatically recorded in Application Insights.

The link below contains information about Bunyan and Winston, so please add it to the Docs. https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/monitor-opentelemetry/README.md#instrumentation-libraries image

3 The link for "configuration options" is a link for Java Although this is a description of Node.js, there is a link for Java. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=nodejs#included-instrumentation-libraries image

4 Updating "Add custom exceptions" I tested referring to the "Add custom exceptions" section, but the Exceptions log was not recorded in Application Insights. Upon investigation, it seems that it will not be recorded unless SpanKind is set to Server.

https://github.com/Azure/azure-sdk-for-js/issues/28247

As a result of implementing as follows, the Exceptions log was recorded as expected. I would like you to add the possibility that the Exceptions log may not be recorded due to the influence of SpanKind.

const axios = require('axios');
var express = require('express');
var router = express.Router();
const { trace, SpanKind } = require("@opentelemetry/api");

/* GET home page. */
router.get('/', function (req, res, next) {

  // Get the tracer for the "testTracer" namespace
  const tracer = trace.getTracer("testTracer");

  // Start a span with the name "hello"
  let span = tracer.startSpan("exceptionTest", {
    kind: SpanKind.SERVER
  });

  try {
    throw new Error('This is test');
  } catch (exError) {
    span.recordException(exError);
  }
  // End the span
  span.end();

  res.render('index', { title: 'Express' });
});

module.exports = router;

image


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

PesalaPavan commented 2 months ago

@jun110 Thanks for your feedback! We will investigate and update as appropriate.

AaronMaxwell commented 1 month ago

Thanks for your dedication to our documentation. This issue has been moved to an internal work item for triage and prioritization. Thanks in advance for your understanding as we investigate to provide the most accurate documentation updates. #please-close

Internal work item: https://dev.azure.com/msft-skilling/Content/_workitems/edit/250323

Please also note that GitHub documentation issues are being phased out completely. For more information see: https://aka.ms/ContentUserFeedback.