Azure Application Insights - Disable Logging Page Views

Dev

I have a single page application written with JavaScript. I am currently logging events to Azure Application Insights using the JavaScript API. I notice that Application Insights is automatically writing all page views to Application Insights. However, I'm only interested in writing custom events to Application Insights.

Is there a way to disable logging page views? In other words, can I log only custom events, custom metrics, and exceptions with Application Insights?

I don't see anything in the API documentation. Thank you.

krishg

You can restrict the type of telemetry you want by inspecting type and returning true/false in a Telemetry Initializer while creating client as below.

import { ApplicationInsights } from '@microsoft/applicationinsights-web'
const appInsights = new ApplicationInsights({ config: {
  instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE'  
} });
appInsights.addTelemetryInitializer(t => {
  // Update criteria as per your need.
  if (t.baseType == 'PageView') // or anything else
    return false; // disable
  return true; // enable everything else
});

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Disabling dependency logging for Application insights on Azure app service (Web app)

分類Dev

Application Insights logging provider not working in AspNetCore 2.0

分類Dev

Creating application insights with azure cli

分類Dev

Azure Cosmos DB: HTTP 400 in Application Insights

分類Dev

Set up Azure Application Insights for local environment

分類Dev

Azure Application Insights and Web Site projects

分類Dev

logging on Azure

分類Dev

Application Insights Dependency types

分類Dev

Solr to Application Insights

分類Dev

Disable Apache logging completely

分類Dev

Azure web app application insights query for Operation/Dependency time, Duration and count over a period

分類Dev

Application Insights SDK(ローカル)とAzure ApplicationInsightsの違い

分類Dev

Azure Application Insights - オブジェクト内の値

分類Dev

Custom logging to app insights from .net core

分類Dev

Application Insightsの遅延?

分類Dev

application insights vs elastic (ELK)

分類Dev

Comparison between NewRelic and Azure Insights

分類Dev

Azure App InsightsのFlush()

分類Dev

C#でのAzure関数のApplication Insight Logging

分類Dev

No logging in confluence web application

分類Dev

Azure Application Insights-例外のディープリンクを作成しますか?

分類Dev

Counting views of certain page

分類Dev

Python Logging - How do I disable a package's Logging?

分類Dev

Application Insights TraceListener: Setting Severity level

分類Dev

Using Application Insights with multiple deployment slots

分類Dev

Custom logs are not visible using Application Insights

分類Dev

How to disable logging to serial terminal - embedded linux

分類Dev

Disable button on a specific page

分類Dev

Two Views/Controllers on one page?

Related 関連記事

  1. 1

    Disabling dependency logging for Application insights on Azure app service (Web app)

  2. 2

    Application Insights logging provider not working in AspNetCore 2.0

  3. 3

    Creating application insights with azure cli

  4. 4

    Azure Cosmos DB: HTTP 400 in Application Insights

  5. 5

    Set up Azure Application Insights for local environment

  6. 6

    Azure Application Insights and Web Site projects

  7. 7

    logging on Azure

  8. 8

    Application Insights Dependency types

  9. 9

    Solr to Application Insights

  10. 10

    Disable Apache logging completely

  11. 11

    Azure web app application insights query for Operation/Dependency time, Duration and count over a period

  12. 12

    Application Insights SDK(ローカル)とAzure ApplicationInsightsの違い

  13. 13

    Azure Application Insights - オブジェクト内の値

  14. 14

    Custom logging to app insights from .net core

  15. 15

    Application Insightsの遅延?

  16. 16

    application insights vs elastic (ELK)

  17. 17

    Comparison between NewRelic and Azure Insights

  18. 18

    Azure App InsightsのFlush()

  19. 19

    C#でのAzure関数のApplication Insight Logging

  20. 20

    No logging in confluence web application

  21. 21

    Azure Application Insights-例外のディープリンクを作成しますか?

  22. 22

    Counting views of certain page

  23. 23

    Python Logging - How do I disable a package's Logging?

  24. 24

    Application Insights TraceListener: Setting Severity level

  25. 25

    Using Application Insights with multiple deployment slots

  26. 26

    Custom logs are not visible using Application Insights

  27. 27

    How to disable logging to serial terminal - embedded linux

  28. 28

    Disable button on a specific page

  29. 29

    Two Views/Controllers on one page?

ホットタグ

アーカイブ