# Should you use a log or a metric?

DevFeed: [Should you use a log or a metric?](<https://devfeed.tech/articles/should-you-use-a-log-or-a-metric-96238.md>)

Original publisher: [Read original article](<https://blog.sentry.io/when-you-need-a-metric/>)

Author: Kyle Tryon

Published: 2026-10-22T09:00:00Z

Content type: tutorial

Language: en

Sources: [Sentry](<https://devfeed.tech/sources/sentry-blog.md>)

Topics: [log management](<https://devfeed.tech/topics/log-management.md>), [dynatrace](<https://devfeed.tech/topics/dynatrace.md>), [pii](<https://devfeed.tech/topics/pii.md>), [metric-standardization](<https://devfeed.tech/topics/metric-standardization.md>)

Tags: [about](<https://devfeed.tech/tags/about.md>), [acme](<https://devfeed.tech/tags/acme.md>), [added](<https://devfeed.tech/tags/added.md>), [agent](<https://devfeed.tech/tags/agent.md>), [alerts](<https://devfeed.tech/tags/alerts.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [analytics](<https://devfeed.tech/tags/analytics.md>), [app](<https://devfeed.tech/tags/app.md>), [application](<https://devfeed.tech/tags/application.md>), [apply](<https://devfeed.tech/tags/apply.md>), [can](<https://devfeed.tech/tags/can.md>), [handler](<https://devfeed.tech/tags/handler.md>), [here](<https://devfeed.tech/tags/here.md>), [just](<https://devfeed.tech/tags/just.md>), [logs](<https://devfeed.tech/tags/logs.md>), [metric](<https://devfeed.tech/tags/metric.md>), [question](<https://devfeed.tech/tags/question.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

Use logs to reconstruct what happened at code decision points; use metrics for numbers you plan to track over time. In Sentry, logs and metrics can both be filtered and counted, but traces are sampled while logs and metrics are retained as sent, so traces may not provide exact counts. You can count an existing log when debugging or charting an issue; emit a metric when the number is a continuing question, such as signup trends or funnel drop-off. Sentry counters count events, gauges record current levels such as queue depth, and distributions capture value spreads such as time between requests. Shared scope attributes can keep log and metric context consistent, while later funnel steps need those attributes passed again. Logs help investigate individual events; metrics do not follow users across steps or provide cohorts or retention analysis. The article recommends sending Sentry only application logs useful for debugging and selected metrics, with stable event names and attribute keys.

## Source excerpt

If you already log it, you can probably just count the logs. Here's when a question deserves its own metric, shown with one signup handler.