---
title: "PUT /api/v1/config/trace-behaviors/{slug}"
method: PUT
path: "/api/v1/config/trace-behaviors/{slug}"
tags: ["TraceBehavior"]
---

# PUT /api/v1/config/trace-behaviors/{slug}

`PUT /api/v1/config/trace-behaviors/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateTraceBehaviorBody
  - `trace_behavior` Configv1TraceBehavior
    - `name` string — Required. Name of the TraceBehavior. You can modify this value after the TraceBehavior is created.
    - `slug` string — Unique identifier of the TraceBehavior. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the TraceBehavior is created.
    - `created_at` string, date-time — Timestamp of when the TraceBehavior was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the TraceBehavior was last updated. Cannot be set by clients.
    - `description` string
    - `base_tail_sample_rate` number, double — Sample rate for fully assembled traces that do not apply to the error, fast, slow, large, or small sampling options.
    - `base_head_sample_rate` number, double — Sample rate for head sampling. This applies to all root spans that are enrolled in head sampling, but do not have a specific rule defined for their service.
    - `error_sample_options` TraceBehaviorErrorSampleOptions
      - `sample_rate` number, double — Sample rate for traces with errors.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `fast_sample_options` TraceBehaviorFastSampleOptions
      - `max_duration_seconds` number, double — Duration in seconds under which traces are sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate for traces under the given duration.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `slow_sample_options` TraceBehaviorSlowSampleOptions
      - `min_duration_seconds` number, double — Duration in seconds over which traces are sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `large_trace_sample_options` TraceBehaviorLargeTraceSampleOptions
      - `span_count_threshold` integer — For N = number of spans in the trace, if N >= span_count_threshold, the trace is sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `small_trace_sample_options` TraceBehaviorSmallTraceSampleOptions
      - `span_count_threshold` integer — For N = number of spans in the trace, if N <= span_count_threshold, the trace is sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
  - `create_if_missing` boolean — If true, the TraceBehavior will be created if it does not already exist, identified by slug. If false, an error will be returned if the TraceBehavior does not already exist.
  - `dry_run` boolean — If true, the TraceBehavior isn't created or updated, and no response TraceBehavior will be returned. The response will return an error if the given TraceBehavior is invalid.

## Response `200`

A successful response containing the updated TraceBehavior.

- Configv1UpdateTraceBehaviorResponse
  - `trace_behavior` Configv1TraceBehavior
    - `name` string — Required. Name of the TraceBehavior. You can modify this value after the TraceBehavior is created.
    - `slug` string — Unique identifier of the TraceBehavior. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the TraceBehavior is created.
    - `created_at` string, date-time — Timestamp of when the TraceBehavior was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the TraceBehavior was last updated. Cannot be set by clients.
    - `description` string
    - `base_tail_sample_rate` number, double — Sample rate for fully assembled traces that do not apply to the error, fast, slow, large, or small sampling options.
    - `base_head_sample_rate` number, double — Sample rate for head sampling. This applies to all root spans that are enrolled in head sampling, but do not have a specific rule defined for their service.
    - `error_sample_options` TraceBehaviorErrorSampleOptions
      - `sample_rate` number, double — Sample rate for traces with errors.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `fast_sample_options` TraceBehaviorFastSampleOptions
      - `max_duration_seconds` number, double — Duration in seconds under which traces are sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate for traces under the given duration.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `slow_sample_options` TraceBehaviorSlowSampleOptions
      - `min_duration_seconds` number, double — Duration in seconds over which traces are sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `large_trace_sample_options` TraceBehaviorLargeTraceSampleOptions
      - `span_count_threshold` integer — For N = number of spans in the trace, if N >= span_count_threshold, the trace is sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.
    - `small_trace_sample_options` TraceBehaviorSmallTraceSampleOptions
      - `span_count_threshold` integer — For N = number of spans in the trace, if N <= span_count_threshold, the trace is sampled according to the given sample rate.
      - `sample_rate` number, double — Sample rate.
      - `sampling_type` 'LOW_VALUE' | 'HIGH_VALUE' — - LOW_VALUE: Match indicates a low value trace. With multiple low value matches sample at the lowest rate. - HIGH_VALUE: Match indicates a high value trace. With multiple high value matches sample at the highest rate.
      - `enabled` boolean — Whether or not to use these options.

## Other responses

- `400` — Cannot update the TraceBehavior because the request is invalid.
- `404` — Cannot update the TraceBehavior because the slug does not exist.
- `409` — Cannot update the TraceBehavior because there is a conflict with an existing TraceBehavior.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.net/chronosphere/apis/config-v1-api.md) · [All operations](https://skmtc.net/chronosphere/apis/config-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chronosphere/config-v1-api/revisions/530951bd2ccf/schema)
