Skip to content

[FEATURE]: Add a custom tag to errors #4617

New issue

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

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

Already on GitHub? Sign in to your account

Open
liaden opened this issue Apr 30, 2025 · 0 comments
Open

[FEATURE]: Add a custom tag to errors #4617

liaden opened this issue Apr 30, 2025 · 0 comments
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one

Comments

@liaden
Copy link

liaden commented Apr 30, 2025

Gem Name

No response

Gem Version(s)

No response

Describe the goal of the feature

Generically, I want to be able to add additional tags to allow for searching on errors.

Is your feature request related to a problem?

We have a monolith application with multiple teams supporting. Using the code_ownership, I want to add a team label where the value is CodeOwnership.for_backtrace(e).

Describe alternatives you've considered

  1. Using Rails.error.handle to:
    a. Create a nested span with the appropriate tags to attach the error
    b. Do Datadog::Tracing.active_span.set_tag('error.team', team)
  2. Using the on_error for some integrations (such as Sidekiq) to do the above, but there isn't one for Rails controllers (or Rack requests).
  3. Monkeypatching Datadog::Tracing::Metadata::Errors#set_error_tags to attach the extra tags.

Additional context

No response

How does Datadog help you?

No response

@liaden liaden added community Was opened by a community member feature-request A request for a new feature or change to an existing one labels Apr 30, 2025
@liaden liaden changed the title [FEATURE]: Add a tag to errors [FEATURE]: Add a custom tag to errors Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one
Projects
None yet
Development

No branches or pull requests

1 participant