<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 New Relic, Inc. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- The documentation in here must be kept up to date with that embedded in comments in newrelic.config -->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:tns="urn:newrelic-config" targetNamespace="urn:newrelic-config" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nr="Configuration.xsd">

    <xs:complexType name="ErrorClassCollection">
        <xs:annotation>
            <xs:documentation>
                A list of fully qualified error class names to be marked as ignored/expected.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="errorClass" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Fully qualified class name of an exception, such as "System.IO.FileNotFoundException".
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ErrorMessagesCollection">
        <xs:annotation>
            <xs:documentation>
                An optional map of fully qualified error class name to list of strings matching a substring of the message of an error to be ignored/expected.
            </xs:documentation>
        </xs:annotation>

        <xs:sequence>
            <xs:element name="errorClass" minOccurs="0" maxOccurs="unbounded" >
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="message" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
                    </xs:sequence>
                    <xs:attribute name="name" type="xs:string">
                        <xs:annotation>
                            <xs:documentation>
                                Fully qualified class name of an exception, such as "System.IO.FileNotFoundException".
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="RemoteParentSampledBehaviorType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="default">
                <xs:annotation>
                    <xs:documentation>
                        Default behavior. The agent will use New Relic adaptive sampling logic.
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="adaptive">
                <xs:annotation>
                    <xs:documentation>
                        (Same as default) The agent will use New Relic adaptive sampling logic.
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="alwaysOn">
                <xs:annotation>
                    <xs:documentation>
                        The agent will sample spans.
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="alwaysOff">
                <xs:annotation>
                    <xs:documentation>
                        The agent will NOT sample spans.
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="traceIdRatioBased">
                <xs:annotation>
                    <xs:documentation>
                        The agent will use trace ID ratio based sampling.
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="AdaptiveSamplerType">
        <xs:annotation>
            <xs:documentation>
                The default sampler for the agent which uses an adaptive sampling strategy.
            </xs:documentation>
        </xs:annotation>
    </xs:complexType>

    <xs:complexType name="TraceIdRatioBasedSamplerType">
        <xs:annotation>
            <xs:documentation>
                Based on the OpenTelemetry TraceIdRatioBased sampler.
                It samples a percentage of traces defined by the ratio attribute, which must be a decimal value between 0.0 (no sampling) and 1.0 (sample all).
                For more information, see the OpenTelemetry specification: https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="ratio" type="xs:decimal" use="required">
            <xs:annotation>
                <xs:documentation>
                    The percentage of traces to sample, between 0.0 and 1.0.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:complexType name="AlwaysOnSamplerType">
        <xs:annotation>
            <xs:documentation>
                Samples all traces. Intended primarily for use with remoteParentSampled and remoteParentNotSampled
            </xs:documentation>
        </xs:annotation>
    </xs:complexType>

    <xs:complexType name="AlwaysOffSamplerType">
        <xs:annotation>
            <xs:documentation>
                Doesn't sample any traces. Intended primarily for use with remoteParentSampled and remoteParentNotSampled
            </xs:documentation>
        </xs:annotation>
    </xs:complexType>

    <xs:element name="configuration">
        <xs:complexType>
            <xs:all>
                <xs:element name="service" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                This section configures the agent to connect to the New Relic service.
                            </xs:documentation>
                        </xs:annotation>
                        <xs:sequence>
                            <xs:element name="obscuringKey" type="xs:string" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        The key used to deobfuscate the encrypted configuration values (optional).
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>

                            <xs:element name="proxy" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Proxy settings for connecting to the New Relic service.
                                        If a proxy is used, then the host attribute is required.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>

                                    <xs:attribute name="host" type="xs:string" use="required">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The proxy server host name.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="uriPath" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The proxy server URI Path (optional).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="port" type="xs:int" default="8080">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The proxy server port (optional - defaults to 8080).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="user" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The username used to authenticate with the proxy server (optional).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="password" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The password used to authenticate with the proxy server (optional).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="passwordObfuscated" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The obfuscated password with which to authenticate to the proxy server (optional).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="domain" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The domain used to authenticate with the proxy server (optional).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>

                        <xs:attribute name="sendEnvironmentInfo" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Send execution environment information back to the RPM.
                                    This includes information about the O/S; which version of the agent is used; information about all of the assemblies available at the time the environment information is captured.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="licenseKey" type="xs:string" use="required">
                            <xs:annotation>
                                <xs:documentation>
                                    You must specify the license key associated with your New Relic account.
                                    This key binds your agent's data to your account in the New Relic service.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="host" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The name of the collector host within newrelic.com where the agent is to send its data.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="port" type="xs:int" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The port number on the collector host to talk to.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="syncStartup" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If true, the agent startup will block until a connection to the New Relic service is made.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="autoStart" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    If false, the agent will not automatically start sending data to New Relic. You can use the Agent API to manually start the agent.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="sendDataOnExit" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If true, the agent will block process shutdown until it has gone through a harvest cycle and sent its data to the New Relic service.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="sendDataOnExitThreshold" type="xs:float" default="60000">
                            <xs:annotation>
                                <xs:documentation>
                                    The amount of time (in milliseconds) an agent must run before sending data on process shutdown.
                                    The default is 60 seconds.	This only applies when sendDataOnExit is set to true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="requestTimeout" type="xs:int">
                            <xs:annotation>
                                <xs:documentation>
                                    The request timeout (in milliseconds) when communicating with the New Relic service.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="completeTransactionsOnThread" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If true, the Agent will complete transaction processing on the request thread. If false, a pool thread will be used. The default is false.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="forceNewTransactionOnNewThread" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If true, the Agent will always create new transactions for instrumented methods encountered on new threads. If false, the agent will attempt to include these instrumented methods methods in an existing transaction. The default is false.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="disableFileSystemWatcher" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If disableFileSystemWatcher is set to true, then newrelic.config and instrumentation XML file changes, additions, or deletions will not be detected and applied after the application has been started.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="diagnostics" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                This section configures the agent to collect diagnostic information.
                            </xs:documentation>
                        </xs:annotation>

                        <xs:attribute name="captureAgentTiming" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns on capturing timing for certain agent components.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="captureAgentTimingFrequency" type="xs:int" default="1">
                            <xs:annotation>
                                <xs:documentation>
                                    Determines how frequently the agent will capture timing information.  Number of events between samplings.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="application" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                This element gives information about the application(s) being profiled.
                            </xs:documentation>
                        </xs:annotation>

                        <xs:sequence minOccurs="0" maxOccurs="3">
                            <xs:element name="name" type="xs:string">
                                <xs:annotation>
                                    <xs:documentation>
                                        If IIS is hosting multiple applications and you wish to have them report into New Relic as separate applications, create an application setting in the Web.Config of each application named NewRelic.AppName

                                        Set this to be the name of your application as you'd like it to show up in New Relic. New Relic will then auto-map instances of your application into an "application" on your home dashboard page.

                                        If youw ant to map this instance onto multiple applications, like "AJAX Requests" and "All UI", then specify up to three distinct names.
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:sequence>

                        <xs:attribute name="disableSamplers" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    Samplers collect information about memory and CPU consumption.
                                    Set this to true to disable sampling.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="securityPoliciesToken" minOccurs="0" maxOccurs="1" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            Optional security policies token.
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>

                <xs:element name="log" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                The agent generates its own log file to keep its logging information separate from that of your application.
                            </xs:documentation>
                        </xs:annotation>

                        <!--It is tempting to make level be a restriction enumeration, but that induces case sensitivity which may break
						the newrelic.xml files out in the field that might use DEBUG or Debug as the value of the level string.-->
                        <xs:attribute name="level" type="xs:string" default="info">
                            <xs:annotation>
                                <xs:documentation>
                                    Specify the agent's log level here.
                                    It may be one of (in any case): off, error, warn, info, debug, finest, all.
                                    To enable audit logging, set the auditLog attribute to true; don't set the log level to "audit".
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    If this is false, no attempts will be made to write to a log file. This is primarily used for installations on read-only file systems.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="directory" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The directory to hold log files generated by the agent.
                                    If this is omitted, then a directory named 'logs' in the New Relic Agent installation area will be used by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="fileName" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The name of the log file to write.
                                    If this is omitted, then the name is derived from the name of the monitored process.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="console" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If this is true, then log messages are also appended to the console, in addition to going to the log file.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="auditLog" type="xs:boolean" default="false" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    If this is true, then any data that is sent to New Relic will be recorded in a separate log file, in addition to going to the normal log file. The audit log file will be named the same as the normal log file except that it will have "_audit" appended to the file name (for example, "MyApp_audit.log").
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="logRollingStrategy" default="size" use="optional" >
                            <xs:annotation>
                                <xs:documentation>
                                    The strategy to use for rolling over the Agent log file. Default is size.
                                </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:string">
                                    <xs:enumeration value="size">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The Agent log file will be rolled over when it reaches the size specified in maxLogFileSizeMB.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:enumeration>
                                    <xs:enumeration value="day">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The Agent log file will be rolled over once each day.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:enumeration>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>

                        <xs:attribute name="maxLogFileSizeMB" type="xs:int" default="50" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum size of the Agent log file in megabytes before it is rolled over. Default is 50MB. If this is set to 0, no size limit will be enforced. Only used if logRollingStrategy is set to "size".
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="maxLogFiles" type="xs:int" default="4" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of Agent log files to keep. Defaults to 4. If this is set to 0, then all log files will be kept.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="instrumentation" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            By default, the .NET agent instruments IIS asp worker processes and Azure web and worker roles.
                            To instrument other processes, do step (1) and either (2a) or (2b).

                            (1) Create a system environment variable named COR_ENABLE_PROFILING with a value of 1.
                            (2) Either (2a) or (2b)
                            (2a): Add an application setting to your application's configuration that enables the agent. For example, if the application name is MyServer.exe, edit MyServer.exe.config and add a new appSetting with a key named "NewRelic.AgentEnabled" and a value of "true":
                            OR
                            (2b) Add an instrumentation element, with an applications element, containing one or more application name, each set to the name of your custom server application. Multiple application elements can be specified.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>

                            <xs:element name="rules" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:annotation>
                                        <xs:documentation>
                                            A list of rules that can affect the behavior of instrumentation.
                                        </xs:documentation>
                                    </xs:annotation>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">

                                        <xs:element name="ignore" minOccurs="0" maxOccurs="unbounded">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disables instrumentation for a given assembly or class.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:attribute name="assemblyName" type="xs:string" use="required">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            The assembly name to not instrument.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                                <xs:attribute name="className" type="xs:string" use="optional">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            The class name to not instrument. If blank, no classes in the given assembly will be instrumented.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>

                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="applications" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        A list of application names to instrument, or exclude from instrumentation.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="application" minOccurs="0" maxOccurs="unbounded">
                                            <xs:complexType>
                                                <xs:attribute name="name" type="xs:string" use="required">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            The name of a .NET application; remove everything up to and including the last folder separator.
                                                            For example, "MyCustomServer.exe".
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                                <xs:attribute name="include" type="xs:boolean" default="true" use="optional">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            Enables or disables instrumentation of this application. Default is true (enabled).
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>

                        <xs:attribute name="log" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    If log is set to true, then each method that is instrumented will be logged in the application event log. This is helpful when debugging custom instrumentation.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="allowAllHeaders" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                Allow all request headers to be captured as attributes.
                            </xs:documentation>
                        </xs:annotation>
                        <xs:attribute name="enabled" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns on capturing. Enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The attributes element tells the transaction tracer, error collector, browser monitoring and transaction events whether or not to capture any attributes.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                            <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                <xs:element name="include" type="xs:string">
                                    <xs:annotation>
                                        <xs:documentation>
                                            The name of a specific custom attribute to include.
                                        </xs:documentation>
                                    </xs:annotation>
                                </xs:element>
                            </xs:sequence>
                            <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                <xs:element name="exclude" type="xs:string">
                                    <xs:annotation>
                                        <xs:documentation>
                                            The name of a specific custom attribute to exclude.
                                        </xs:documentation>
                                    </xs:annotation>
                                </xs:element>
                            </xs:sequence>
                        </xs:sequence>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns on attribute capturing.	Enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <!-- DISABLED: A parameter group is a container for a set of data values captured by the agent. -->
                <xs:element name="parameterGroups" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="identityParameters" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Disabled: The identityParameters element tells the transaction tracer and the error collector whether or not to capture data from the Principal associated with the application.
                                        See http://msdn.microsoft.com/en-us/library/axt6w9h8.aspx for information on the concept of Principal Microsoft Windows.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="ignore" type="xs:string">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disabled: The name of a specific identity parameter to not capture.
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>

                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Disabled: Turns on identity parameter capturing for the Transaction Tracer and Error Collector features. Default is true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="responseHeaderParameters" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Disabled: The responseHeaderParameters element tells the transaction tracer and the error collector whether or not to capture data from the HTTP response.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="ignore" type="xs:string">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disabled: The name of a specific response header parameter to not capture.
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>

                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Disabled: Turns on response header parameter capturing for the Transaction Tracer and Error Collector features. Default is true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="customParameters" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Disabled: The customParameters element tells the transaction tracer and the error collector whether or not to capture custom parameters set using the .NET Agent Api.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="ignore" type="xs:string">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disabled: The name of a specific custom parameter to not capture.
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Disabled: Turns on custom parameter capturing for the Transaction Tracer and Error Collector features. Default is true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="requestHeaderParameters" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Disabled: The requestHeaderParameters element tells the transaction tracer and the error collector whether or not to capture request headers set.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="ignore" type="xs:string">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disabled: The name of a specific request header to not capture.
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Disabled: Turns on request header capturing for the Transaction Tracer and Error Collector features. Default is true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                        </xs:all>
                    </xs:complexType>
                </xs:element>

                <xs:element name="requestParameters" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Disabled: The requestParameters element tells the transaction tracer and the error collector whether or not to capture HTTP parameters.
                            To ignore specific parameters so that they are never captured, specify ignore elements.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                            <xs:element name="ignore" type="xs:string">
                                <xs:annotation>
                                    <xs:documentation>
                                        Disabled: The name of a specific request parameter to not capture.
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:sequence>

                        <xs:attribute name="enabled" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Turns on request parameter capturing for the Transaction Tracer and Error Collector features.	Default is false.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="customParameters" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The customParameters element enables user attribute capturing.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns on/off custom parameter (user attribute) capturing.	Default is true, but disabled in High Security Mode.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="analyticsEvents" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Disabled: Collects semi-detailed information about various events that occur in an application.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>
                            <xs:element name="transactions" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Disabled: Turns event recording of transaction events on or off. Defaults to true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                        <xs:attribute name="enabled" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Turns the event recorder on or off. Defaults to true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesPerMinute" type="xs:unsignedInt" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: The maximum number of samples to send per minute.	It is possible that fewer events will be sent, but never more.	Default is 10000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesStored" type="xs:int" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: The maximum number of samples to store in memory at a time.	Default is 10000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="captureAttributes" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Include custom parameters in transaction analytics events.	Defaults to true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="customEvents" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Collects information about custom events that occur in an application.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to include in the custom events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to exclude in the custom events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns on custom attribute capturing for Custom Events
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns the custom event recorder on or off. Default is true.
                                    Note: The agent will store up to 10,000 custom events in memory at a time.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesStored" type="xs:int" default="30000">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of samples to store in memory at a time.	Default is 10000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="transactionEvents" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Collects semi-detailed information about various events that occur in an application.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>
                            <xs:element name="transactions" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns event recording of transaction events on or off.	Default is true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to include in the transaction events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to exclude in the transaction events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns on custom attribute capturing for Transaction Events
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Turns the event recorder on or off.	Default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesPerMinute" type="xs:unsignedInt" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: The maximum number of samples to send per minute.	It is possible that fewer events will be sent, but never more.	Default is 10000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesStored" type="xs:int" default="10000">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of samples to store in memory at a time.	Default is 10000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="dataTransmission" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            These settings control how data is sent to New Relic.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>

                        <xs:attribute name="putForDataSend" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    POST is the default for data transmission. This setting, when true, enforces PUT for data transmission.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="compressedContentEncoding" default="deflate">
                            <xs:annotation>
                                <xs:documentation>
                                    Controls the encoding for compressed content. deflate is the default.
                                </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:string">
                                    <xs:enumeration value="deflate"/>
                                    <xs:enumeration value="gzip"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="transactionTracer" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The transaction tracer captures deep information about slow transactions and sends this to the New Relic service once a minute. Included in the transaction is the exact call sequence of the transactions including any SQL statements issued.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>

                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to include in the transaction traces.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to exclude in the transaction traces.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns on custom attribute capturing for Transaction Traces
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                        </xs:sequence>

                        <xs:attribute name="transactionThreshold" type="xs:string" default="apdex_f">
                            <xs:annotation>
                                <xs:documentation>
                                    The threshold (in milliseconds) for when to collect a transaction trace.
                                    When the response time of a controller action exceeds this threshold, a transaction trace will be recorded and sent to New Relic.
                                    Valid values are any float value, or (default) "apdex_f", which will use the threshold for an dissatisfying Apdex controller action - four times the Apdex T value.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="recordSql" default="obfuscated">
                            <xs:annotation>
                                <xs:documentation>
                                    This describes how to record the SQL captured for the slow SQL monitor.
                                </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:string">
                                    <xs:enumeration value="obfuscated"/>
                                    <xs:enumeration value="raw"/>
                                    <xs:enumeration value="off"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>

                        <xs:attribute name="stackTraceThreshold" type="xs:int" default="500">
                            <xs:annotation>
                                <xs:documentation>
                                    Deprecated: The transactionTracer.stackTraceThreshold setting has been deprecated and no longer has any effect.  This setting will be removed in a future major release.
                                    The threshold (in milliseconds) for when to collect a stack trace for a SQL call.
                                    In other words, when SQL statements exceed this threshold, then capture and send to New Relic the current stack trace. This is helpful for pinpointing where long SQL calls originate from.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="explainEnabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    This determines whether the agent will capture query plans for slow SQL queries.
                                    Only supported in SQL Server, MySql, and postgres.
                                    Should be set to false when using other adapters.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="explainThreshold" type="xs:float" default="500">
                            <xs:annotation>
                                <xs:documentation>
                                    The threshold for query execution time (in milliseconds) below which query plans will not be captured.
                                    Relevant only when 'explainEnabled' is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Deprecated: The transaction tracer is available only in the Professional product version.
                                    It is enabled by default.
                                    Set this to false to turn it off.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <!--
							These clamping upper bounds (maxSegments, maxStackTrace, maxExplainPlans) are exposed to the customer.
							This exposure is not really a problem, as customers can change those values if they please.
							We make them configurable so that in the rare case someone needs to change them they can.
							We don't expose all of the values in the XML because we don't want to overwhelm users with options.
							If someone wants to dig through our schema and set uncommonly used settings they'd welcome to do that.
							Most of the switches you mentioned are only harmful to the customer's application.
							Increasing the stack trace size, for example, will bloat memory.
							If they send Transaction Traces to our service that are too large because of it we'll simply reject them.
						-->

                        <xs:attribute name="maxSegments" type="xs:int" default="3000">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of segments to collect in a transaction trace.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="maxStackTrace" type="xs:int" default="0">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of stack traces to collect during a harvest cycle.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="maxExplainPlans" type="xs:int" default="20">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of explain plans to collect during a harvest cycle.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="captureAttributes" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Include user custom parameters in transaction traces.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="datastoreTracer" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                These settings control what type of database information is sent to New Relic.
                            </xs:documentation>
                        </xs:annotation>
                        <xs:sequence>

                            <xs:element name="instanceReporting" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                This setting controls whether or not the host and the port, path, or ID are reported for datastores.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="databaseNameReporting" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                This setting controls whether or not database names are reported for datastores.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="queryParameters" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="false">
                                        <xs:annotation>
                                            <xs:documentation>
                                                WARNING: Enabling this setting has the potential of collecting sensitive data or personally identifiable information within your queries.

                                                This setting controls whether or not database query parameters are reported for slow SQL queries. The transactionTracer.recordSql setting must be set to 'raw'. This setting is ignored when configurable security policies have been applied or High Security Mode is enabled.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                        </xs:sequence>
                    </xs:complexType>
                </xs:element>

                <xs:element name="crossApplicationTracer" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Turns on/off Cross application Tracing.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    It is enabled by default. Set this to false to turn it off.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="infiniteTracing" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="trace_observer" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="host" type="xs:string">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The host name of the infinite tracing observer to which the agent should send spans.
                                                This host name should not include protocol (such as http: or https:) and should not
                                                include a port
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="port" type="xs:string" default="443">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The port on the trace observer to send spans to.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="span_events" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="queue_size" type="xs:int" default="100000">
                                        <xs:annotation>
                                            <xs:documentation>
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                        <xs:attribute name="compression" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Set this to false to disable compression of data being transmitted to the trace observer. Compression is enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="distributedTracing" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Distributed tracing lets you see the path that a request takes through your distributed system. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the transition guide before you enable this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing
                            Default is false.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="sampler" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="root" minOccurs="0" maxOccurs="1">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Controls span sampling at the root of the transaction.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:choice minOccurs="1" maxOccurs="1">
                                                    <xs:element name="default" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="adaptive" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="traceIdRatioBased" type="tns:TraceIdRatioBasedSamplerType"/>
                                                    <xs:element name="alwaysOn" type="tns:AlwaysOnSamplerType"/>
                                                    <xs:element name="alwaysOff" type="tns:AlwaysOffSamplerType"/>
                                                </xs:choice>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="remoteParentSampled" minOccurs="0" maxOccurs="1">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Controls span sampling behavior when the trace parent was sampled.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:choice minOccurs="1" maxOccurs="1">
                                                    <xs:element name="default" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="adaptive" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="traceIdRatioBased" type="tns:TraceIdRatioBasedSamplerType"/>
                                                    <xs:element name="alwaysOn" type="tns:AlwaysOnSamplerType"/>
                                                    <xs:element name="alwaysOff" type="tns:AlwaysOffSamplerType"/>
                                                </xs:choice>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="remoteParentNotSampled" minOccurs="0" maxOccurs="1">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Controls span sampling behavior when the trace parent was not sampled.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:choice minOccurs="1" maxOccurs="1">
                                                    <xs:element name="default" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="adaptive" type="tns:AdaptiveSamplerType"/>
                                                    <xs:element name="traceIdRatioBased" type="tns:TraceIdRatioBasedSamplerType"/>
                                                    <xs:element name="alwaysOn" type="tns:AlwaysOnSamplerType"/>
                                                    <xs:element name="alwaysOff" type="tns:AlwaysOffSamplerType"/>
                                                </xs:choice>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="remoteParentSampled" type="tns:RemoteParentSampledBehaviorType" default="default">
                                        <xs:annotation>
                                            <xs:documentation>
                                                DEPRECATED: Please use the remoteParentSampled element instead of this attribute. This attribute will be removed in a future release.
                                                Controls span sampling behavior when the trace parent was sampled.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="remoteParentNotSampled" type="tns:RemoteParentSampledBehaviorType" default="default">
                                        <xs:annotation>
                                            <xs:documentation>
                                                DEPRECATED: Please use the remoteParentNotSampled element instead of this attribute. This attribute will be removed in a future release.
                                                Controls span sampling behavior when the trace parent was not sampled.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="enabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    It is disabled by default. Set this to true to turn it on.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="excludeNewrelicHeader" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    Set this to true to exclude the newrelic header from outgoing requests.  It is included by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="enableSuccessMetrics" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Set this to false to disable the payload accept/create success supportability metrics. It is enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="account_id" type="xs:string">
                            <xs:annotation>
                                <xs:documentation>
                                    The account id to use for distributed tracing. Required in serverless mode if distributed tracing is enabled.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="trusted_account_key" type="xs:string">
                            <xs:annotation>
                                <xs:documentation>
                                    The trusted account key to use for distributed tracing. Required in serverless mode if distributed tracing is enabled.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="primary_application_id" type="xs:string" default="Unknown">
                            <xs:annotation>
                                <xs:documentation>
                                    The optional primary application id to use for distributed tracing. Used only in serverless mode.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="spanEvents" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Configuration controlling what information is collected on spans as part of a distributed trace.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>
                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of an attribute to include in span events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of an attribute to exclude in span events.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Enable or disable attribute capturing for span events. Default is true. If attributes.enabled at the root level is false, no attributes will be sent on span events regardless on how this property is set.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Enables the collection of span events. Defaults to true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="maximumSamplesStored" type="xs:int" default="2000">
                            <xs:annotation>
                                <xs:documentation>
                                    The maximum number of samples to store in memory at a time. Default is 2000.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="highSecurity" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Turns on/off High Security Mode.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    It is disabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="customInstrumentationEditor" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Turns on/off allowing live/remote instrumentation from the server.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    It is enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="stripExceptionMessages" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Enables/Disables the stripping of error messages for errors sent to APM.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    It is disabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="slowSql" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The slowSql service captures information about slow SQL executions, and captures and obfuscates explain plans for these queries.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    The slowSQL service is enabled by default.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>

                </xs:element>

                <xs:element name="errorCollector" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                The error collector captures information about uncaught exceptions and sends them to the New Relic service for viewing.
                            </xs:documentation>
                        </xs:annotation>

                        <xs:sequence>

                            <xs:element name="ignoreErrors" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:annotation>
                                        <xs:documentation>
                                            Disabled: To stop specific exceptions from reporting to New Relic, list them here.
                                            Use the full name of the exception, such as "System.IO.FileNotFoundException".
                                        </xs:documentation>
                                    </xs:annotation>

                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="exception" type="xs:string">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Disabled: The full name of an exception to ignore, such as "System.IO.FileNotFoundException".
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>

                                </xs:complexType>
                            </xs:element>

                            <xs:element name="ignoreClasses" type="tns:ErrorClassCollection" minOccurs="0" maxOccurs="1">
                            </xs:element>

                            <xs:element name="ignoreMessages" type="tns:ErrorMessagesCollection" minOccurs="0" maxOccurs="1" >
                            </xs:element>

                            <xs:element name="ignoreStatusCodes" >
                                <xs:complexType>
                                    <xs:annotation>
                                        <xs:documentation>
                                            To stop specific error codes from reporting to New Relic, list them here.
                                        </xs:documentation>
                                    </xs:annotation>

                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:element name="code" type="xs:float">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    You may use standard integral HTTP errorcodes, such as just 401, or may use Microsoft FullStatusCodes, with decimal points, such as 401.4 or 403.18
                                                </xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                    </xs:sequence>

                                </xs:complexType>
                            </xs:element>

                            <xs:element name="expectedClasses" type="tns:ErrorClassCollection" minOccurs="0" maxOccurs="1">
                            </xs:element>

                            <xs:element name="expectedMessages" type="tns:ErrorMessagesCollection" minOccurs="0" maxOccurs="1" >
                            </xs:element>

                            <xs:element name="expectedStatusCodes" minOccurs="0" maxOccurs="1" type="xs:string">
                                <xs:annotation>
                                    <xs:documentation>
                                        A comma separated list of status codes to be marked as expected. You may use standard integral HTTP errorcodes, such as just 401, or may use Microsoft FullStatusCodes, with decimal points, such as 401.4 or 403.18.
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>

                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to include in the error trace.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to exclude in the error trace.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns on custom attribute capturing for the Error Collector.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                        </xs:sequence>

                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    The error collector is enabled by default.
                                    Set this to false to turn it off.
                                    This feature is only available in the Professional product edition.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="captureAttributes" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Include user custom parameters in traced errors. Defaults to true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="captureEvents" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Enable/disable capturing error events.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="maxEventSamplesStored" type="xs:int" default="100">
                            <xs:annotation>
                                <xs:documentation>
                                    Reservoir limit for error events. Defaults to 100.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="browserMonitoring" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The New Relic Real User Monitoring (RUM) gives you insight into the performance real users are experiencing with your website. This is accomplished by measuring the time it takes for your users' browsers to download and render your web pages by injecting a small amount of JavaScript code into the header and footer of each page.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:sequence>

                            <xs:element name="requestPathsExcluded" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When Browser Monitoring is enabled for auto-instrumentation, this list of request paths will be used to exclude pages from being instrumented for browser monitoring.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="path" minOccurs="0" maxOccurs="unbounded">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Each path entry is a regular expression to be evaluated by the .NET Framework's regular expression engine. These regular expressions should be easy and quick to evaluate, otherwise they can adversely affect application performance.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:attribute name="regex" type="xs:string" use="required">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            The regular expression to be evaluated.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                            </xs:complexType>

                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="attributes" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="include" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to include in browser monitoring.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                        <xs:sequence minOccurs="0" maxOccurs="unbounded">
                                            <xs:element name="exclude" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>
                                                        The name of a specific custom attribute to exclude in browser monitoring.
                                                    </xs:documentation>
                                                </xs:annotation>
                                            </xs:element>
                                        </xs:sequence>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Turns on custom attribute capturing for Browser Monitoring
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                        </xs:sequence>

                        <xs:attribute name="autoInstrument" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    By default the agent automatically injects the JavaScript for RUM into ASP pages.
                                    Set this attribute to false to turn off this behavior.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="loader" type="xs:string" default="rum">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute defines the type of Javascript functionality to be injected.
                                    By default just RUM instrumentation is injected.
                                    Other valid values are "full" for Javascript Errors and possibly future features, and "none" which means no javascript injection.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="sslForHttp" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute specifies whether the code injected into pages will communicate with New Relic servers using SSL even when the page original request does not.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="captureAttributes" type="xs:boolean" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Disabled: Include user custom parameters in the RUM client configuration. Defaults to false.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>

                </xs:element>

                <xs:element name="applicationPools" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            By default, the .NET agent instruments all IIS worker processes (w3wp.exe). The applicationPools element allows you to only instrument worker pcoresses that are serving certain application pools via either a white list or a black list.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="defaultBehavior" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        This element defines the default behavior for application pools that are not found in the list of application pools.	This essentially controls whether the applicationPools element is a white list or a black list.

                                        Defaults to white list (instrument missing application pools) if this element is not included.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:attribute name="instrument" type="xs:boolean" use="required">
                                        <xs:annotation>
                                            <xs:documentation>
                                                True indicates that application pools not found in the applicationPools list will be instrumented (black list).	False indicates that missing pools will not be instrumented (white list).
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="applicationPool" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:attribute name="name" type="xs:string" use="required">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The name of the application pool you wish to enable/disable.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="instrument" type="xs:boolean" use="required">
                                        <xs:annotation>
                                            <xs:documentation>
                                                True indicates that this application pool will be instrumented.	False indicates that this pool will not be instrumented.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>


                <xs:element name="aiMonitoring" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Allows configuration of AI monitoring instrumentation.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="streaming" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When enabled, AI monitoring of streams occurs.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Controls whether or not AI monitoring of streams is enabled.
                                                Defaults to true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>

                            <xs:element name="recordContent" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When enabled, AI monitoring events will include the content of the chat and embedding messages.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Controls whether or not AI monitoring will include the content of the chat and embedding messages.
                                                Defaults to true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>

                        <xs:attribute name="enabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    Controls whether or not AI monitoring features are enabled.
                                    When set to 'false', all AI monitoring sub-features are disabled.
                                    Defaults to false.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="applicationLogging" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Allows configuration of application logging instrumentation.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="metrics" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When enabled, sends up metrics on the number of log lines being created in total and at different severity levels.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Controls whether or not logging metrics are captured. Defaults to true.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="forwarding" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When enabled, capture and send up log messages with logs-in-context data.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="contextData" minOccurs="0" maxOccurs="1">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Log context attributes filtering.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:attribute name="enabled" type="xs:boolean" default="false">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            Controls whether or not context attributes filtering is used. Defaults to false.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                                <xs:attribute name="include" type="xs:string" default="">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            A comma-separated list of case-sensitive strings that define the context attributes that should be added to the log record. Empty means include all.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                                <xs:attribute name="exclude" type="xs:string" default="SpanId,TraceId,ParentId">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            A comma-separated list of case-sensitive strings that define the context attributes that should NOT be added to the log record. "exclude" wins over "include".
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                        <xs:element name="labels" minOccurs="0" maxOccurs="1">
                                            <xs:annotation>
                                                <xs:documentation>
                                                    Include configured labels with log records.
                                                </xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:attribute name="enabled" type="xs:boolean" default="false">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            Controls whether or not labels are included with log records. Defaults to false.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                                <xs:attribute name="exclude" type="xs:string" default="">
                                                    <xs:annotation>
                                                        <xs:documentation>
                                                            A comma-separated list of case-insensitive strings that define the labels that should NOT be added to log records.
                                                        </xs:documentation>
                                                    </xs:annotation>
                                                </xs:attribute>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Controls whether or not log forwarding occurs. Defaults to false.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                    <xs:attribute name="maxSamplesStored" type="xs:int" default="10000">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The maximum number of log messages captured per minute. Default is 10000 messages.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="logLevelDenyList" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                A comma-separated, case-insensitive, list of log level names from the selected logging framework that should be ignored and not sent up to New Relic.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                </xs:complexType>
                            </xs:element>
                            <xs:element name="localDecorating" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        When enabled, local log messages will be decorated with logs-in-context data as they are written.
                                        The method used to decorate the messages depends on the logging framework and may require additional configuration.
                                    </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="false">
                                        <xs:annotation>
                                            <xs:documentation>
                                                Controls whether or not local log messages are decorated with logs-in-context data. Defaults to false.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>

                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Controls whether any logging features are enabled.
                                    When set to 'false', all logging sub-features are disabled.
                                    Defaults to 'true'.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                    </xs:complexType>
                </xs:element>

                <xs:element name="threadProfiling" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ignoreMethod" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>

                <xs:element name="labels" minOccurs="0" maxOccurs="1" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>Labels allow you to tag your applications so you can filter them in APM.</xs:documentation>
                    </xs:annotation>
                </xs:element>

                <xs:element name="appSettings" minOccurs="0" maxOccurs="1" >
                    <xs:complexType>
                        <xs:annotation>
                            <xs:documentation>
                                List any additional New Relic settings here using the typical key/value form.
                            </xs:documentation>
                        </xs:annotation>

                        <xs:sequence>
                            <xs:element name="add" minOccurs="0" maxOccurs="unbounded" >
                                <xs:complexType>
                                    <xs:attribute name="key" type="xs:string"></xs:attribute>
                                    <xs:attribute name="value" type="xs:string"></xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>

                <xs:element name="utilization" minOccurs="0" maxOccurs="1" >
                    <xs:annotation>
                        <xs:documentation>
                            Elements under utilization allow you to configure the gathering of utilization and pricing information by agents during connect.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:attribute name="detectAws" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to poll the AWS metadata endpoint (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectAzure" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to poll the Azure metadata endpoint (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectGcp" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to poll the Google Cloud Platform metadata endpoint (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectPcf" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to look for Pivotal Cloud Foundry environment variables (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectDocker" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to attempt reading the proc/self/cgroup file for Docker (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectKubernetes" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to look for Kubernetes environment variables (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectAzureFunction" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to look for Azure Function environment variables (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="detectAzureAppService" type="xs:boolean" default="true"  use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    This attribute controls whether to look for Azure AppService environment variables (optional). The default is true.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="logicalProcessors" type="xs:int" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The value of this attribute is the total number of hyper-threaded execution contexts available (optional).
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="totalRamMib" type="xs:int" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The value of this attribute represents the total amount of memory available to the host, not the process, in mebibytes (1024 squared or 1,048,576 bytes)  (optional).
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>

                        <xs:attribute name="billingHost" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    The value of this attribute is the server name you have configured (optional).  This may be differnet from the actual server hostname.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="processHost" minOccurs="0" maxOccurs="1">
                    <xs:complexType>
                        <xs:attribute name="displayName" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation>
                                    Sets the hostname to be displayed in the APM UI. If set, this overrides the default hostname that the agent captures automatically.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="codeLevelMetrics" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Turns on/off capture of code level metric attributes.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:attribute name="enabled" type="xs:boolean" default="true">
                            <xs:annotation>
                                <xs:documentation>
                                    Set this to "false" to disable capturing namespace and function information
                                    on spans for code level metrics in CodeStream.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>

                <xs:element name="cloud" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            Provide linking data needed for certain cloud services.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>
                            <xs:element name="aws" minOccurs="0" maxOccurs="1">
                                <xs:complexType>
                                    <xs:attribute name="accountId" type="xs:string">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The AWS Account ID used by this application.
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>
                    </xs:complexType>
                </xs:element>

                <xs:element name="openTelemetry" minOccurs="0" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            OpenTelemetry configuration for the agent. This section contains configuration options
                            that control OpenTelemetry signal processing and export to New Relic.
                        </xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                        <xs:all>
                            <xs:element name="traces" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Configuration for OpenTelemetry tracing.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                This setting controls whether OpenTelemetry tracing is enabled.
                                                Defaults to "true".
                                                This feature must be used together with the global openTelemetry enabled setting.
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_TRACES_ENABLED
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="include" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                A comma-delimited list of OpenTelemetry Tracers (Activity Source Names) to include for tracing.
                                                This setting can override the built-in exclusion list, but can be overridden by the user-configured 'exclude' list (exclude has highest precedence).
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_TRACES_INCLUDE
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="exclude" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                A comma-delimited list of OpenTelemetry Tracers (Activity Source Names) to exclude from tracing.
                                                Tracers matching these names will not have their traces exported.
                                                This has the highest precedence and can override items in the include list.
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_TRACES_EXCLUDE
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="metrics" minOccurs="0" maxOccurs="1">
                                <xs:annotation>
                                    <xs:documentation>
                                        Configuration for OpenTelemetry metrics collection and export.
                                    </xs:documentation>
                                </xs:annotation>

                                <xs:complexType>
                                    <xs:attribute name="enabled" type="xs:boolean" default="true">
                                        <xs:annotation>
                                            <xs:documentation>
                                                This setting controls whether OpenTelemetry metrics collection and export to New Relic is enabled.
                                                Defaults to "true".
                                                This feature must be used together with the global openTelemetry enabled setting.
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_METRICS_ENABLED
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="include" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                A comma-delimited list of OpenTelemetry Meter names to include for metrics export to New Relic.
                                                Meters defined in this list will be enabled
                                                This setting can override the built-in exclusion list, but can be overridden by the user-configured 'exclude' list (exclude has highest precedence).
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_METRICS_INCLUDE
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="exclude" type="xs:string" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                A comma-delimited list of OpenTelemetry Meter names to exclude from metrics export to New Relic.
                                                Meters matching these names will not have their metrics exported.
                                                This has the highest precedence and can override items in the include list.
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_METRICS_EXCLUDE
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="export_interval" type="xs:int" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The number of milliseconds between each attempt to ship opentelemetry metrics.
                                                This value must be equal to or greater than the value of export_timeout.
                                                If export_interval is less than export_timeout, the agent will log a warning and use the default values for both settings.
                                                Default: 60000 (60 seconds)
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_METRICS_EXPORT_INTERVAL
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>

                                    <xs:attribute name="export_timeout" type="xs:int" use="optional">
                                        <xs:annotation>
                                            <xs:documentation>
                                                The number of milliseconds an export operation is allowed in order to successfully complete.
                                                This value must be equal to or less than the value of export_interval.
                                                Default: 10000 (10 seconds)
                                                Environment variable: NEW_RELIC_OPENTELEMETRY_METRICS_EXPORT_TIMEOUT
                                            </xs:documentation>
                                        </xs:annotation>
                                    </xs:attribute>
                                </xs:complexType>
                            </xs:element>
                        </xs:all>

                        <xs:attribute name="enabled" type="xs:boolean" default="false">
                            <xs:annotation>
                                <xs:documentation>
                                    Global setting for OpenTelemetry signal processing in the agent.
                                    If set to "false", no OpenTelemetry signals will be processed or sent to New Relic.
                                    If set to "true", individual signal types (e.g., metrics) can be controlled via their specific enabled settings.
                                    Environment variable: NEW_RELIC_OPENTELEMETRY_ENABLED
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
            </xs:all>

            <xs:attribute name="agentEnabled" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Set this to true to enable the agent.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="rootAgentEnabled" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>
                        Turns on profiling for the root w3wp process. (Experimental.)
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="maxStackTraceLines" type="xs:int" default="80">
                <xs:annotation>
                    <xs:documentation>
                        The maximum number of stack frames to trace in any stack dump.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="debugAgent" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>
                        Turns on additional agent debugging.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="debugStartupDelaySeconds" type="xs:int" default="0">
                <xs:annotation>
                    <xs:documentation>
                        Delays Agent initialization to allow a debugger to be attached.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="threadProfilingEnabled" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Turns on/off Thread Profiling.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="crossApplicationTracingEnabled" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Turns on/off Cross application agent metric gathering.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="timingPrecision" default="low">
                <xs:annotation>
                    <xs:documentation>
                        Controls the precision of the timers, with a trade-off in execution speed.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="high"/>
                        <xs:enumeration value="low"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>

            <xs:attribute name="serverlessModeEnabled" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>
                        Turns on/off serverless mode.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
</xs:schema>
