diff --git a/lib/datadog/tracing/metadata/tagging.rb b/lib/datadog/tracing/metadata/tagging.rb index 12a66555cef..6ce64e78dc3 100644 --- a/lib/datadog/tracing/metadata/tagging.rb +++ b/lib/datadog/tracing/metadata/tagging.rb @@ -70,6 +70,12 @@ def clear_tag(key) meta.delete(key) end + # Convenient interface for setting a single tag. + alias []= set_tag + + # Convenient interface for getting a single tag. + alias [] get_tag + # Return the metric with the given key, nil if it doesn't exist. def get_metric(key) metrics[key] || meta[key]