Module: D13n::Metric::AppStateMetric::Namespace

Included in:
ExceptionProcessor, GemProcessor
Defined in:
lib/d13n/metric/metrics/app_state_metric.rb

Instance Method Summary collapse

Instance Method Details

#exception_metric_tags(exception, opts) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/d13n/metric/metrics/app_state_metric.rb', line 14

def exception_metric_tags(exception, opts)
  tags = []
  tags << "idc:#{Helper.idc_name}"
  tags << "env:#{Helper.idc_env}"
  tags << "app:#{Helper.app_name}"
  tags << "name:#{exception.class.name}"
  tags << "at:#{opts.fetch(:at, 'runtime')}"
  tags << "src:#{opts.fetch(:src, 'app')}"
  tags << "uuid:#{opts.fetch(:uuid, 'unknown')}"
  tags << "stream_id:#{opts[:referring_stream_id] || opts.fetch(:uuid, 'unknown')}"
  tags
end

#gem_metric_tags(gem_info) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/d13n/metric/metrics/app_state_metric.rb', line 4

def gem_metric_tags(gem_info)
  tags = []
  tags << "idc:#{Helper.idc_name}"
  tags << "env:#{Helper.idc_env}"
  tags << "app:#{Helper.app_name}"
  tags << "gem:#{gem_info[0]}"
  tags << "version:#{gem_info[1]}"
  tags
end