Skip to content

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

@liaden

Description

@liaden

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityWas opened by a community memberfeature-requestA request for a new feature or change to an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions