newrelic_rpm 3.15.2.317 → 3.16.0.318
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +23 -0
- data/lib/new_relic/agent.rb +0 -3
- data/lib/new_relic/agent/agent.rb +29 -34
- data/lib/new_relic/agent/attribute_filter.rb +2 -0
- data/lib/new_relic/agent/configuration/default_source.rb +50 -4
- data/lib/new_relic/agent/database/obfuscation_helpers.rb +3 -2
- data/lib/new_relic/agent/hash_extensions.rb +16 -1
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +82 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +9 -8
- data/lib/new_relic/agent/instrumentation/rails5/action_cable.rb +29 -0
- data/lib/new_relic/agent/new_relic_service.rb +12 -4
- data/lib/new_relic/agent/new_relic_service/encoders.rb +19 -3
- data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +5 -1
- data/lib/new_relic/agent/supported_versions.rb +1 -1
- data/lib/new_relic/agent/transaction.rb +2 -1
- data/lib/new_relic/agent/transaction/request_attributes.rb +15 -0
- data/lib/new_relic/agent/utilization_data.rb +45 -1
- data/lib/new_relic/recipes/capistrano3.rb +44 -34
- data/lib/new_relic/version.rb +2 -2
- data/lib/tasks/versions.preface.html +7 -1
- data/lib/tasks/versions.rake +1 -1
- data/newrelic_rpm.gemspec +1 -0
- data/test/fixtures/cross_agent_tests/README.md +10 -32
- data/test/fixtures/cross_agent_tests/aws.json +2 -2
- data/test/fixtures/cross_agent_tests/rum_client_config.json +33 -4
- data/test/fixtures/cross_agent_tests/sql_obfuscation/README.md +1 -0
- data/test/fixtures/cross_agent_tests/utilization/README.md +13 -0
- data/test/fixtures/cross_agent_tests/utilization/utilization_json.json +132 -0
- data/test/multiverse/suites/agent_only/agent_attributes_test.rb +82 -0
- data/test/multiverse/suites/agent_only/utilization_data_collection_test.rb +2 -9
- data/test/multiverse/suites/rails/Envfile +1 -1
- data/test/multiverse/suites/rails/action_cable_test.rb +81 -0
- data/test/new_relic/agent/agent_test.rb +0 -1
- data/test/new_relic/agent/hash_extensions_test.rb +26 -1
- data/test/new_relic/agent/instrumentation/action_cable_subscriber_test.rb +124 -0
- data/test/new_relic/agent/method_tracer_test.rb +0 -1
- data/test/new_relic/agent/new_relic_service/json_marshaller_test.rb +27 -0
- data/test/new_relic/agent/utilization_data_test.rb +86 -0
- metadata +10 -4
- data/lib/new_relic/agent/transction_event_recorder.rb +0 -35
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
require 'base64'
|
6
6
|
require 'zlib'
|
7
|
+
require 'stringio'
|
7
8
|
|
8
9
|
module NewRelic
|
9
10
|
module Agent
|
@@ -16,8 +17,23 @@ module NewRelic
|
|
16
17
|
end
|
17
18
|
|
18
19
|
module Compressed
|
19
|
-
|
20
|
-
|
20
|
+
module Deflate
|
21
|
+
def self.encode(data, opts=nil)
|
22
|
+
Zlib::Deflate.deflate(data, Zlib::DEFAULT_COMPRESSION)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Gzip
|
27
|
+
BINARY = "BINARY".freeze
|
28
|
+
|
29
|
+
def self.encode(data, opts=nil)
|
30
|
+
output = StringIO.new
|
31
|
+
output.set_encoding BINARY
|
32
|
+
gz = Zlib::GzipWriter.new(output, Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY)
|
33
|
+
gz.write(data)
|
34
|
+
output.rewind
|
35
|
+
output.string
|
36
|
+
end
|
21
37
|
end
|
22
38
|
end
|
23
39
|
|
@@ -29,7 +45,7 @@ module NewRelic
|
|
29
45
|
Agent.config[:normalize_json_string_encodings]
|
30
46
|
end
|
31
47
|
json = ::NewRelic::JSONWrapper.dump(data, :normalize => normalize_encodings)
|
32
|
-
Base64.encode64(Compressed.encode(json))
|
48
|
+
Base64.encode64(Compressed::Deflate.encode(json))
|
33
49
|
end
|
34
50
|
end
|
35
51
|
end
|
@@ -86,7 +86,7 @@ module NewRelic
|
|
86
86
|
{
|
87
87
|
:type => :web,
|
88
88
|
:supported => ["~>2.1.0", "~>2.2.0", "~>2.3.0", "~3.0.0", "~>3.1.0", "~>3.2.0", "~>4.0.0", "~>4.1.0", "~>4.2.0"],
|
89
|
-
:experimental=> ["5.0.
|
89
|
+
:experimental=> ["5.0.0.rc1"],
|
90
90
|
:deprecated => ["~>2.0.0"],
|
91
91
|
:url => "https://rubygems.org/gems/rails",
|
92
92
|
:feed => "https://rubygems.org/gems/rails/versions.atom",
|
@@ -26,12 +26,13 @@ module NewRelic
|
|
26
26
|
RACK_PREFIX = 'Controller/Rack/'.freeze
|
27
27
|
SINATRA_PREFIX = 'Controller/Sinatra/'.freeze
|
28
28
|
GRAPE_PREFIX = 'Controller/Grape/'.freeze
|
29
|
+
ACTION_CABLE_PREFIX = 'Controller/ActionCable/'.freeze
|
29
30
|
OTHER_TRANSACTION_PREFIX = 'OtherTransaction/'.freeze
|
30
31
|
|
31
32
|
CONTROLLER_MIDDLEWARE_PREFIX = 'Controller/Middleware/Rack'.freeze
|
32
33
|
|
33
34
|
NESTED_TRACE_STOP_OPTIONS = { :metric => true }.freeze
|
34
|
-
WEB_TRANSACTION_CATEGORIES = [:controller, :uri, :rack, :sinatra, :grape, :middleware].freeze
|
35
|
+
WEB_TRANSACTION_CATEGORIES = [:controller, :uri, :rack, :sinatra, :grape, :middleware, :action_cable].freeze
|
35
36
|
TRANSACTION_NAMING_SOURCES = [:child, :api].freeze
|
36
37
|
|
37
38
|
MIDDLEWARE_SUMMARY_METRICS = ['Middleware/all'.freeze].freeze
|
@@ -12,6 +12,8 @@ module NewRelic
|
|
12
12
|
:host, :port, :user_agent, :request_method
|
13
13
|
|
14
14
|
HTTP_ACCEPT_HEADER_KEY = "HTTP_ACCEPT".freeze
|
15
|
+
REQUEST_URI_KEY = "request_uri".freeze
|
16
|
+
WILDCARD = "*".freeze
|
15
17
|
|
16
18
|
def initialize request
|
17
19
|
@request_path = path_from_request request
|
@@ -34,6 +36,14 @@ module NewRelic
|
|
34
36
|
txn.add_agent_attribute :'request.headers.referer', referer, AttributeFilter::DST_ERROR_COLLECTOR
|
35
37
|
end
|
36
38
|
|
39
|
+
# This is temporary and aims to avoid collecting this attribute on transaction and error traces,
|
40
|
+
# which already directly have a path value that the RPM UI depends on. We will either only
|
41
|
+
# collect request_uri as an agent attribute, in conjunction with UI work, or we will stop collecting
|
42
|
+
# this as an agent attribute (RUBY-1573)
|
43
|
+
if request_path && configured_to_collect?
|
44
|
+
txn.add_agent_attribute :request_uri, request_path, AttributeFilter::DST_TRANSACTION_EVENTS
|
45
|
+
end
|
46
|
+
|
37
47
|
if accept
|
38
48
|
txn.add_agent_attribute :'request.headers.accept', accept, default_destinations
|
39
49
|
end
|
@@ -109,6 +119,11 @@ module NewRelic
|
|
109
119
|
env[key]
|
110
120
|
end
|
111
121
|
end
|
122
|
+
|
123
|
+
def configured_to_collect?
|
124
|
+
txn_event_attributes = NewRelic::Agent.config[:'transaction_events.attributes.include']
|
125
|
+
txn_event_attributes.any?{|attribute| attribute == REQUEST_URI_KEY || attribute == WILDCARD}
|
126
|
+
end
|
112
127
|
end
|
113
128
|
end
|
114
129
|
end
|
@@ -7,7 +7,7 @@ require 'new_relic/agent/aws_info'
|
|
7
7
|
module NewRelic
|
8
8
|
module Agent
|
9
9
|
class UtilizationData
|
10
|
-
METADATA_VERSION =
|
10
|
+
METADATA_VERSION = 2
|
11
11
|
|
12
12
|
def hostname
|
13
13
|
NewRelic::Agent::Hostname.get
|
@@ -26,6 +26,27 @@ module NewRelic
|
|
26
26
|
::NewRelic::Agent::SystemInfo.ram_in_mib
|
27
27
|
end
|
28
28
|
|
29
|
+
def configured_hostname
|
30
|
+
Agent.config[:'utilization.billing_hostname']
|
31
|
+
end
|
32
|
+
|
33
|
+
# this is slightly ugly, but if a string value is passed in
|
34
|
+
# for the env var: NEW_RELIC_UTILIZATION_LOGICAL_PROCESSORS the
|
35
|
+
# coercion from EnvironmentSource will turn that into a numerical 0,
|
36
|
+
# which is not a reasonable value for logical_processes and should
|
37
|
+
# not be sent up
|
38
|
+
def configured_logical_processors
|
39
|
+
logical_processors = Agent.config[:'utilization.logical_processors']
|
40
|
+
logical_processors unless logical_processors == 0
|
41
|
+
end
|
42
|
+
|
43
|
+
# see comment above as the situation is the same for:
|
44
|
+
# NEW_RELIC_UTILIZATION_TOTAL_RAM_MIB
|
45
|
+
def configured_total_ram_mib
|
46
|
+
total_ram = Agent.config[:'utilization.total_ram_mib']
|
47
|
+
total_ram unless total_ram == 0
|
48
|
+
end
|
49
|
+
|
29
50
|
def to_collector_hash
|
30
51
|
result = {
|
31
52
|
:metadata_version => METADATA_VERSION,
|
@@ -36,6 +57,7 @@ module NewRelic
|
|
36
57
|
|
37
58
|
append_aws_info(result)
|
38
59
|
append_docker_info(result)
|
60
|
+
append_configured_values(result)
|
39
61
|
|
40
62
|
result
|
41
63
|
end
|
@@ -59,6 +81,28 @@ module NewRelic
|
|
59
81
|
collector_hash[:vendors][:docker] = {:id => docker_container_id}
|
60
82
|
end
|
61
83
|
end
|
84
|
+
|
85
|
+
def append_configured_values(collector_hash)
|
86
|
+
collector_hash[:config] = config_hash unless config_hash.empty?
|
87
|
+
end
|
88
|
+
|
89
|
+
def config_hash
|
90
|
+
config_hash = {}
|
91
|
+
|
92
|
+
if hostname = configured_hostname
|
93
|
+
config_hash[:hostname] = hostname
|
94
|
+
end
|
95
|
+
|
96
|
+
if logical_processors = configured_logical_processors
|
97
|
+
config_hash[:logical_processors] = logical_processors
|
98
|
+
end
|
99
|
+
|
100
|
+
if total_ram_mib = configured_total_ram_mib
|
101
|
+
config_hash[:total_ram_mib] = total_ram_mib
|
102
|
+
end
|
103
|
+
|
104
|
+
config_hash
|
105
|
+
end
|
62
106
|
end
|
63
107
|
end
|
64
108
|
end
|
@@ -9,46 +9,56 @@ namespace :newrelic do
|
|
9
9
|
# notifies New Relic of a deployment
|
10
10
|
desc "Record a deployment in New Relic (newrelic.com)"
|
11
11
|
task :notice_deployment do
|
12
|
-
|
13
|
-
|
12
|
+
if fetch(:newrelic_role)
|
13
|
+
on roles(fetch(:newrelic_role)) do
|
14
|
+
send_deployment_notification_to_newrelic
|
15
|
+
end
|
16
|
+
else
|
17
|
+
run_locally do
|
18
|
+
send_deployment_notification_to_newrelic
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
14
22
|
|
15
|
-
|
23
|
+
def send_deployment_notification_to_newrelic
|
24
|
+
environment = fetch(:newrelic_rails_env, fetch(:rack_env, fetch(:rails_env, fetch(:stage, "production"))))
|
16
25
|
|
17
|
-
|
18
|
-
# allow overrides to be defined for revision, description, changelog, appname, and user
|
19
|
-
rev = fetch(:newrelic_revision)
|
20
|
-
description = fetch(:newrelic_desc)
|
21
|
-
changelog = fetch(:newrelic_changelog)
|
22
|
-
appname = fetch(:newrelic_appname)
|
23
|
-
user = fetch(:newrelic_user)
|
24
|
-
license_key = fetch(:newrelic_license_key)
|
26
|
+
require 'new_relic/cli/command.rb'
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
begin
|
29
|
+
# allow overrides to be defined for revision, description, changelog, appname, and user
|
30
|
+
rev = fetch(:newrelic_revision)
|
31
|
+
description = fetch(:newrelic_desc)
|
32
|
+
changelog = fetch(:newrelic_changelog)
|
33
|
+
appname = fetch(:newrelic_appname)
|
34
|
+
user = fetch(:newrelic_user)
|
35
|
+
license_key = fetch(:newrelic_license_key)
|
30
36
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
:changelog => changelog,
|
36
|
-
:description => description,
|
37
|
-
:appname => appname,
|
38
|
-
:user => user,
|
39
|
-
:license_key => license_key
|
40
|
-
}
|
37
|
+
unless scm == :none
|
38
|
+
changelog ||= lookup_changelog
|
39
|
+
rev ||= fetch(:current_revision)
|
40
|
+
end
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
new_revision = rev
|
43
|
+
deploy_options = {
|
44
|
+
:environment => environment,
|
45
|
+
:revision => new_revision,
|
46
|
+
:changelog => changelog,
|
47
|
+
:description => description,
|
48
|
+
:appname => appname,
|
49
|
+
:user => user,
|
50
|
+
:license_key => license_key
|
51
|
+
}
|
46
52
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
53
|
+
debug "Uploading deployment to New Relic"
|
54
|
+
deployment = NewRelic::Cli::Deployments.new deploy_options
|
55
|
+
deployment.run
|
56
|
+
info "Uploaded deployment information to New Relic"
|
57
|
+
|
58
|
+
rescue NewRelic::Cli::Command::CommandFailure => e
|
59
|
+
info e.message
|
60
|
+
rescue => e
|
61
|
+
info "Error creating New Relic deployment (#{e})\n#{e.backtrace.join("\n")}"
|
52
62
|
end
|
53
63
|
end
|
54
64
|
|
data/lib/new_relic/version.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
-
<p>This document lists
|
1
|
+
<p>This document lists compatible operating systems, security requirements, and supported frameworks for the New Relic Ruby Agent.</p>
|
2
2
|
|
3
3
|
<h2 id="qiklinks">Contents</h2>
|
4
|
+
|
5
|
+
<h2 id="os">Operating systems</h2>
|
6
|
+
<p>The Ruby Agent is supported on UNIX-like operating systems such as Linux, Solaris, and Mac OS X.</p>
|
7
|
+
|
8
|
+
<h2 id="security">Security requirements</h2>
|
9
|
+
<p>As a standard <a href="/docs/accounts-partnerships/accounts/security/data-security">security measure for data collection</a>, your app server must support SHA-2 (256-bit). SHA-1 is not supported.</p>
|
data/lib/tasks/versions.rake
CHANGED
@@ -53,7 +53,7 @@ namespace :newrelic do
|
|
53
53
|
write_versions("Ruby versions", :ruby, erb)
|
54
54
|
write_versions("Web servers", :app_server, erb)
|
55
55
|
write_versions("Web frameworks", :web, erb)
|
56
|
-
write_versions("
|
56
|
+
write_versions("Databases", :database, erb)
|
57
57
|
write_versions("Background jobs", :background, erb)
|
58
58
|
write_versions("HTTP clients", :http, erb)
|
59
59
|
write_versions("Other", :other, erb)
|
data/newrelic_rpm.gemspec
CHANGED
@@ -52,6 +52,7 @@ EOS
|
|
52
52
|
# Only let Guard run on newer Rubies
|
53
53
|
if RUBY_VERSION >= "1.9.3"
|
54
54
|
s.add_development_dependency 'guard'
|
55
|
+
s.add_development_dependency 'listen', '< 3.1' if RUBY_VERSION < "2.2.3"
|
55
56
|
s.add_development_dependency 'guard-minitest'
|
56
57
|
s.add_development_dependency 'rb-fsevent'
|
57
58
|
end
|
@@ -5,6 +5,10 @@
|
|
5
5
|
None of these tests should contain customer data such as SQL strings.
|
6
6
|
Please be careful when adding new tests from real world failures.
|
7
7
|
|
8
|
+
### Access
|
9
|
+
|
10
|
+
Push access to this repository is granted via membership in the cross-agent-team GHE group. Contact Belinda Runkle if you are on the agent team but don't have push access.
|
11
|
+
|
8
12
|
### Tests
|
9
13
|
|
10
14
|
| Test Files | Description |
|
@@ -12,45 +16,19 @@ Please be careful when adding new tests from real world failures.
|
|
12
16
|
| [rum_loader_insertion_location](rum_loader_insertion_location) | Describe where the RUM loader (formerly known as header) should be inserted. |
|
13
17
|
| [rum_footer_insertion_location](rum_footer_insertion_location) | Describe where the RUM footer (aka "client config") should be inserted. These tests do not apply to agents which insert the footer directly after the loader. |
|
14
18
|
| [rules.json](rules.json) | Describe how url/metric/txn-name rules should be applied. |
|
15
|
-
| [rum_client_config.json](rum_client_config.json) | These tests dictate the format and contents of the browser monitoring client configuration. For more information see: [SPEC](https://newrelic.atlassian.net/wiki/display/eng/
|
19
|
+
| [rum_client_config.json](rum_client_config.json) | These tests dictate the format and contents of the browser monitoring client configuration. For more information see: [SPEC](https://newrelic.atlassian.net/wiki/display/eng/BAM+Agent+Auto-Instrumentation) |
|
16
20
|
| [sql_parsing.json](sql_parsing.json) | These tests show how an SQL string should be parsed for the operation and table name. |
|
17
21
|
| [url_clean.json](url_clean.json) | These tests show how URLs should be cleaned before putting them into a trace segment's parameter hash (under the key 'uri'). |
|
18
22
|
| [url_domain_extraction.json](url_domain_extraction.json) | These tests show how the domain of a URL should be extracted (for the purpose of creating external metrics). |
|
19
23
|
| [postgres_explain_obfuscation](postgres_explain_obfuscation) | These tests show how plain-text explain plan output from PostgreSQL should be obfuscated when SQL obfuscation is enabled. |
|
20
24
|
| [sql_obfuscation](sql_obfuscation) | Describe how agents should obfuscate SQL queries before transmission to the collector. |
|
21
|
-
| [attribute_configuration](attribute_configuration.json) | These tests show how agents should respond to the various attribute configuration settings. For more information see: [Attributes SPEC](https://
|
22
|
-
| [
|
25
|
+
| [attribute_configuration](attribute_configuration.json) | These tests show how agents should respond to the various attribute configuration settings. For more information see: [Attributes SPEC](https://source.datanerd.us/agents/agent-specs/blob/master/Agent-Attributes-PORTED.md) |
|
26
|
+
| [cat](cat) | These tests cover the new Dirac attributes that are added for the CAT Map project. See the [CAT Spec](https://source.datanerd.us/agents/agent-specs/blob/master/Cross-Application-Tracing-PORTED.md) and the [README](cat/README.md) for details.|
|
23
27
|
| [labels](labels.json) | These tests cover the Labels for Language Agents project. See the [Labels for Language Agents Spec](https://newrelic.atlassian.net/wiki/display/eng/Labels+for+Language+Agents) for details.|
|
24
28
|
| [proc_cpuinfo](proc_cpuinfo) | These test correct processing of `/proc/cpuinfo` output on Linux hosts. |
|
25
29
|
| [proc_meminfo](proc_meminfo) | These test correct processing of `/proc/meminfo` output on Linux hosts. |
|
26
30
|
| [transaction_segment_terms.json](transaction_segment_terms.json) | These tests cover agent implementations of the `transaction_segment_terms` transaction renaming rules introduced in collector protocol 14. See [the spec](https://newrelic.atlassian.net/wiki/display/eng/Language+agent+transaction+segment+terms+rules) for details. |
|
31
|
+
| [synthetics](synthetics) | These tests cover agent support for Synthetics. For details, see [Agent Support for Synthetics: Forced Transaction Traces and Analytic Events](https://source.datanerd.us/agents/agent-specs/blob/master/Synthetics-PORTED.md). |
|
27
32
|
| [docker_container_id](docker_container_id) | These tests cover parsing of Docker container IDs from `/proc/*/cgroup` on Linux hosts. |
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
The CAT map test cases in `cat_map.json` are meant to be used to verify the
|
32
|
-
attributes that agents collect and attach to analytics transaction events for
|
33
|
-
the CAT map project.
|
34
|
-
|
35
|
-
**NOTE** currently `nr.apdexPerfZone` is not covered by these tests, make sure you test for this yourself until it is added to these tests.
|
36
|
-
|
37
|
-
Each test case should correspond to a simulated transaction in the agent under
|
38
|
-
test. Here's what the various fields in each test case mean:
|
39
|
-
|
40
|
-
| Name | Meaning |
|
41
|
-
| ---- | ------- |
|
42
|
-
| `name` | A human-meaningful name for the test case. |
|
43
|
-
| `appName` | The name of the New Relic application for the simulated transaction. |
|
44
|
-
| `transactionName` | The final name of the simulated transaction. |
|
45
|
-
| `transactionGuid` | The GUID of the simulated transaction. |
|
46
|
-
| `inboundPayload` | The (non-serialized) contents of the `X-NewRelic-Transaction` HTTP request header on the simulated transaction. Note that this value should be serialized to JSON, obfuscated using the CAT obfuscation algorithm, and Base64-encoded before being used in the header value. Note also that the `X-NewRelic-ID` header should be set on the simulated transaction, though its value is not specified in these tests. |
|
47
|
-
| `expectedIntrinsicFields` | A set of key-value pairs that are expected to be present in the analytics event generated for the simulated transaction. These fields should be present in the first hash of the analytic event payload (built-in agent-supplied fields). |
|
48
|
-
| `nonExpectedIntrinsicFields` | An array of attribute names that should *not* be present in the analytics event generated for the simulated transaction. |
|
49
|
-
| `outboundRequests` | An array of objects representing outbound requests that should be made in the context of the simulated transaction. See the table below for details. Only present if the test case involves making outgoing requests from the simulated transaction. |
|
50
|
-
|
51
|
-
Here's what the fields of each entry in the `outboundRequests` array mean:
|
52
|
-
|
53
|
-
| Name | Meaning |
|
54
|
-
| ---- | ------- |
|
55
|
-
| `outboundTxnName` | The name of the simulated transaction at the time this outbound request is made. Your test driver should set the transaction name to this value prior to simulating the outbound request. |
|
56
|
-
| `expectedOutboundPayload` | The expected (un-obfuscated) content of the outbound `X-NewRelic-Transaction` request header for this request. |
|
33
|
+
| [aws](aws.json) | These tests cover the collection and validation of AWS metadata for the [utilization draft spec](https://source.datanerd.us/agents/agent-specs/blob/master/Utilization.md). |
|
34
|
+
| [data_transport](data_transport/data_transport.json) | These test correct JSON payload generation and handling collector responses. See [readme](https://source.datanerd.us/agents/cross_agent_tests/blob/master/data_transport/data_transport.md) for details. |
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"timeout":false
|
8
8
|
},
|
9
9
|
"http://169.254.169.254/2008-02-01/meta-data/instance-id":{
|
10
|
-
"response":"test.
|
10
|
+
"response":"i-test.19characters",
|
11
11
|
"timeout":false
|
12
12
|
},
|
13
13
|
"http://169.254.169.254/2008-02-01/meta-data/placement/availability-zone":{
|
@@ -17,7 +17,7 @@
|
|
17
17
|
},
|
18
18
|
"expected_vendors_hash": {
|
19
19
|
"aws": {
|
20
|
-
"id": "test.
|
20
|
+
"id": "i-test.19characters",
|
21
21
|
"type": "test.type",
|
22
22
|
"zone": "us-west-2b"
|
23
23
|
}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
{
|
3
3
|
"testname":"all fields present",
|
4
4
|
|
5
|
-
"
|
6
|
-
"
|
5
|
+
"apptime_milliseconds":5,
|
6
|
+
"queuetime_milliseconds":3,
|
7
7
|
"browser_monitoring.attributes.enabled":true,
|
8
8
|
"transaction_name":"WebTransaction/brink/of/glory",
|
9
9
|
"license_key":"0000111122223333444455556666777788889999",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
{
|
33
33
|
"testname":"browser_monitoring.attributes.enabled disabled",
|
34
34
|
|
35
|
-
"
|
36
|
-
"
|
35
|
+
"apptime_milliseconds":5,
|
36
|
+
"queuetime_milliseconds":3,
|
37
37
|
"browser_monitoring.attributes.enabled":false,
|
38
38
|
"transaction_name":"WebTransaction/brink/of/glory",
|
39
39
|
"license_key":"0000111122223333444455556666777788889999",
|
@@ -58,5 +58,34 @@
|
|
58
58
|
"errorBeacon":"my_error_beacon",
|
59
59
|
"agent":"my_js_agent_file"
|
60
60
|
}
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"testname":"empty js_agent_file",
|
64
|
+
"apptime_milliseconds":5,
|
65
|
+
"queuetime_milliseconds":3,
|
66
|
+
"browser_monitoring.attributes.enabled":true,
|
67
|
+
"transaction_name":"WebTransaction/brink/of/glory",
|
68
|
+
"license_key":"0000111122223333444455556666777788889999",
|
69
|
+
"connect_reply":
|
70
|
+
{
|
71
|
+
"beacon":"my_beacon",
|
72
|
+
"browser_key":"my_browser_key",
|
73
|
+
"application_id":"my_application_id",
|
74
|
+
"error_beacon":"my_error_beacon",
|
75
|
+
"js_agent_file":""
|
76
|
+
},
|
77
|
+
"user_attributes":{"alpha":"beta"},
|
78
|
+
"expected":
|
79
|
+
{
|
80
|
+
"beacon":"my_beacon",
|
81
|
+
"licenseKey":"my_browser_key",
|
82
|
+
"applicationID":"my_application_id",
|
83
|
+
"transactionName":"Z1VSZENQX0JTUUZbXF4fUkJYX1oeXVQdVV9fQkk=",
|
84
|
+
"queueTime":3,
|
85
|
+
"applicationTime":5,
|
86
|
+
"atts":"SxJFEgtKE1BeQlpTEQoSUlVFUBNMTw==",
|
87
|
+
"errorBeacon":"my_error_beacon",
|
88
|
+
"agent":""
|
89
|
+
}
|
61
90
|
}
|
62
91
|
]
|