public void SetUp()
        {
            _compositeTestAgent = new CompositeTestAgent();
            _compositeTestAgent.LocalConfiguration.distributedTracing.enabled     = false;
            _compositeTestAgent.LocalConfiguration.crossApplicationTracingEnabled = true;
            _compositeTestAgent.ServerConfiguration.AccountId            = _accountId.ToString();
            _compositeTestAgent.ServerConfiguration.TrustedAccountKey    = _trustKey;
            _compositeTestAgent.ServerConfiguration.PrimaryApplicationId = _appId.ToString();
            _catMetricCounters = _compositeTestAgent.Container.Resolve <ICATSupportabilityMetricCounters>();

            var crossProcessID = $"{_accountId}#{_appId}";

            _crossProcessIDEncoded = Strings.Base64Encode(crossProcessID, _agent.Configuration.EncodingKey);

            var reqData = new CrossApplicationRequestData("referrerTransactionGuid", false, "referrerTripId", "referrerPathHash");

            _reqDataEncoded = HeaderEncoder.SerializeAndEncode(reqData, _agent.Configuration.EncodingKey);

            _compositeTestAgent.ServerConfiguration.TrustedIds = new long[] { _accountId };

            _compositeTestAgent.PushConfiguration();
        }
예제 #2
0
 private string GetXNewRelicRequestData(CrossApplicationRequestData requestData)
 {
     return(HeaderEncoder.SerializeAndEncode(requestData, HeaderEncoder.IntegrationTestEncodingKey));
 }