Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ActiveSupport::Cache instrumentation missing namespace #3808

Open
jcoleman opened this issue Jul 25, 2024 · 0 comments
Open

ActiveSupport::Cache instrumentation missing namespace #3808

jcoleman opened this issue Jul 25, 2024 · 0 comments
Labels
bug Involves a bug community Was opened by a community member

Comments

@jcoleman
Copy link

Current behaviour
set_cache_key (https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb#L61) calls don't include the namespace, and the key is not necessarily meaningful on its own. For example, if I configured a cache with namespace: "my_model" and then cache the key 123 (e.g., from the primary key), then the DataDog span will include key: 123 which isn't really the full key -- it's missing the namespace and makes that span worthless.

Expected behaviour
Cache spans should include the namespace.

Steps to reproduce
Instrument ActiveSupport:Cache. Configure a cache with the namespace option.

How does datadog help you?
I'm trying to understand a trace with lots of cache spans but can't determine where to improve the application because the span is missing the necessary information.

Environment

  • datadog version: Current (but this goes back to older ones as well)
  • Configuration block (Datadog.configure ...):
  • Ruby version: 3.3
  • Operating system: Debian
  • Relevant library versions: N/A
@jcoleman jcoleman added bug Involves a bug community Was opened by a community member labels Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

1 participant