-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ignoreHeaders as part of config does not build with typescript #2336
Comments
* Added link to the [bug][1] into Readme * Added more complete instrumentation, by instrumenting App with an event - Would have been unnecessary though I think as default instrumentation seems to already send data * Commented telemetry.ts on what is the bug (error description) [1]: microsoft/ApplicationInsights-JS#2336
Also reproduces with |
The "correct" location of the configuration is actually part of the
|
@siyuniu-ms we don't have any documentation in the dependency extension about how to configure these, can you please
|
Thanks, it did look like an extension when I searched the repo code, but the way it was documented seemed like it was supposed to be usable from the main config. From code I could not figure out thought what was the extension name and it seemed to be also part of the core package, so that confused me further. Another confusion is that lots of the other properties in Can I still configure the Will anyways now configure it with these extension configs. |
And I think I got it working otherwise, but I likely still need to ensure the |
Description/Screenshot
Reading Application Insights Javascript SDK configuration documentation I understood that
ignoreHeaders
can be given as part of config to limit headers being included to dependency telemetry in case ofenableResponseHeaderTracking
being enabled.The documentation explicitly state:
And in the add sdk configuration documentation:
Steps to Reproduce
With
node v18.18.1
andnpm 9.8.1
npm run build
or see eslint output fortelemetry.ts
.src/telemetry.ts
from https://github.com/aviita/react-typescript-app-application-insights-ignore-headers-bug.gitSo the repro is in the app in github. Using
Firstly I also tried updating my app insights web and react js packages with:
How I try to init:
Expected behavior
ignoreHeaders
can be passed as a parameter to configignoreHeaders
is documented clearly.Actual behvior:
Currently I get build error on
npm run build
:Additional context
I would like to be able to include some specific headers to my dependency telemetry from our react app. I am specifically interested in
X-Cache
,cache-control
andContent-Length
headers to se relevant data to determine if our caching configuration needs improvement or if we should do improvements to our backend performance (Azure Storage Account tier selection in this case).It would also be nice to have rather an include headers clause than exclude headers in our case, but anyways I can work with this if I figure out how to get it working.
The text was updated successfully, but these errors were encountered: