> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ReadTraceTailSamplingRules



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json GET /api/v1/config/trace-tail-sampling-rules
openapi: 3.0.3
info:
  description: >

    The Config API provides standard HTTP/JSON REST endpoints for creating,
    reading,

    updating, deleting, and listing configurable Chronosphere resources.


    Use this link to download the raw Swagger specification:

    <a href="/api/v1/config/swagger.json">/api/v1/config/swagger.json</a>
  title: Config V1 API
  version: v1
servers:
  - url: https://{tenant}.chronosphere.io
    variables:
      tenant:
        default: tenant
        description: tenant ID assigned by the service provider
security:
  - ApiKeyAuth: []
tags:
  - name: ConfigV1
paths:
  /api/v1/config/trace-tail-sampling-rules:
    get:
      tags:
        - TraceTailSamplingRules
      operationId: ReadTraceTailSamplingRules
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/configv1ReadTraceTailSamplingRulesResponse
          description: A successful response.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: >-
            Cannot read the TraceTailSamplingRules because
            TraceTailSamplingRules has not been created.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: An unexpected error response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/genericError'
          description: An undefined error response.
components:
  schemas:
    configv1ReadTraceTailSamplingRulesResponse:
      properties:
        trace_tail_sampling_rules:
          $ref: '#/components/schemas/configv1TraceTailSamplingRules'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1TraceTailSamplingRules:
      description: Root object containing all tail sampling rules (for a tenant).
      properties:
        created_at:
          description: Timestamp of when the rule was created.
          format: date-time
          readOnly: true
          type: string
        default_sample_rate:
          allOf:
            - $ref: '#/components/schemas/configv1DefaultSampleRate'
          description: >-
            Optional. By default, all traces not matching the defined rules are
            kept. You

            can override this behavior by providing a default sample rate.
        rules:
          description: >-
            Optional. Specifies a list of rules and a sampling rate to apply.
            Rules are

            evaluated in order until a match is found. If no sample rate is
            specified, the

            default sample rate is applied.
          items:
            $ref: '#/components/schemas/configv1TraceTailSamplingRule'
          type: array
        updated_at:
          description: Timestamp of when the rule was updated.
          format: date-time
          readOnly: true
          type: string
      type: object
    configv1DefaultSampleRate:
      properties:
        enabled:
          description: Determines whether to override the default sample rate.
          type: boolean
        sample_rate:
          description: >-
            Specifies the percentage of traces to keep, which must be a number
            between `0`

            and `1`, inclusive, where `1` equates to 100 percent.
          format: double
          type: number
      type: object
    configv1TraceTailSamplingRule:
      description: Contains configuration for one tail sampling rule.
      properties:
        created_at:
          description: Timestamp of when the rule was created.
          format: date-time
          type: string
        filter:
          allOf:
            - $ref: '#/components/schemas/configv1TraceSearchFilter'
          description: >-
            Filter criteria applied to each trace to determine whether the trace
            is a match.
        name:
          description: A human-readable name of the rule.
          type: string
        sample_rate:
          description: >-
            Specifies the percentage of traces to keep, which must be a number
            between `0`

            and `1`, inclusive, where `1` equates to 100 percent.
          format: double
          type: number
        system_name:
          description: >-
            Name used as the metric label value for metrics that are emitted
            from this rule.
          type: string
        updated_at:
          description: Timestamp of when the rule was updated.
          format: date-time
          type: string
      type: object
    configv1TraceSearchFilter:
      properties:
        scope_filter:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterScopeFilter'
          description: >-
            Scope filter that defines which spans within matching traces
            contribute to metrics calculation.
        span:
          description: >-
            Specifies the span conditions to match on. All conditions must be
            true in a

            single span for the span to be considered a match. If `span_count`
            is specified,

            the number of spans within the trace that match span conditions must
            be within

            `[min, max]`. You can specify multiple span conditions, and each can
            be

            satisfied by any number of spans within the trace.
          items:
            $ref: '#/components/schemas/TraceSearchFilterSpanFilter'
          type: array
        trace:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterTraceFilter'
          description: Trace-level filter criteria (effectively matching the root span).
      type: object
    TraceSearchFilterScopeFilter:
      properties:
        span_scopes:
          description: >-
            Specifies the span filters that define which spans contribute to the
            metrics calculation.

            Only spans matching these filters will be included in the metrics
            aggregation.
          items:
            $ref: '#/components/schemas/TraceSearchFilterSpanFilter'
          type: array
      type: object
    TraceSearchFilterSpanFilter:
      properties:
        duration:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterDurationFilter'
          description: Matches the duration of the candidate span.
        error:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterBoolFilter'
          description: Matches the error status of the candidate span.
        is_root_span:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterBoolFilter'
          description: >-
            Matches the root span of a trace. For example, if the parent span
            has no child

            spans.
        match_type:
          allOf:
            - $ref: '#/components/schemas/SpanFilterSpanFilterMatchType'
          description: >-
            If `INCLUDE`, includes all traces that have at least one (or
            `span_count`)

            spans matching the query. If `EXCLUDE`, excludes all traces that
            have at least

            one (or `span_count`) spans matching the query.
        operation:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterStringFilter'
          description: Matches the operation of the candidate span.
        parent_operation:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterStringFilter'
          description: >-
            If not a root span, matches the operation of the candidate span's
            parent span
        parent_service:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterStringFilter'
          description: >-
            If not a root span, matches the service of the candidate span's
            parent span.
        service:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterStringFilter'
          description: Matches the service of the candidate span.
        span_count:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterCountFilter'
          description: >-
            Defines the number of spans that must match the criteria defined by
            the span

            query. Defaults to requiring that at least one span matches the span
            query.
        tags:
          description: Matches the tags of the candidate span.
          items:
            $ref: '#/components/schemas/TraceSearchFilterTagFilter'
          type: array
      type: object
    TraceSearchFilterTraceFilter:
      properties:
        duration:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterDurationFilter'
          description: Matches traces based on the duration of the entire trace.
        error:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterBoolFilter'
          description: Matches traces based on the top-level error status.
      type: object
    TraceSearchFilterDurationFilter:
      properties:
        max_secs:
          description: Maximum duration, in seconds, required for a span or trace to match.
          format: double
          type: number
        min_secs:
          description: Minimum duration, in seconds, required for a span or trace to match.
          format: double
          type: number
      type: object
    TraceSearchFilterBoolFilter:
      properties:
        value:
          description: The value of the filter compared to the target trace or span field.
          type: boolean
      type: object
    SpanFilterSpanFilterMatchType:
      enum:
        - INCLUDE
        - EXCLUDE
      type: string
    TraceSearchFilterStringFilter:
      properties:
        in_values:
          description: >-
            Values the filter tests against when using `IN` or `NOT_IN` match
            type.
          items:
            type: string
          type: array
        match:
          allOf:
            - $ref: '#/components/schemas/StringFilterStringFilterMatchType'
          description: >-
            Specifies the comparison operator for the query. If `EXACT`,
            compared strings

            must have the exact value of the query value.
        value:
          description: The value of the filter compared to the target trace or span field.
          type: string
      type: object
    TraceSearchFilterCountFilter:
      properties:
        max:
          description: Maximum number of spans that must match a span query, inclusive.
          format: int32
          type: integer
        min:
          description: Minimum number of spans that must match a span query, inclusive.
          format: int32
          type: integer
      type: object
    TraceSearchFilterTagFilter:
      properties:
        key:
          description: The key or name of the span tag that this filter inspects.
          type: string
        numeric_value:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterNumericFilter'
          description: >-
            If the query matches the tag with the specified key, and the value
            type is

            `numeric`, specifies the matcher used to evaluate the span tag
            value.
        value:
          allOf:
            - $ref: '#/components/schemas/TraceSearchFilterStringFilter'
          description: >-
            If the query matches the tag with the specified key, and the value
            type is a

            `string`, specifies the matcher used to evaluate the span tag value.
      type: object
    StringFilterStringFilterMatchType:
      enum:
        - EXACT
        - REGEX
        - EXACT_NEGATION
        - REGEX_NEGATION
        - IN
        - NOT_IN
      type: string
    TraceSearchFilterNumericFilter:
      properties:
        comparison:
          allOf:
            - $ref: '#/components/schemas/NumericFilterComparisonType'
          description: >-
            The comparison operation to apply to an input against the given
            query value.
        value:
          description: The filter value used in comparison against match candidates.
          format: double
          type: number
      type: object
    NumericFilterComparisonType:
      enum:
        - EQUAL
        - NOT_EQUAL
        - GREATER_THAN
        - GREATER_THAN_OR_EQUAL
        - LESS_THAN
        - LESS_THAN_OR_EQUAL
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````