Log config

Create a log configuration

Creates a new log configuration or overwrites an existing one, replacing any previous values.

post/controlplane/log/config

Request body

is_defaulttrue | false required

Defines whether this log configuration is the default.

Note: If true, it requires the agent:log_config:create-default permission; otherwise, it requires agent:log_config:create.

expires_atstring

If the log configuration is not default, an expiration date must be specified.

account_idinteger

Applicable if the log specification is at the account level.

selectorobject required

The tags to be matched to apply the log configuration

configurationobject required

The log configuration as defined in the log specification.

Example request

{
  "expires_at": "2024-07-12T15:00:00Z",
  "account_id": 2345,
  "selector": {
    "environment": "production"
  },
  "configuration": {
    "log_level": "debug",
    "no_error_sampling": 50
  }
}

Response

The operation was successful.

is_defaulttrue | false

Defines whether this log configuration is the default.

Note: If true, it requires the agent:log_config:create-default permission; otherwise, it requires agent:log_config:create.

expires_atstring

If the log configuration is not default, an expiration date must be specified.

account_idinteger

Applicable if the log specification is at the account level.

selectorobject

The tags to be matched to apply the log configuration.

configurationobject

The log configuration as defined in the log specification.

Example response

{
  "expires_at": "2024-07-12T15:00:00Z",
  "account_id": 2345,
  "selector": {
    "environment": "production"
  },
  "configuration": {
    "log_level": "debug",
    "no_error_sampling": 50
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.