### Okta Source Configuration Example
Source: https://docs.honeycomb.io/send-data/telemetry-pipeline/sources/okta
This is an example of how to configure the Okta source in a standalone setup. Ensure sensitive parameters like api_token are handled securely.
```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
id: okta
name: okta
spec:
type: okta
parameters:
- name: okta_domain
value: example.okta.com
- name: api_token
value: (sensitive)
sensitive: true
- name: poll_interval
value: 60s
```
--------------------------------
### Download, Install, and Run Refinery RPM
Source: https://docs.honeycomb.io/manage-data-volume/sample/honeycomb-refinery/set-up
Download the latest Refinery RPM asset for x86_64 from GitHub, install it using rpm, and start the Refinery service using systemctl. Logs are available at /var/log/journal/refinery.service.log.
```bash
curl -L -O https://github.com/honeycombio/refinery/releases/download/latest/refinery-2.9.4.x86_64.rpm
rpm -ivh refinery-2.9.4.x86_64.rpm
systemctl start refinery.service
```
--------------------------------
### Install Go Beeline Package
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-beelines/go
Fetch the beeline-go package using go mod init and go get.
```go
go mod init
go get github.com/honeycombio/beeline-go
```
--------------------------------
### Install Honeytail from Source
Source: https://docs.honeycomb.io/send-data/logs/structured/postgresql
Clone the Honeytail repository and install it using `go install`. Ensure you have Go installed.
```shell
git clone https://github.com/honeycombio/honeytail
```
```shell
cd honeytail; go install
```
--------------------------------
### Install setuptools
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-beelines/python
Ensure your setuptools installation is up to date before installing the Beeline package.
```bash
pip install -U setuptools
```
--------------------------------
### Install iOS Dependencies
Source: https://docs.honeycomb.io/get-started/start-building/application/react-native
Navigate to the `ios` directory and run `pod install` to install iOS dependencies after modifying the `Podfile`.
```bash
cd ios
pod install
```
--------------------------------
### Install Libhoney for Go
Source: https://docs.honeycomb.io/send-data/go/libhoney
Use this command to install the libhoney-go package.
```shell
go get -v github.com/honeycombio/libhoney-go
```
--------------------------------
### Start Honeytail with Upstart
Source: https://docs.honeycomb.io/send-data/logs/structured/nginx
Use the upstart service manager to start the honeytail process.
```shell
sudo initctl start honeytail
```
--------------------------------
### Start Honeytail with Systemd
Source: https://docs.honeycomb.io/send-data/logs/structured/nginx
Use the systemd service manager to start the honeytail process.
```shell
sudo systemctl start honeytail
```
--------------------------------
### Tip Callout for Getting Started
Source: https://docs.honeycomb.io/investigate/observe/android-launchpad
A tip component providing a link to a guide for getting started with Honeycomb for Android. It is recommended for new users or those investigating data collection methods.
```html
Whether you are here for the first time or are investigating how you can find the data you expect, we recommend starting with our guide: [Get Started with Honeycomb for Android](/get-started/start-building/application/android/).
This will help you send data from your application to Honeycomb in the most effective way.
```
--------------------------------
### Install Baggage Processor
Source: https://docs.honeycomb.io/send-data/go/opentelemetry-sdk
Install the baggage trace processor package using go get. This is required before configuring the SDK.
```shell
go get go.opentelemetry.io/contrib/processors/baggage/baggagetrace
```
--------------------------------
### Example Refinery Configuration File
Source: https://docs.honeycomb.io/manage-data-volume/sample/honeycomb-refinery/configure
This is an example of a complete Refinery configuration file, demonstrating the structure and common sections.
```yaml
General:
ConfigurationVersion: 2
Network:
ListenAddr: "0.0.0.0:8080"
PeerListenAddr: "0.0.0.0:8081"
OTelMetrics:
Enabled: true
APIKey: SetThisToAHoneycombKey
```
--------------------------------
### Splunk Search Query Example
Source: https://docs.honeycomb.io/send-data/telemetry-pipeline/sources/splunk-search-api
This is an example of a Splunk search query. Queries must start with the 'search' command and should not contain additional commands or time fields.
```text
search index=my_index
```
--------------------------------
### Multi-line XML Log Example
Source: https://docs.honeycomb.io/send-data/telemetry-pipeline/sources/kubernetes-container-logs
This example shows multi-line XML logs where each log entry starts with a timestamp. It demonstrates how these logs might appear before re-assembly.
```text
2024-07-01 18:49:15
John Doe
30
2024-07-01 18:49:15 John Doe30
```
--------------------------------
### Install OpenTelemetry Log4j Appender
Source: https://docs.honeycomb.io/send-data/logs/opentelemetry/sdk/java
During application setup, install the OpenTelemetry Log4j appender when configuring the SDK. This appender intercepts log messages to create OTLP logs.
```java
import io.opentelemetry.instrumentation.log4j.appender.v2_17.OpenTelemetryAppender;
import io.opentelemetry.sdk.OpenTelemetrySdk;
// Setup OpenTelemetry SDK
OpenTelemetrySdk sdk =
OpenTelemetrySdk.builder()
.build();
// Install the OpenTelemetry log4j log appender that intercepts log messages and create OTLP logs from them
OpenTelemetryAppender.install(sdk);
```
--------------------------------
### List All Markers Response Example
Source: https://docs.honeycomb.io/api/markers/list-all-markers
This is an example of the JSON response when successfully listing markers. Each marker object contains details like creation time, start time, message, and type.
```json
[
{
"created_at": "2016-08-13T05:39:42Z",
"updated_at": "2016-08-13T05:39:42Z",
"start_time": 1471040808,
"message": "backend deploy #123",
"type": "deploy",
"id": "d1c84ec0"
},
{
"created_at": "2016-08-14T05:39:42Z",
"updated_at": "2016-08-14T05:39:42Z",
"start_time": 1471040808,
"message": "frontend deploy #123",
"type": "deploy",
"id": "c2b52fa0"
}
]
```
--------------------------------
### Install Honeytail from source
Source: https://docs.honeycomb.io/send-data/logs/structured/json
Build and install Honeytail from source using the Go toolchain. This command should be run after cloning the repository and navigating into the directory.
```shell
cd honeytail; go install
```
--------------------------------
### Install Instrumentation Libraries Directly
Source: https://docs.honeycomb.io/send-data/llm/text-to-json-quickstart
If not using a requirements.txt file, install the application's instrumentation libraries directly into the current environment using the bootstrap tool.
```bash
opentelemetry-bootstrap --action=install
```
--------------------------------
### SQL Query Source Configuration Example
Source: https://docs.honeycomb.io/send-data/telemetry-pipeline/sources/sql-query
This configuration demonstrates connecting to a PostgreSQL database, executing a query, and setting up tracking to avoid duplicate logs. It also enables logging of the executed query and its parameters.
```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
id: sqlquery
name: sqlquery
spec:
type: sqlquery
parameters:
- name: driver
value: 'postgres'
- name: datasource
value: 'postgresql://postgres:password@localhost:5432/production?sslmode=disable'
- name: query
value: 'select data, id from log_data where id > $1'
- name: body_column
value: 'data'
- name: tracking_column
value: 'id'
- name: tracking_start_value
value: '0'
- name: interval
value: '10s'
- name: enable_storage
value: true
- name: enable_log_query_logging
value: true
```
--------------------------------
### Create Custom Span in Go
Source: https://docs.honeycomb.io/send-data/standardize/add-custom-instrumentation
Get a tracer and start a new span, ensuring to defer its end to manage its lifecycle.
```go
import (
// ...
"go.opentelemetry.io/otel"
// ...
)
// ...
tracer := otel.Tracer("my-app") // If not already in scope
ctx, span := tracer.Start(ctx, "expensive-operation")
deffer span.End()
// ...
```
--------------------------------
### Install Application Instrumentation Libraries
Source: https://docs.honeycomb.io/send-data/llm/text-to-json-quickstart
Use opentelemetry-bootstrap to scan your application for packages and add their corresponding instrumentation libraries to requirements.txt, then install them.
```bash
opentelemetry-bootstrap >> requirements.txt
pip install -r requirements.txt
```
--------------------------------
### List All Boards
Source: https://docs.honeycomb.io/api/boards
Retrieves a list of all boards available in your Honeycomb account. This is useful for getting an overview of your dashboards and monitoring setups.
```APIDOC
## GET /1/boards
### Description
Retrieves a list of all boards.
### Method
GET
### Endpoint
https://api.honeycomb.io/1/boards
### Parameters
#### Header Parameters
- **X-Honeycomb-Team** (string) - Required - Your Honeycomb API key.
### Response
#### Success Response (200)
- **id** (string) - The unique identifier for the board.
- **name** (string) - The name of the board.
- **description** (string) - A description of the board's purpose.
- **type** (string) - The type of board (e.g., "flexible").
- **panels** (array) - An array of panel configurations within the board.
- **layout_generation** (string) - Indicates how the board layout was generated (e.g., "manual", "auto").
- **tags** (array) - An array of tags associated with the board.
### Request Example
```curl
curl --request GET \
--url https://api.honeycomb.io/1/boards \
--header 'X-Honeycomb-Team: '
```
### Response Example
```json
[
{
"id": "abc123",
"name": "Production Monitoring",
"description": "Key metrics for production environment",
"type": "flexible",
"panels": [
{
"type": "query",
"query_panel": {
"query_id": "ghi9012a",
"query_annotation_id": "f5e6d7c8"
},
"position": {
"x_coordinate": 0,
"y_coordinate": 0,
"height": 6,
"width": 12
}
},
{
"type": "text",
"text_panel": {
"content": "# Production Status\n\nAll systems operational"
},
"position": {
"x_coordinate": 0,
"y_coordinate": 6,
"height": 2,
"width": 12
}
}
],
"layout_generation": "manual",
"tags": [
{
"key": "environment",
"value": "production"
}
]
}
]
```
```
--------------------------------
### Example .honeycomb.yaml Configuration
Source: https://docs.honeycomb.io/integrations/github-deployment-protection-rules
This snippet shows a standard .honeycomb.yaml file used to configure deployment protection rules for 'staging' and 'production' GitHub environments. It includes definitions for Honeycomb team, queries, datasets, query specifications, and thresholds.
```yaml
version: 1
honeycomb_team: my-team # the honeycomb team where queries for all deployment protection rules runs
deployment_protection_rules:
staging: # name of github environment where a deployment occurs
queries:
- honeycomb_environment: qa # honeycomb environment where the query runs
honeycomb_dataset: my-cool-application # (optional, but necessary when using Honeycomb Classic) When left empty, an environment-wide Honeycomb query runs, which is not supported by Honeycomb Classic.
spec: &queryspec '{
"time_range": 1800,
"calculations": [
{
"op": "COUNT"
}
],
"filters": [
{
"column": "status_code",
"op": "=",
"value": "500"
},
{
"column": "build_id",
"op": "=",
"value": ${GITHUB_RUN_ID} # NOTE: when deployment protection rules run, they can map the special GITHUB_RUN_ID variable
}
],
"filter_combination": "AND"
}'
threshold:
operator: '>'
value: 3
production: # name of github environment where a deployment occurs
queries:
- honeycomb_environment: staging # honeycomb environment where the query runs
honeycomb_dataset: my-cool-application # (optional, but necessary when using Honeycomb Classic) When left empty, an environment-wide Honeycomb query runs, which is not supported by Honeycomb Classic.
spec: *queryspec # example of a YAML alias to reuse a query spec created for a different deployment protection rule
threshold:
operator: '>'
value: 1
```
--------------------------------
### List All Burn Alerts for an SLO
Source: https://docs.honeycomb.io/api/burn-alerts/list-all-burn-alerts-for-an-slo
This example demonstrates how to list all burn alerts for a specified SLO using a GET request to the Honeycomb API.
```APIDOC
## List All Burn Alerts for an SLO
### Description
Retrieves a list of all burn alerts configured for a specific SLO within a dataset.
### Method
GET
### Endpoint
https://api.honeycomb.io/1/burn_alerts/{datasetSlug}
### Parameters
#### Path Parameters
- **datasetSlug** (string) - Required - The unique identifier for the dataset.
#### Headers
- **X-Honeycomb-Team** (string) - Required - Your Honeycomb API key.
### Response
#### Success Response (200)
Returns a JSON array of burn alert objects. Each object contains details such as:
- **id** (string) - The unique identifier for the burn alert.
- **alert_type** (string) - The type of burn alert (e.g., "exhaustion_time", "budget_rate").
- **description** (string) - A description or runbook link for the alert.
- **triggered** (boolean) - Indicates if the alert is currently triggered.
- **exhaustion_minutes** (integer) - Applicable for "exhaustion_time" alerts, the duration in minutes.
- **budget_rate_window_minutes** (integer) - Applicable for "budget_rate" alerts, the window in minutes.
- **budget_rate_decrease_threshold_per_million** (integer) - Applicable for "budget_rate" alerts, the threshold.
- **slo** (object) - An object containing information about the associated SLO, including its **id**.
- **created_at** (string) - The timestamp when the alert was created.
- **updated_at** (string) - The timestamp when the alert was last updated.
#### Response Example
```json
[
{
"id": "fS7vfB81Wcy",
"alert_type": "exhaustion_time",
"description": "Use this runbook (link) if this alert fires.",
"triggered": true,
"exhaustion_minutes": 120,
"slo": {
"id": "2LBq9LckbcA"
},
"created_at": "2022-09-22T17:32:11Z",
"updated_at": "2022-10-22T17:32:11Z"
},
{
"id": "gT7wgC82Xcz",
"alert_type": "budget_rate",
"description": "Use this runbook (link) if this alert fires.",
"triggered": true,
"budget_rate_window_minutes": 60,
"budget_rate_decrease_threshold_per_million": 1000,
"slo": {
"id": "2LBq9LckbcA"
},
"created_at": "2022-09-22T17:32:11Z",
"updated_at": "2022-10-22T17:32:11Z"
}
]
```
```
--------------------------------
### Run the Instrumented Go Application
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-honeycomb-distributions/go/honeycomb-distribution
Execute your Go application after setting up instrumentation and configuration. This command starts the application, and its traces will appear in Honeycomb.
```bash
go run YOUR_APPLICATION_NAME.go
```
--------------------------------
### Create Active Custom Span in .NET
Source: https://docs.honeycomb.io/send-data/standardize/add-custom-instrumentation
Use the TracerProvider to get a tracer and start an active custom span, which automatically manages its lifecycle.
```csharp
using OpenTelemetry.Trace;
//...
using var span = TracerProvider.Default.GetTracer("my-service").StartActiveSpan("expensive-query")
// ... Do cool stuff
```
--------------------------------
### Seeding Drain Processor with Templates
Source: https://docs.honeycomb.io/send-data/opentelemetry/collector/group-logs-by-pattern
Seed the drain processor with predefined templates to guide its initial learning process, providing a curated set of patterns from the start.
```yaml
processors:
drain:
seed_templates:
- "user <*> logged in from <*>"
- "request <*> completed in <*> ms"
warmup_min_clusters: 20
```
--------------------------------
### Example Configuration Metadata Response
Source: https://docs.honeycomb.io/troubleshoot/common-issues/refinery
This is an example of the JSON output you can expect when querying for configuration metadata. It shows the type, ID, hash, and load time for each configuration.
```json
[
{
"type": "config",
"id": "tools/loadtest/config.yaml",
"hash": "1047bb6140b487ecdb0745f3335b6bc3",
"loaded_at": "2022-11-08T22:24:18-05:00"
},
{
"type": "rules",
"id": "tools/loadtest/rules.yaml",
"hash": "2d88389e1ff6530fba53466973e591e0",
"loaded_at": "2022-11-08T22:24:18-05:00"
}
]
```
--------------------------------
### Basic Custom Span Processor (TypeScript)
Source: https://docs.honeycomb.io/send-data/javascript-browser
Implement a custom span processor to add attributes to spans when they start. This example demonstrates a simple processor that adds a fixed attribute.
```typescript
class TestSpanProcessorOne implements SpanProcessor {
onStart(span: Span): void {
span.setAttributes({
'processor1.name': 'TestSpanProcessorOne',
});
}
onEnd(): void {}
forceFlush() {
return Promise.resolve();
}
shutdown() {
return Promise.resolve();
}
}
```
--------------------------------
### Configure and Initialize OpenTelemetry Go SDK with slog
Source: https://docs.honeycomb.io/send-data/logs/opentelemetry/sdk/go
Initialize the OpenTelemetry SDK from a configuration file and set the global logger provider. This example also shows how to create a `slog` logger instance using the `otelslog` bridge.
```go
package main
import (
"context"
"go.opentelemetry.io/contrib/bridges/otelslog"
"go.opentelemetry.io/contrib/otelconf"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/log/global"
)
func main() {
// Set up the OpenTelemetry SDK from the config file
sdk, err := otelconf.NewSDK()
if err != nil {
panic("failed to initialize OTel SDK")
}
defer sdk.Shutdown(context.Background())
otel.SetTracerProvider(sdk.TracerProvider())
otel.SetTextMapPropagator(sdk.Propagator())
// Set the logger provider globally
global.SetLoggerProvider(sdk.LoggerProvider())
// Create a new slog logger instance
logger := otelslog.NewLogger()
// Use the logger directly anywhere in your app
logger.Debug("Something interesting happened")
}
```
--------------------------------
### Implement a Basic Span Processor in Kotlin
Source: https://docs.honeycomb.io/send-data/android
Span processors allow you to intercept and modify spans as they are created or completed. This example adds metadata to every span upon starting.
```kotlin
import io.opentelemetry.context.Context
import io.opentelemetry.sdk.trace.ReadWriteSpan
import io.opentelemetry.sdk.trace.ReadableSpan
import io.opentelemetry.sdk.trace.SpanProcessor
class BasicSpanProcessor : SpanProcessor {
override fun onStart(
parentContext: Context,
span: ReadWriteSpan,
) {
span.setAttribute("app.metadata", "extra metadata")
}
override fun isStartRequired(): Boolean {
return true
}
override fun onEnd(span: ReadableSpan) {}
override fun isEndRequired(): Boolean {
return false
}
}
```
--------------------------------
### Full JavaScript Lambda Handler with Instrumentation
Source: https://docs.honeycomb.io/send-data/aws/lambda/opentelemetry
A complete example of a JavaScript Lambda function instrumented for automatic data flow to Honeycomb, including HTTPS request setup and execution.
```javascript
import https from `https`;
var options = {
hostname: 'honeycomb.io'
, path: '/'
, method: 'GET'
};
exports.lambdaHandler = async (event, context) => {
response = {
'statusCode': 200,
'body': json.stringify('Hello, World!')
}
var req = https.request(
options, function(res) {
res.on('data', function(d) {
//
});
}
);
req.end();
return response;
};
```
--------------------------------
### Initialize Go Beeline with API Key and Dataset Name
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-beelines/go
Import the beeline-go package and initialize it with your API key and dataset name. Ensure beeline.Close() is deferred.
```go
import beeline "github.com/honeycombio/beeline-go"
func main() {
beeline.Init(beeline.Config{
WriteKey: "YOUR_API_KEY",
// The name of your app is a good choice to start with
Dataset: "MyGoApp",
})
defer beeline.Close()
...
}
```
--------------------------------
### Apply Honeycomb Agent Manifest using Kubectl
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-honeycomb-kubernetes-agent/honeycomb-kubernetes-agent
Applies the quickstart YAML manifest to add the Honeycomb agent to your cluster. This is the final step for installing the agent using kubectl.
```bash
kubectl apply -f https://raw.githubusercontent.com/honeycombio/honeycomb-kubernetes-agent/main/examples/quickstart.yaml
```
--------------------------------
### Initialize OpenTelemetry with Honeycomb SDK (JavaScript)
Source: https://docs.honeycomb.io/troubleshoot/product-lifecycle/recommended-migrations/migrate-from-honeycomb-distributions/javascript-nodejs/honeycomb-distribution
Create a `tracing.js` file to initialize the OpenTelemetry SDK with Honeycomb's distribution and automatic instrumentations. This setup uses environment variables for API key and service name.
```javascript
// Example filename: tracing.js
'use strict';
const { HoneycombSDK } = require('@honeycombio/opentelemetry-node');
const {
getNodeAutoInstrumentations,
} = require('@opentelemetry/auto-instrumentations-node');
// Uses environment variables named HONEYCOMB_API_KEY and OTEL_SERVICE_NAME
const sdk = new HoneycombSDK({
instrumentations: [
getNodeAutoInstrumentations(),
],
});
sdk.start()
```
--------------------------------
### Add Filter Processor to OTel Collector Configuration
Source: https://docs.honeycomb.io/manage-data-volume/filter/filter-processor
Add the filter component as a processor in your OTel Collector configuration file to start filtering telemetry. This example shows how to configure it to operate on span data.
```yaml
processors:
# add the filter processor
filter/simple:
error_mode: ignore
# tell it to operate on span data
traces:
span:
- 'attributes["container.name"] == "app_container_1"'
```
--------------------------------
### Initialize OpenTelemetry SDK and HTTP Handler in Go
Source: https://docs.honeycomb.io/send-data/use-cases/llm/text-to-json-quickstart
Set up the OpenTelemetry SDK using otelconf and instrument an HTTP handler. This example prepares your Go application to send spans to Honeycomb.
```go
package main
import (
"context"
"fmt"
"log"
"net/http"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/contrib/otelconf"
"go.opentelemetry.io/otel"
)
// Implement an HTTP Handler function to be instrumented
func httpHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, World")
}
func main() {
// use otelconf to set up OpenTelemetry SDK
sdk, err := otelconf.NewSDK()
if err != nil {
log.Fatalf("error setting up OTel SDK - %e", err)
}
defer sdk.Shutdown(context.Background())
otel.SetTracerProvider(sdk.TracerProvider())
otel.SetTextMapPropagator(sdk.Propagator())
// Initialize HTTP handler instrumentation
handler := http.HandlerFunc(httpHandler)
wrappedHandler := otelhttp.NewHandler(handler, "hello")
http.Handle("/hello", wrappedHandler)
// Serve HTTP server
log.Fatal(http.ListenAndServe(":3030", nil))
}
```
--------------------------------
### YAML Configuration Example
Source: https://docs.honeycomb.io/send-data/logs/structured/honeytail
An example of a honeytail YAML configuration file, showing how various parameters are represented. Note the structure for arrays and nested objects.
```yaml
apihost: https://api.honeycomb.io/
# or if on our EU instance, https://api.eu1.honeycomb.io
samplerate: 1
poolsize: 80
send_frequency_ms: 100
send_batch_size: 50
status_interval: 60
request_parse_query: whitelist
dynsample_window: 30
dynsample_minimum: 1
required_options:
parsername: mysql
writekey: YOUR_API_KEY
logfiles:
- ./mysql-slow.log
dataset: YOUR_DATASET
mysql:
host: my.fake.host.com
user: ""
pass: ""
queryinterval: 0
```
--------------------------------
### Get SLO History Response (200 OK)
Source: https://docs.honeycomb.io/api/reporting/get-slo-history
This is an example of a successful response (200 OK) containing historical SLO data. The response is a JSON object mapping SLO IDs to an array of compliance and budget intervals.
```json
{
"2LBq9LckbcA": [
{
"timestamp": 1744650000,
"compliance": 91.44851657940663,
"budget_remaining": 14.48516579406632
},
{
"timestamp": 1744653600,
"compliance": 97.98746514671242,
"budget_remaining": 88.13453467953423
}
],
"CzcpPs7cJ4d": [
{
"timestamp": 1744650000,
"compliance": 93.53414567784128,
"budget_remaining": -71.02966841186735
}
]
}
```
--------------------------------
### Example Response Body for Deleted Marker
Source: https://docs.honeycomb.io/api/markers/delete-a-marker
This JSON object represents the structure of a marker that has been successfully deleted. It includes details such as creation and update timestamps, start time, message, type, and the marker's unique ID.
```json
{
"created_at": "2016-08-13T05:39:42Z",
"updated_at": "2016-08-13T05:39:42Z",
"start_time": 1471040808,
"message": "backend deploy #123",
"type": "deploy",
"id": "d1c84ec0"
}
```
--------------------------------
### Example Refinery Rules File
Source: https://docs.honeycomb.io/manage-data-volume/sample/honeycomb-refinery/sampling-methods
A basic example of a Refinery rules file demonstrating default and production samplers with specific configurations.
```yaml
RulesVersion: 2
Samplers:
__default__:
DeterministicSampler:
SampleRate: 1
production:
DynamicSampler:
SampleRate: 2
ClearFrequency: 30s
FieldList:
- request.method
- http.target
- response.status_code
```
--------------------------------
### Get SLO History
Source: https://docs.honeycomb.io/api/reporting/get-slo-history
This endpoint retrieves historical SLO data. It requires a list of SLO IDs and a time range (start and end times in Unix timestamp format). The response is a JSON object mapping SLO IDs to their historical compliance and budget data.
```APIDOC
## POST /1/reporting/slos/historical
### Description
Retrieves historical SLO data, including compliance and budget remaining, for specified SLO IDs within a given time range.
### Method
POST
### Endpoint
https://api.honeycomb.io/1/reporting/slos/historical
https://api.eu1.honeycomb.io/1/reporting/slos/historical
### Parameters
#### Header Parameters
- **X-Honeycomb-Team** (string) - Required - Authenticate using a Honeycomb Configuration Key.
#### Request Body
- **ids** (array[string]) - Required - A list of SLO IDs to retrieve history for. Cannot be an empty array or more than 24 in length. Example: `["2LBq9LckbcA", "CzcpPs7cJ4d"]
- **start_time** (integer) - Required - The starting Unix timestamp, in seconds since the epoch, to retrieve historical data for. Cannot be more than a year in the past. Example: `1742230800`
- **end_time** (integer) - Required - The ending Unix timestamp, in seconds since the epoch, to retrieve historical data for. Must be greater than `start_time`. Cannot be a future timestamp. Example: `1745254800`
### Response
#### Success Response (200)
- **{key}** (object[]) - A mapping from SLO IDs to their historical data. Each SLO ID maps to an array of compliance and budget intervals. An empty array indicates that no historical data was found for the given time range for that SLO.
### Request Example
```json
{
"ids": [
"2LBq9LckbcA",
"CzcpPs7cJ4d"
],
"start_time": 1742230800,
"end_time": 1745254800
}
```
### Response Example
```json
{
"2LBq9LckbcA": [
{
"timestamp": 1744650000,
"compliance": 91.44851657940663,
"budget_remaining": 14.48516579406632
},
{
"timestamp": 1744653600,
"compliance": 97.98746514671242,
"budget_remaining": 88.13453467953423
}
],
"CzcpPs7cJ4d": [
{
"timestamp": 1744650000,
"compliance": 93.53414567784128,
"budget_remaining": -71.02966841186735
}
]
}
```
```