//-----------------------------------------------------------------------------
//
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// A copy of the License is located at
//
// http://aws.amazon.com/apache2.0
//
// or in the "license" file accompanying this file. This file is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//-----------------------------------------------------------------------------
namespace Amazon.XRay.Recorder.AutoInstrumentation
{
///
/// This is a class for storing Auto-Instrumentation related configurations from IConfiguration instance.
/// For other X-Ray .Net SDK configurations, take reference to https://github.com/aws/aws-xray-sdk-dotnet/tree/master#configuration
///
public class XRayAutoInstrumentationOptions
{
///
/// Service name of instrumented Asp.Net or Asp.Net Core application
///
public string ServiceName { get; } = "DefaultService";
///
/// Daemon address
///
public string DaemonAddress { get; } = "127.0.0.1:2000";
///
/// Enable tracing Http request
///
public bool TraceHttpRequests { get; } = true;
///
/// Enable tracing AWS request
///
public bool TraceAWSRequests { get; } = true;
///
/// Enable tracing Sql request
///
public bool TraceSqlRequests { get; } = true;
///
/// Enable tracing Entity Framework request
///
public bool TraceEFRequests { get; } = true;
///
/// Default constructor
///
public XRayAutoInstrumentationOptions()
{
}
public XRayAutoInstrumentationOptions(string serviceName, string daemonAddress, bool traceHttpRequests, bool traceAWSRequests, bool traceSqlRequests, bool traceEFRequests)
{
ServiceName = serviceName;
DaemonAddress = daemonAddress;
TraceHttpRequests = traceHttpRequests;
TraceAWSRequests = traceAWSRequests;
TraceSqlRequests = traceSqlRequests;
TraceEFRequests = traceEFRequests;
}
}
}