Datadog Cost Optimization: Custom Metrics Tips

Learn effective strategies to optimize custom metrics in Datadog, reducing costs while maintaining essential monitoring for your business.

Datadog Cost Optimization: Custom Metrics Tips

Managing Datadog custom metrics can save your business thousands annually. Custom metrics, while useful for tracking specific performance data, can quickly inflate costs if not handled properly. For small and medium-sized businesses (SMBs), this is especially critical as custom metrics can account for over 50% of Datadog bills. Here's how to control them effectively:

  • Understand custom metrics: These are metrics generated outside Datadog's standard integrations, often tied to unique business needs.
  • Identify high-cost drivers: High cardinality (unique combinations of metric tags) is a major cost factor.
  • Audit and streamline metrics: Use tools like the Metric Summary page to spot inactive or redundant metrics.
  • Optimize tags and data collection: Limit high-cardinality tags and adjust data collection frequency to reduce unnecessary metrics.
  • Leverage Datadog features: Use "Metrics Without Limits" to cut unused metrics by up to 70%.

How to Reduce Your Datadog Costs by Optimizing Metric Cardinality

Datadog

Finding and Reviewing High-Cost Custom Metrics

Keeping Datadog costs in check starts with identifying and managing high-cost custom metrics. Since these metrics are billed based on the number of unique metric series stored hourly, even minor inefficiencies can add up to hefty expenses. A structured approach can help pinpoint and eliminate unnecessary spending.

How to Review Custom Metrics Usage in Datadog

The Metric Summary page in Datadog is your go-to tool for evaluating custom metrics. It provides a clear view of active versus inactive metrics, helping you identify which ones are being queried and which are simply sitting idle. Remember, Datadog retains old metrics that may no longer serve a purpose, potentially driving up your bill.

Inactive metrics - those that aren’t queried - are prime candidates for removal. These metrics add to your monthly costs without delivering any real value. Additionally, reviewing your monthly invoices can help you spot cost spikes caused by excessive logging, underutilized APM, or high-cardinality metrics.

To stay ahead of unexpected expenses, configure alerts to flag unusual usage spikes. This proactive step ensures you can address cost issues before they spiral out of control. Once identified, focus on eliminating duplicate or low-value metrics to further reduce spending.

Finding Duplicate and Low-Value Metrics

Metrics with high cardinality - those with a large number of tags, labels, or unique identifiers - are often the biggest culprits behind inflated costs. For instance, if you’re tracking API response times with a tag for every user ID, you could be generating thousands of unique metric series when just a few hundred would suffice.

Start by reviewing metric definitions to identify duplicates or redundant data. Check for cases where multiple teams or services are tracking similar metrics but using slightly different names or tag structures. Consolidating these can significantly reduce costs.

Next, focus on cutting down high-cardinality tags. Only include tags that provide actionable insights essential for troubleshooting. Ask yourself: Does this tag justify its cost? Tags like detailed user IDs, overly specific timestamps, or granular geographic data often inflate costs without offering much value.

To avoid future issues, establish clear guidelines for creating custom metrics. Don’t let every microservice define its own metrics without oversight. Implement a governance process to ensure new metrics are approved and existing ones are regularly reviewed for relevance. This prevents metric sprawl and keeps your monitoring setup consistent and cost-efficient.

Once you’ve streamlined your metrics, it’s time to align them with your business objectives.

Matching Metrics with Business Goals

After removing redundant or wasteful metrics, ensure the remaining ones directly support your business goals. Leveraging Metrics Without Limits on unqueried metrics can cut custom metric usage by as much as 70%.

Focus on metrics that impact key areas like customer experience, revenue, and system health. For example, metrics such as cart completion time or support response time can shed light on conversion rates, while payment success rate and average order value offer insights into financial performance.

To keep your metrics aligned with evolving priorities, conduct quarterly reviews to assess their relevance. Metrics that were vital six months ago might no longer support current decision-making. Assigning team members ownership of specific metric categories ensures ongoing evaluation and optimization, keeping your monitoring strategy both effective and cost-efficient.

Methods for Cutting Custom Metrics Volume

After identifying costly metrics and aligning them with your business goals, it’s time to implement targeted strategies to reduce their volume. These methods focus on combining related metrics, adjusting how often data is collected, and refining tagging practices for better efficiency. Let’s start with how to merge and group similar metrics.

Combining and Grouping Metrics

Bringing similar metrics together through consolidation and aggregation is one of the most effective ways to reduce costs. Consolidation combines related metrics into a single measurement, while aggregation summarizes detailed data points into broader statistics.

Take the example of monitoring printers across a multi-office setup. If you track ink levels for 3 printers in each of 100 offices, that’s 300 custom metrics. By using Metrics without Limits and dropping the printer tag, you can reduce this to 100 contexts - one per office - by storing the average ink level for all printers in each location. This simple change cuts the metric volume by 67%, while still giving you actionable insights at the office level.

Template variables can also simplify monitoring. These variables allow dashboards to adapt dynamically based on selected filters, reducing the need to maintain multiple unique metric series while ensuring consistent visibility across different contexts.

When consolidating metrics, focus on grouping those that serve similar purposes. For instance, instead of tracking response times for every API endpoint separately, you could combine them into a single service-level average - assuming individual endpoint performance isn’t critical for daily operations.

Approach Pros Cons
Consolidation Reduces metric count, simplifies dashboards, lowers costs Less granular detail
Aggregation Maintains trend visibility, reduces storage costs, preserves historical patterns Requires raw data processing, potential delays in insights

Adjusting Data Collection Frequency

How often you collect data has a direct impact on custom metric volume - and costs. Striking a balance between capturing meaningful changes and avoiding unnecessary data collection is key.

For high-priority transactions, collecting data every 10 seconds might be necessary. But for general trend analysis, hourly aggregation often suffices. Aligning collection frequency with the typical duration between significant changes in your metrics can save resources without compromising insights.

Dynamic scheduling is another effective approach. By configuring your Datadog agent to collect data less frequently during predictable low-usage periods - like nights, weekends, or maintenance windows - you can reduce monitoring overhead by 30–50%. This ensures you’re not paying for unnecessary data collection during off-peak hours.

Pre-aggregation offers additional savings. Instead of sending every individual data point to Datadog, process high-frequency metrics locally and transmit only summary statistics. For example, instead of sending 3,600 response time measurements per hour, you could send just the average, 95th percentile, and maximum values.

Rollup configurations can help manage long-term storage costs. You can store detailed, per-second data for recent periods when analysis is most likely, and automatically convert older data into per-minute or per-hour averages. This tiered storage approach balances immediate visibility with cost control.

Next, let’s look at how optimizing your tagging strategy can further reduce metric volume.

Using Tags and Groups to Reduce Cardinality

Refining your tagging strategy is another powerful way to control costs. High-cardinality tags - those with many unique values - are often the biggest contributors to custom metric expenses. Every unique combination of tag values creates a separate metric series, so thoughtful tagging can make a big difference.

Start by building a structured tagging system that aligns with your business needs. Focus on tags that provide actionable insights, such as:

  • Environment: production, staging, development
  • Team ownership: backend, frontend, devops
  • Geographic location: us-east, eu-west
  • Service type: API, database, cache

Avoid tags with unlimited or highly variable values, like user IDs, timestamps, or detailed geographic coordinates, as they can quickly escalate costs without delivering meaningful insights.

Template variables work hand-in-hand with strategic tagging. Instead of hardcoding specific tag values, use variables to allow users to filter and drill down as needed. This reduces the number of unique metric contexts while maintaining flexibility for various teams and use cases.

For example, while detailed user identifiers might seem helpful, they rarely deliver insights that justify their cost. Instead, focus on tags that aid in troubleshooting, capacity planning, or decision-making.

Metrics without Limits can further enhance your tagging strategy. By reducing the granularity of metrics that aren’t actively used in dashboards or alerts, this feature can cut custom metric usage by up to 70%, while still retaining critical data for monitoring and analysis.

Finally, establish clear naming standards and document them for your team. Consistent naming helps prevent accidental duplication and makes it easier to spot opportunities for consolidation. Regularly auditing your tagging strategy can also catch issues like “cardinality creep” before they impact your budget.

Tracking Cost Efficiency and ROI with Datadog

Once you've reduced custom metric volume, the next step is to set up systems that help you track costs and measure ROI effectively.

Creating Cost Alerts and Dashboards

To keep costs under control, use Datadog's tools to build dashboards and set up alerts that provide real-time insights into custom metric usage. These tools allow for proactive cost management by highlighting trends and potential issues before they escalate.

Start by creating a cost-monitoring dashboard that tracks usage trends, monthly limits, and team-specific breakdowns. The Metrics Volume Management page is particularly useful for identifying the top custom metrics by indexed volume, helping you quickly spot the biggest contributors to your costs.

Set up monitors to alert you when usage crosses predefined thresholds, preventing unexpected billing increases. Datadog offers several types of monitors, including:

  • Metric monitors for tracking usage patterns.
  • Anomaly monitors to flag unusual spikes.
  • Forecast monitors to predict future costs.

You can also use filters on the Metrics Volume Management page to narrow down metrics by specific teams or projects, making it easier to identify which areas are driving higher costs.

The Metrics Tags Cardinality Explorer is another handy tool for identifying high-cardinality tags that could be causing usage spikes. If you find problematic tags, consider excluding them or revising your tagging strategy to minimize their impact. Even small adjustments can lead to meaningful savings, especially since Datadog charges as little as $1 per 100 custom metrics per month beyond the allocated volume per host.

For transparency, share these dashboards with stakeholders to ensure everyone is aligned on cost management goals. These alerts and dashboards not only help control expenses but also pave the way for evaluating the broader business impact.

Connecting Metrics with Business Results

Once cost alerts are in place, the next step is tying cost savings to tangible business outcomes. Datadog's Metrics without Limits feature is particularly effective here. Customers using this feature to manage unqueried metrics have reported up to a 70% reduction in custom metric usage. This allows you to allocate your indexing budget to metrics that truly drive business results.

To secure your optimized setup, use role-based access control and audit trails, ensuring that your configurations remain protected.

As with earlier strategies, it's crucial to align your monitoring efforts with your business objectives. Regular reviews and adjustments will help ensure your investments in monitoring continue to deliver value aligned with your goals.

Growing Datadog Usage for SMB Expansion

As your small or medium-sized business (SMB) grows, it’s crucial to scale your Datadog setup to maintain clear visibility across your systems without letting costs spiral out of control. The key is to expand your monitoring capabilities in a way that supports your business needs while staying mindful of your budget.

Balancing Monitoring Coverage with Budget Limits

Growing SMBs often face a tricky balancing act: they need robust monitoring to manage increasing complexity but must avoid spending like large enterprises. To strike this balance, take a close look at Datadog's pricing for core services and match them to your actual usage patterns to avoid overspending.

Start by optimizing resource usage. Did you know that more than 65% of monitored containers use less CPU and memory than they’re allocated? Adjusting these allocations can lead to significant savings. Consider consumption-based pricing models for containers or serverless functions, as these align costs directly with usage.

Another way to save is by taking advantage of committed discounts. For services with predictable consumption, like infrastructure monitoring, signing an annual contract can lower your per-unit costs. You can also automate tasks like shutting down non-production workloads during off-hours or consolidating services onto fewer instances. These steps can reduce host counts while maintaining the level of monitoring you need.

For Kubernetes environments, there are specific strategies to cut costs without sacrificing performance. Adjust pod density, leverage autoscalers, and limit metric collection to non-critical namespaces. Datadog Kubernetes Autoscaling offers automated recommendations for scaling, helping you save money while ensuring stability and performance.

The overall goal here is not to monitor every single metric but to focus on the ones that truly impact your business outcomes. Tools like Datadog Scorecards can help you evaluate your systems’ compliance with observability, reliability, and documentation standards, ensuring that every service is properly managed and monitored.

For more detailed guidance on scaling efficiently, check out the resources mentioned below.

Using Resources from Scaling with Datadog for SMBs

As your monitoring needs grow more complex, specialized resources can make a big difference in managing costs effectively. Pair your internal efforts with expert advice for the best results.

The Scaling with Datadog for SMBs blog is a great place to start. It’s packed with expert tips tailored specifically for SMBs using Datadog. This resource provides actionable strategies to optimize costs while ensuring your monitoring remains comprehensive.

The blog dives into advanced techniques for SMB environments, offering solutions to balance thorough monitoring with tight budget constraints. It includes real-world examples of challenges SMBs face as they grow and provides strategies to improve cloud infrastructure performance without overspending.

It also covers capacity planning using machine learning-based forecasts. This proactive approach helps you anticipate and address resource shortages before they become costly problems. By leveraging these insights, you can stay ahead of your growing needs and avoid unnecessary expenses.

Conclusion

Custom metric management plays a key role in keeping Datadog costs under control while ensuring robust monitoring capabilities.

Without careful oversight, custom metrics can lead to hefty expenses. For instance, a company using 250,000 custom metrics might end up paying an additional $150,000 annually just for those metrics alone. However, with a strategic approach, these costs can be kept in check and tied directly to measurable business outcomes.

To avoid unnecessary charges, take advantage of Datadog's Metric Summary page to regularly audit unused metrics. High-cardinality metrics can also drive up costs, so focus on limiting tags to only the essentials. Consolidate overlapping metrics and establish clear guidelines for creating new ones to prevent metric sprawl from spiraling out of control.

Every custom metric should serve a specific business purpose - whether it’s improving system uptime, enhancing customer satisfaction, or boosting operational efficiency. Once your metrics are aligned with your goals, stay proactive by tracking costs in real time. Datadog dashboards and alerts can help you monitor metric usage and expenses as they happen.

As your SMB grows, it’s important to plan ahead. Forecast your monitoring needs, set limits on metrics, and allocate your budget to avoid unpleasant surprises down the line.

For more insights on managing metrics and optimizing costs, visit Scaling with Datadog for SMBs.

FAQs

What are the best ways to audit and optimize custom metrics in Datadog to lower costs?

To keep costs in check while auditing and optimizing your custom metrics in Datadog, start by examining your metrics usage on the Plan & Usage page. This feature highlights metrics that may be contributing the most to your expenses, helping you pinpoint areas to adjust. Simplify your metrics by steering clear of high-cardinality tags like user IDs or timestamps, as these can quickly multiply the number of metric series - and your costs. Instead, opt for broader, more general tags like regions or user tiers.

Make it a habit to review your metrics regularly. Remove any data that's unused or redundant, and set thresholds to prevent unnecessary data collection. Focus on tracking metrics that deliver actionable insights. By refining your metrics in this way, you can maintain a clear view of your systems without overspending.

How can I manage high-cardinality tags in Datadog to reduce costs?

To keep your Datadog costs in check when working with high-cardinality tags, it’s important to use them sparingly and only when absolutely necessary. Steer clear of tagging with dynamic or highly unique values such as user IDs, timestamps, or version numbers, as these can quickly drive up expenses. Instead, establish and follow clear guidelines for how tags should be created and used.

Another smart approach is to make the most of filters and groupings to minimize tracking of unnecessary metrics. Regularly review your account for tags or services that might be inflating costs, and set up alerts to catch potential issues before they escalate. By taking these steps, you can better manage your Datadog budget while still keeping a close eye on performance.

How can I ensure my Datadog custom metrics align with my business goals and deliver real value?

To ensure your Datadog custom metrics align with your business goals, prioritize tracking metrics that directly tie into your key performance indicators (KPIs) - like revenue growth, customer satisfaction, or operational efficiency. The metrics you choose should offer actionable insights and reflect your most important strategic objectives.

Make it a habit to regularly review and adjust these metrics as your business needs change. Set up automated alerts to catch critical changes early, enabling your team to respond promptly. By zeroing in on the metrics that matter most, you can manage costs effectively, enhance system performance, and achieve measurable outcomes that support your business goals.

Related posts