changed CHANGELOG.md
 
@@ -1,5 1,11 @@
1
1
## CHANGELOG
2
2
3
### `v1.9.2`
4
5
Fixes
6
7
* Fix a error that can happen if required attributes aren't captured. [#103](https://github.com/newrelic/elixir_agent/pull/103)
8
3
9
### `v1.9.1`
4
10
5
11
Fixes
changed VERSION
 
@@ -1 1 @@
1
- 1.9.1
1
1.9.2
changed hex_metadata.config
 
@@ -3,76 3,77 @@
3
3
{<<"description">>,<<"New Relic's Open-Source Elixir Agent">>}.
4
4
{<<"elixir">>,<<"~> 1.7">>}.
5
5
{<<"files">>,
6
- [<<"lib">>,<<"lib/new_relic">>,<<"lib/new_relic.ex">>,
7
- <<"lib/new_relic/aggregate">>,<<"lib/new_relic/aggregate/aggregate.ex">>,
8
- <<"lib/new_relic/aggregate/reporter.ex">>,
9
- <<"lib/new_relic/aggregate/supervisor.ex">>,
10
- <<"lib/new_relic/application.ex">>,<<"lib/new_relic/config.ex">>,
11
- <<"lib/new_relic/custom">>,<<"lib/new_relic/custom/event.ex">>,
6
[<<"lib">>,<<"lib/new_relic">>,<<"lib/new_relic/transaction.ex">>,
7
<<"lib/new_relic/tracer">>,<<"lib/new_relic/tracer/macro.ex">>,
8
<<"lib/new_relic/tracer/report.ex">>,<<"lib/new_relic/util.ex">>,
9
<<"lib/new_relic/transaction">>,
10
<<"lib/new_relic/transaction/supervisor.ex">>,
11
<<"lib/new_relic/transaction/reporter.ex">>,
12
<<"lib/new_relic/transaction/event.ex">>,
13
<<"lib/new_relic/transaction/trace.ex">>,
14
<<"lib/new_relic/transaction/monitor.ex">>,
15
<<"lib/new_relic/transaction/error_handler.ex">>,
16
<<"lib/new_relic/transaction/plug.ex">>,
17
<<"lib/new_relic/transaction/complete.ex">>,
18
<<"lib/new_relic/instrumented">>,
19
<<"lib/new_relic/instrumented/httpoison.ex">>,
12
20
<<"lib/new_relic/distributed_trace">>,
13
- <<"lib/new_relic/distributed_trace.ex">>,
21
<<"lib/new_relic/distributed_trace/supervisor.ex">>,
14
22
<<"lib/new_relic/distributed_trace/backoff_sampler.ex">>,
15
23
<<"lib/new_relic/distributed_trace/context.ex">>,
16
24
<<"lib/new_relic/distributed_trace/plug.ex">>,
17
- <<"lib/new_relic/distributed_trace/supervisor.ex">>,
18
- <<"lib/new_relic/distributed_trace/tracker.ex">>,<<"lib/new_relic/error">>,
19
- <<"lib/new_relic/error/error_logger_handler.ex">>,
20
- <<"lib/new_relic/error/event.ex">>,
21
- <<"lib/new_relic/error/logger_handler.ex">>,
22
- <<"lib/new_relic/error/reporter.ex">>,
23
- <<"lib/new_relic/error/supervisor.ex">>,<<"lib/new_relic/error/trace.ex">>,
24
- <<"lib/new_relic/graceful_shutdown.ex">>,<<"lib/new_relic/harvest">>,
25
<<"lib/new_relic/distributed_trace/tracker.ex">>,<<"lib/new_relic/util">>,
26
<<"lib/new_relic/util/event.ex">>,<<"lib/new_relic/util/error.ex">>,
27
<<"lib/new_relic/util/vendor.ex">>,<<"lib/new_relic/util/apdex.ex">>,
28
<<"lib/new_relic/util/priority_queue.ex">>,<<"lib/new_relic/util/http.ex">>,
29
<<"lib/new_relic/util/attr_store.ex">>,<<"lib/new_relic/logger.ex">>,
30
<<"lib/new_relic/graceful_shutdown.ex">>,<<"lib/new_relic/aggregate">>,
31
<<"lib/new_relic/aggregate/supervisor.ex">>,
32
<<"lib/new_relic/aggregate/reporter.ex">>,
33
<<"lib/new_relic/aggregate/aggregate.ex">>,<<"lib/new_relic/config.ex">>,
34
<<"lib/new_relic/distributed_trace.ex">>,<<"lib/new_relic/harvest">>,
35
<<"lib/new_relic/harvest/supervisor.ex">>,
25
36
<<"lib/new_relic/harvest/collector">>,
26
- <<"lib/new_relic/harvest/collector/agent_run.ex">>,
27
- <<"lib/new_relic/harvest/collector/connect.ex">>,
28
- <<"lib/new_relic/harvest/collector/custom_event">>,
29
- <<"lib/new_relic/harvest/collector/custom_event/harvester.ex">>,
30
- <<"lib/new_relic/harvest/collector/data_supervisor.ex">>,
37
<<"lib/new_relic/harvest/collector/supervisor.ex">>,
31
38
<<"lib/new_relic/harvest/collector/error_trace">>,
32
39
<<"lib/new_relic/harvest/collector/error_trace/harvester.ex">>,
40
<<"lib/new_relic/harvest/collector/protocol.ex">>,
41
<<"lib/new_relic/harvest/collector/transaction_event">>,
42
<<"lib/new_relic/harvest/collector/transaction_event/harvester.ex">>,
43
<<"lib/new_relic/harvest/collector/connect.ex">>,
44
<<"lib/new_relic/harvest/collector/agent_run.ex">>,
45
<<"lib/new_relic/harvest/collector/data_supervisor.ex">>,
46
<<"lib/new_relic/harvest/collector/custom_event">>,
47
<<"lib/new_relic/harvest/collector/custom_event/harvester.ex">>,
48
<<"lib/new_relic/harvest/collector/transaction_trace">>,
49
<<"lib/new_relic/harvest/collector/transaction_trace/harvester.ex">>,
33
50
<<"lib/new_relic/harvest/collector/harvest_cycle.ex">>,
34
- <<"lib/new_relic/harvest/collector/harvester_store.ex">>,
51
<<"lib/new_relic/harvest/collector/span_event">>,
52
<<"lib/new_relic/harvest/collector/span_event/harvester.ex">>,
35
53
<<"lib/new_relic/harvest/collector/harvester_supervisor.ex">>,
54
<<"lib/new_relic/harvest/collector/transaction_error_event">>,
55
<<"lib/new_relic/harvest/collector/transaction_error_event/harvester.ex">>,
36
56
<<"lib/new_relic/harvest/collector/metric">>,
37
57
<<"lib/new_relic/harvest/collector/metric/harvester.ex">>,
38
58
<<"lib/new_relic/harvest/collector/metric_data.ex">>,
39
- <<"lib/new_relic/harvest/collector/protocol.ex">>,
40
- <<"lib/new_relic/harvest/collector/span_event">>,
41
- <<"lib/new_relic/harvest/collector/span_event/harvester.ex">>,
42
- <<"lib/new_relic/harvest/collector/supervisor.ex">>,
43
- <<"lib/new_relic/harvest/collector/transaction_error_event">>,
44
- <<"lib/new_relic/harvest/collector/transaction_error_event/harvester.ex">>,
45
- <<"lib/new_relic/harvest/collector/transaction_event">>,
46
- <<"lib/new_relic/harvest/collector/transaction_event/harvester.ex">>,
47
- <<"lib/new_relic/harvest/collector/transaction_trace">>,
48
- <<"lib/new_relic/harvest/collector/transaction_trace/harvester.ex">>,
49
- <<"lib/new_relic/harvest/supervisor.ex">>,<<"lib/new_relic/init.ex">>,
50
- <<"lib/new_relic/instrumented">>,
51
- <<"lib/new_relic/instrumented/httpoison.ex">>,<<"lib/new_relic/logger.ex">>,
52
- <<"lib/new_relic/metric">>,<<"lib/new_relic/metric/metric.ex">>,
53
- <<"lib/new_relic/sampler">>,<<"lib/new_relic/sampler/beam.ex">>,
54
- <<"lib/new_relic/sampler/ets.ex">>,<<"lib/new_relic/sampler/process.ex">>,
55
- <<"lib/new_relic/sampler/reporter.ex">>,
59
<<"lib/new_relic/harvest/collector/harvester_store.ex">>,
60
<<"lib/new_relic/init.ex">>,<<"lib/new_relic/span">>,
61
<<"lib/new_relic/span/event.ex">>,<<"lib/new_relic/sampler">>,
56
62
<<"lib/new_relic/sampler/supervisor.ex">>,
57
- <<"lib/new_relic/sampler/top_process.ex">>,<<"lib/new_relic/span">>,
58
- <<"lib/new_relic/span/event.ex">>,<<"lib/new_relic/tracer">>,
59
- <<"lib/new_relic/tracer.ex">>,<<"lib/new_relic/tracer/macro.ex">>,
60
- <<"lib/new_relic/tracer/report.ex">>,<<"lib/new_relic/transaction">>,
61
- <<"lib/new_relic/transaction.ex">>,
62
- <<"lib/new_relic/transaction/complete.ex">>,
63
- <<"lib/new_relic/transaction/error_handler.ex">>,
64
- <<"lib/new_relic/transaction/event.ex">>,
65
- <<"lib/new_relic/transaction/monitor.ex">>,
66
- <<"lib/new_relic/transaction/plug.ex">>,
67
- <<"lib/new_relic/transaction/reporter.ex">>,
68
- <<"lib/new_relic/transaction/supervisor.ex">>,
69
- <<"lib/new_relic/transaction/trace.ex">>,<<"lib/new_relic/util">>,
70
- <<"lib/new_relic/util.ex">>,<<"lib/new_relic/util/apdex.ex">>,
71
- <<"lib/new_relic/util/attr_store.ex">>,<<"lib/new_relic/util/error.ex">>,
72
- <<"lib/new_relic/util/event.ex">>,<<"lib/new_relic/util/http.ex">>,
73
- <<"lib/new_relic/util/priority_queue.ex">>,
74
- <<"lib/new_relic/util/vendor.ex">>,<<"priv">>,<<"priv/cacert.pem">>,
75
- <<"mix.exs">>,<<"README.md">>,<<"CHANGELOG.md">>,<<"VERSION">>]}.
63
<<"lib/new_relic/sampler/reporter.ex">>,<<"lib/new_relic/sampler/beam.ex">>,
64
<<"lib/new_relic/sampler/ets.ex">>,
65
<<"lib/new_relic/sampler/top_process.ex">>,
66
<<"lib/new_relic/sampler/process.ex">>,<<"lib/new_relic/tracer.ex">>,
67
<<"lib/new_relic/application.ex">>,<<"lib/new_relic/custom">>,
68
<<"lib/new_relic/custom/event.ex">>,<<"lib/new_relic/metric">>,
69
<<"lib/new_relic/metric/metric.ex">>,<<"lib/new_relic/error">>,
70
<<"lib/new_relic/error/supervisor.ex">>,
71
<<"lib/new_relic/error/reporter.ex">>,
72
<<"lib/new_relic/error/logger_handler.ex">>,
73
<<"lib/new_relic/error/event.ex">>,<<"lib/new_relic/error/trace.ex">>,
74
<<"lib/new_relic/error/error_logger_handler.ex">>,<<"lib/new_relic.ex">>,
75
<<"priv">>,<<"priv/cacert.pem">>,<<"mix.exs">>,<<"README.md">>,
76
<<"CHANGELOG.md">>,<<"VERSION">>]}.
76
77
{<<"licenses">>,[<<"Apache 2.0">>]}.
77
78
{<<"links">>,[{<<"GitHub">>,<<"https://github.com/newrelic/elixir_agent">>}]}.
78
79
{<<"name">>,<<"new_relic_agent">>}.
 
@@ -92,4 93,4 @@
92
93
{<<"optional">>,false},
93
94
{<<"repository">>,<<"hexpm">>},
94
95
{<<"requirement">>,<<"~> 1.1">>}]]}.
95
- {<<"version">>,<<"1.9.1">>}.
96
{<<"version">>,<<"1.9.2">>}.
changed lib/new_relic/harvest/collector/metric_data.ex
 
@@ -245,5 245,13 @@ defmodule NewRelic.Harvest.Collector.MetricData do
245
245
}
246
246
]
247
247
248
def transform(:supportability, [:transaction, :missing_attributes]),
249
do: [
250
%Metric{
251
name: :"Supportability/Transaction/MissingAttributes",
252
call_count: 1
253
}
254
]
255
248
256
defp join(segments), do: NewRelic.Util.metric_join(segments)
249
257
end
changed lib/new_relic/transaction/complete.ex
 
@@ -6,7 6,10 @@ defmodule NewRelic.Transaction.Complete do
6
6
alias NewRelic.DistributedTrace
7
7
alias NewRelic.Transaction
8
8
9
- def run(tx_attrs, pid) do
9
def run(
10
%{start_time: _, start_time_mono: _, end_time_mono: _} = tx_attrs,
11
pid
12
) do
10
13
{tx_segments, tx_attrs, tx_error, span_events, apdex, tx_metrics} =
11
14
tx_attrs
12
15
|> transform_name_attrs
 
@@ -24,10 27,16 @@ defmodule NewRelic.Transaction.Complete do
24
27
report_span_events(span_events)
25
28
end
26
29
30
def run(tx_attrs, _pid) do
31
NewRelic.report_metric(:supportability, [:transaction, :missing_attributes])
32
NewRelic.log(:debug, "Missing required transaction attributes. #{inspect(tx_attrs)}")
33
end
34
27
35
defp transform_name_attrs(%{custom_name: name} = tx), do: Map.put(tx, :name, name)
28
36
defp transform_name_attrs(%{framework_name: name} = tx), do: Map.put(tx, :name, name)
29
37
defp transform_name_attrs(%{plug_name: name} = tx), do: Map.put(tx, :name, name)
30
38
defp transform_name_attrs(%{other_transaction_name: name} = tx), do: Map.put(tx, :name, name)
39
defp transform_name_attrs(tx), do: Map.put(tx, :name, "Unknown")
31
40
32
41
defp transform_time_attrs(
33
42
%{start_time: start_time, end_time_mono: end_time_mono, start_time_mono: start_time_mono} =