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

推荐订阅源

B
Blog RSS Feed
Jina AI
Jina AI
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
博客园 - 司徒正美
罗磊的独立博客
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Vercel News
Vercel News
A
About on SuperTechFans
I
InfoQ
D
DataBreaches.Net
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队

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
Enhance code reliability with Datadog Quality Gates
2023-08-03 · via Datadog | The Monitor blog

Maintaining the quality of your code becomes increasingly difficult as your organization grows. Engineering teams need to release code quickly while still finding a way to enforce best practices, catch security vulnerabilities, and prevent flaky tests. To address this challenge, Datadog is pleased to introduce Quality Gates, a feature that automatically halts code merges when they fail to satisfy your configured quality checks.

Using Quality Gates, your teams can configure rules based on their specific priorities to ensure high standards of code quality, performance, and security. For example, you can choose to block any code merges that would lower your code coverage for only a select few branches and repositories while blocking all merges that would introduce flaky tests across all of your repositories. This provides enough flexibility for your engineers to rapidly develop and test new features while still helping you ensure that your code meets all of your standards before it reaches production.

In this post, we’ll cover how Quality Gates can help you:

View your existing quality gates in Datadog CI.

Prevent flaky tests and maintain code coverage

Datadog Test Visibility provides end-to-end insights into your test runs and highlights flaky tests across recent commits. When flaky tests are merged into your codebase, they introduce a variable factor that can indiscriminately break builds and inhibit development speed. As these flaky tests compound over time, they are increasingly likely to affect your pipeline—and their prevalence makes remediation more difficult.

Quality Gates enables you to prevent flaky tests from propagating across your codebase. As shown below, you can configure a rule that evaluates all code releases and blocks those that introduce new flaky tests. By defining your rule scope, you can configure your quality gate to evaluate all of your CI pipelines or only those that apply to specific repositories and branches.

Block commits that introduce flaky tests to your codebase.

Similarly, you can define rules to ensure that new commits do not decrease the code coverage of a given service. Datadog compares your test session with your default branch’s latest commit to check if your changes would reduce your code coverage. Preventing a reduction in code coverage reduces the risk of introducing bugs to production, so you can confidently make changes and ship new products.

Block commits that lower your service’s code coverage.

Enforce best practices with Static Analysis gates

Datadog Static Analysis helps you ensure code quality by identifying maintainability issues and violations of best practices prior to runtime. Although best practices are necessary for maintaining the quality and readability of your code, they can be difficult to enforce when developing at high velocity.

With Quality Gates, you can enforce Static Analysis results and address code violations before your release is deployed. Datadog classifies Static Analysis rules into different categories (e.g., best practices, code style, performance, security) and severity levels. The following screenshot shows an example of a high-severity security violation that could leave your application vulnerable to SQL injections. You can use this taxonomy to create flexible Quality Gate rules to suit your specific needs.

View recent security violations in the CI Static Analysis view.

The screenshot below shows how you could configure a rule to block any commit that would introduce even a single security violation to your service. Implementing this rule can help ensure that all code violations under Datadog’s security rule set are addressed before any changes go live.

Block commits that introduce flaky tests to your codebase.

On the other hand, you can take a more lenient approach when enforcing linting for code style and best practices by blocking deployments only when they introduce three or more violations in these categories. You can also create non-blocking rules to track the overall compliance of releases without slowing down your development speed.

Defining quality gates on various categories and thresholds helps you address issues earlier in the software development lifecycle, before they impact customers and hinder application performance and security. You can visualize your recent static analysis results and track your recent and most common violations of best practices in the CI Static Analysis view. For the full list of Static Analysis rules provided by Datadog, you can check out our documentation.

Maintain code quality with Datadog

Datadog Quality Gates enables you to create flexible, actionable rules to enforce coding best practices and ensure the quality of your test suites. Quality Gates is now available in Preview—request access via this form or learn more about creating and evaluating rules for your current pipeline in our documentation.

If you don’t already have a Datadog account, you can sign up for a free 14-day trial today.