Dash0 acquires Polar Signals

Manage Sampling Rules

Create a new sampling rule

post/api/sampling-rules

Create a new sampling rule for your organization. If you set metadata.labels["dash0.com/origin"], it must be unique within the organization, across all datasets. See "Resource origins" in the introduction. A request with a duplicate origin returns 400. To run the same rule in several datasets, put the dataset in the origin.

Parameters 1

datasetquery
References Dataset

Optional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.

stringpattern "^[a-zA-Z0-9_-]{3,26}$"
bash
Sample requestcurl --request POST 'https://api.eu-west-1.aws.dash0.com/api/sampling-rules' \
  --header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "kind": "Dash0Sampling",
  "metadata": {
    "name": "Example"
  },
  "spec": {
    "enabled": true,
    "conditions": {
      "kind": "and",
      "spec": {
        "conditions": [
          {
            "kind": "and",
            "spec": {
              "conditions": [
                {
                  "kind": "and",
                  "spec": {
                    "conditions": [
                      {
                        "kind": "and",
                        "spec": {
                          "conditions": [
                            {
                              "kind": "error",
                              "spec": {}
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}'

Request body required

stringrequired
"Dash0Sampling"
SamplingMetadatarequired
SamplingSpecrequired

Responses

The created sampling rule

stringrequired
"Dash0Sampling"
SamplingMetadatarequired
SamplingSpecrequired