惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
W
WeLiveSecurity
L
LINUX DO - 最新话题
IT之家
IT之家
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
T
Troy Hunt's Blog
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
S
Security Affairs
N
News and Events Feed by Topic
S
Securelist
美团技术团队
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
J
Java Code Geeks
A
Arctic Wolf
Blog — PlanetScale
Blog — PlanetScale
量子位
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The GitHub Blog
The GitHub Blog
Webroot Blog
Webroot Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Full Disclosure
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
K
Kaspersky official blog
Google DeepMind News
Google DeepMind News
Know Your Adversary
Know Your Adversary
S
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
Cisco Talos Blog
Cisco Talos Blog
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
U
Unit 42
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
MongoDB | Blog
MongoDB | Blog
S
Security @ Cisco Blogs

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Monitor JavaScript console logs and user activity with Datadog
2019-07-19 · via Datadog | The Monitor blog

Monitoring backend issues is critical for ensuring that requests are handled in a timely manner, and validating that your services are accessible to users. But if you’re not tracking client-side errors and events to get visibility into the frontend, you won’t have any idea how often these issues prompt users to refresh the page—or worse, abandon your website altogether. Datadog’s browser logging library helps you detect and debug user-facing issues by enabling you to monitor JavaScript console logs alongside backend logs, metrics, and distributed request traces from your infrastructure and applications.

monitor javascript console logs with Datadog's new javascript logging library

Track JavaScript console logs and errors from all your users

Although some frontend errors may not have any user-facing impact, others could create a frustrating experience for visitors to your website. With Datadog’s client-side logging library, you can automatically track JavaScript console errors in real time, and ensure that these issues don’t impair user experience (e.g., a button doesn’t function properly) or revenue-driving initiatives (e.g., an advertisement fails to load).

monitor JavaScript console error logs with Datadog

JavaScript console error logs include a stack trace that can help you troubleshoot the source of any issue. And because logs are fully integrated with the rest of Datadog, you can explore them in context with all of the other monitoring data you’re already collecting from related services.

Analyze frontend error logs to investigate issues

Once you’re collecting and centralizing JavaScript console logs with Datadog, you can analyze them to get deeper insights into when and where frontend errors typically appear—is an error limited to a web browser version, or does it correlate with a specific deployment of this service? Browser logs include key attributes (e.g., browser/user agent, client IP address, and URL path) that you can analyze to determine which types of clients, geographical regions, and endpoints tend to experience the highest rate of errors. With Log Analytics, you can find out if an error is limited to a specific subset of users—based on the browser, device, and OS family they’re running—and use that information to immediately start remediating the problem.

For example, you can create a graph like the one below, to see which browsers submitted the greatest percentage of JavaScript error logs over time.

Graph of javascript errors broken down by browser

Log custom user events

In addition to collecting JavaScript console logs, you can log custom events to track any type of activity that is important to your business, whether it’s related to user experience or revenue. For example, you can use custom browser logs to get visibility into client-side latency or to track how users interact with different versions of your website.

Once you’re using Datadog’s JavaScript logging library to add custom attributes to your logs, you can visualize custom user events (e.g., how many ad clicks you get on a given page) or test out different placements of advertisements across multiple pages.

Custom attributes also provide richer context around the JavaScript console logs you’re already collecting. In the screenshot below, you can see that JavaScript errors occur more commonly on version 1 of this application’s UI. To get more details, you can click on the graph to start digging into JavaScript error logs that include a version:1 log attribute, as shown below.

Graph of javascript console log errors broken down by custom version tag

How to collect JavaScript console logs with Datadog

Datadog’s JavaScript logging library automatically optimizes network usage by forwarding logs in bulk to your Datadog account. In this section, we’ll show you how to set up browser log collection with Datadog.

Create a client token and configure log collection

Before you can collect and forward browser logs to Datadog, you will need to generate a client token. Client tokens are specifically designed to allow you to securely send web browser logs to Datadog. You can generate a client token on the API configuration page of your Datadog account, as shown below.

collect javascript console logs and custom JavaScript logs by generating a Datadog client token

Now you can configure the logger to use this token to forward browser logs to Datadog. The code snippet below demonstrates how you can initialize the Datadog logger and add your client token to your HTML. To automatically collect JavaScript error logs and console logs, set forwardErrorsToLogs to true, as shown below. This will configure the library to automatically collect console.log() messages, as well as any errors that get logged to the console.

<html>

<head>

<title>Example to send logs to Datadog</title>

<script type="text/javascript" src="https://www.datadoghq-browser-agent.com/datadog-logs-us.js"></script>

<script>

// Set your client token

DD_LOGS.init({

clientToken: '<CLIENT_TOKEN>',

forwardErrorsToLogs: true,

});

// optionally add global metadata attribute--one attribute can be added at a time

DD_LOGS.addLoggerGlobalContext('request_id', <REQUEST_ID>);

</script>

[ … ]

</head>

[ … ]

</html>

As shown above, you can enrich all of your JavaScript console logs with global metadata, such as a request_id. If you pass this same information to backend logs, you’ll be able to smoothly navigate from any given browser log to view metrics, logs, and traces from the server-side components involved in generating a response to that particular request.

By default, the Datadog logger automatically adds a session_id attribute so you can easily unify any JavaScript console logs that came from the same browser session. Datadog also logs other default attributes to provide more context around each browser log you’re collecting: URL, user agent, and client IP address.

Log custom user events with Datadog

In addition to automatically collecting JavaScript console logs, you can use Datadog’s JavaScript logging library to log any type of custom user activity that’s useful for your business. The following example demonstrates how to configure the logger (DD_LOGS) to capture an INFO-level message that includes the environment and user ID as custom JSON attributes:

DD_LOGS.logger.info('signup button clicked', { env: 'dev', user_id: <USER_ID> })

Adding this line allows you to track signup activity—each time the signup button is clicked, Datadog’s JavaScript logging library will generate a log at the INFO status level, with custom attributes (env and user_id). The log will also include default attributes (describing the user agent, browser, session ID, and OS family of the JavaScript client) as well as any global metadata (e.g., request_id) you added to the logger.

custom JavaScript browser log collection with datadog - collect analytics around any kind of website activity including user id, other custom attributes

Analyze JavaScript logs that matter to your team

If multiple teams are working on different components of the same environment, you can also set up multiple loggers and configure each logger to add metadata that will be useful for analyzing those particular types of logs. The example below shows how you might define two loggers: one for a team that is responsible for testing a new signup functionality, and a second logger to help another team track advertisements:

// test out new signup functionality in dev environment

const signupLogger = DD_LOGS.createLogger('signupLogger')

signupLogger.addContext('team', 'signup')

signupLogger.addContext('env', 'dev')

// track ad revenue in production

const adLogger = DD_LOGS.createLogger('adLogger')

adLogger.addContext('team', 'ads')

adLogger.addContext('env', 'prod')

Each team can then generate its own logs like this:

signupLogger.error('Signup failure occurred')

adLogger.info('Advertisement clicked')

With this setup, teams can quickly find their own logs (which will include logger-specific context as well as global context) and analyze them with the attributes that are most important for their particular use case. To explore these and other options, consult our documentation.

Full-stack visibility with JavaScript logs

JavaScript console logs and custom browser logs provide even deeper context around the real-time data you’re already monitoring with Datadog—everything from infrastructure metrics to APM request traces to web server access logs. And if you’re using Datadog Browser Tests to proactively monitor synthetic requests from various global locations, JavaScript console logs can help you track down the source of user-facing performance issues.

With the addition of JavaScript console logs to the Datadog platform, you can get full-stack visibility across frontend and backend issues, allowing you to continuously improve the availability and performance of your services.

Start monitoring JavaScript console logs and user events

We’re excited to add client-side JavaScript log collection to the Datadog platform, and our teams are hard at work adding even more Real User Monitoring features. Check out our documentation to start collecting browser logs. If you’re not yet using Datadog, sign up for a free trial to monitor browser logs alongside backend logs, metrics, and traces in one platform.