microsoft / microsoft/ApplicationInsights-JS

Using trackDependency is not clear

Open
#392 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

composite-apps enhancement
Dominant language
TypeScript
Stars
685
Forks
261
Avg merge
21h 33m
Merged PRs (30d)
5

Description

trackDependency() from java script today accepts the following set of parameters:
_(id, method, absoluteUrl, pathName, totalTime, success, resultCode, properties?, measurements?)_

- The **pathName** passed as a paramter, becomes the **commandName** and finally is seen as **data** in UI.

- There is no traditional way to send a custom dependency telemetry (or overwrite certain properties). The only way to do that is to use initializers.

Can we expose something like **TrackDependency(data)**, where we override properties only if they are null, and based on the url of the envelope?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the trackDependency() entry point and its listed parameters, then review how pathName becomes commandName and data and how initializers provide custom properties. Define the proposed TrackDependency(data) contract, including null-only overrides and URL-based envelope properties; done means custom dependency telemetry can be sent without an initializer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.