Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "04d09cb",
"generated": "2025-07-23 09:23:52.685"
"spec_repo_commit": "4727afe",
"generated": "2025-07-23 15:37:34.194"
}
67 changes: 67 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5547,6 +5547,72 @@ components:
type: string
x-enum-varnames:
- DATE_REMAPPER
LogsDecoderProcessor:
description: 'The decoder processor decodes any source attribute containing
a

base64/base16-encoded UTF-8/ASCII string back to its original value, storing
the

result in a target attribute.'
properties:
binary_to_text_encoding:
$ref: '#/components/schemas/LogsDecoderProcessorBinaryToTextEncoding'
input_representation:
$ref: '#/components/schemas/LogsDecoderProcessorInputRepresentation'
is_enabled:
default: false
description: Whether the processor is enabled.
type: boolean
name:
description: Name of the processor.
type: string
source:
description: Name of the log attribute with the encoded data.
example: encoded.field
type: string
target:
description: Name of the log attribute that contains the decoded data.
example: decoded.field
type: string
type:
$ref: '#/components/schemas/LogsDecoderProcessorType'
required:
- source
- target
- binary_to_text_encoding
- input_representation
- type
type: object
LogsDecoderProcessorBinaryToTextEncoding:
description: The encoding used to represent the binary data.
enum:
- base64
- base16
example: base64
type: string
x-enum-varnames:
- BASE64
- BASE16
LogsDecoderProcessorInputRepresentation:
description: The original representation of input string.
enum:
- utf_8
- integer
example: utf_8
type: string
x-enum-varnames:
- UTF_8
- INTEGER
LogsDecoderProcessorType:
default: decoder-processor
description: Type of logs decoder processor.
enum:
- decoder-processor
example: decoder-processor
type: string
x-enum-varnames:
- DECODER_PROCESSOR
LogsExclusion:
description: Represents the index exclusion filter object from configuration
API.
Expand Down Expand Up @@ -6215,6 +6281,7 @@ components:
- $ref: '#/components/schemas/LogsTraceRemapper'
- $ref: '#/components/schemas/LogsSpanRemapper'
- $ref: '#/components/schemas/LogsArrayProcessor'
- $ref: '#/components/schemas/LogsDecoderProcessor'
LogsQueryCompute:
description: Define computation for a log query.
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2025-07-22T13:27:59.975Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Logs Pipelines/Create a pipeline with Decoder Processor returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "728a82ed3e812a075bff989367bf7d5f",
"_order": 0,
"cache": {},
"request": {
"bodySize": 276,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 574,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"filter\":{\"query\":\"source:python\"},\"name\":\"testDecoderProcessor\",\"processors\":[{\"binary_to_text_encoding\":\"base16\",\"input_representation\":\"utf_8\",\"is_enabled\":true,\"name\":\"test_decoder\",\"source\":\"encoded.field\",\"target\":\"decoded.field\",\"type\":\"decoder-processor\"}],\"tags\":[]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/logs/config/pipelines"
},
"response": {
"bodySize": 365,
"content": {
"mimeType": "application/json",
"size": 365,
"text": "{\"id\":\"BEg5CcvmSfyIGoMi9PWyTQ\",\"type\":\"pipeline\",\"name\":\"testDecoderProcessor\",\"is_enabled\":false,\"is_read_only\":false,\"filter\":{\"query\":\"source:python\"},\"processors\":[{\"name\":\"test_decoder\",\"is_enabled\":true,\"source\":\"encoded.field\",\"target\":\"decoded.field\",\"binary_to_text_encoding\":\"base16\",\"input_representation\":\"utf_8\",\"type\":\"decoder-processor\"}],\"tags\":[]}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 702,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2025-07-22T12:57:10.803Z",
"time": 425
},
{
"_id": "eb454a5f3982ee2abefb92c5980ba3f3",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "*/*"
}
],
"headersSize": 533,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/logs/config/pipelines/BEg5CcvmSfyIGoMi9PWyTQ"
},
"response": {
"bodySize": 3,
"content": {
"mimeType": "application/json",
"size": 3,
"text": "{}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 677,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2025-07-22T12:57:11.238Z",
"time": 430
}
],
"pages": [],
"version": "1.2"
}
}
38 changes: 38 additions & 0 deletions examples/v1/logs-pipelines/CreateLogsPipeline_3336967838.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Create a pipeline with Decoder Processor returns "OK" response
*/

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.LogsPipelinesApi(configuration);

const params: v1.LogsPipelinesApiCreateLogsPipelineRequest = {
body: {
filter: {
query: "source:python",
},
name: "testDecoderProcessor",
processors: [
{
type: "decoder-processor",
isEnabled: true,
name: "test_decoder",
source: "encoded.field",
target: "decoded.field",
binaryToTextEncoding: "base16",
inputRepresentation: "utf_8",
},
],
tags: [],
},
};

apiInstance
.createLogsPipeline(params)
.then((data: v1.LogsPipeline) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
7 changes: 7 additions & 0 deletions features/v1/logs_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ Feature: Logs Pipelines
When the request is sent
Then the response status is 200 OK

@team:DataDog/event-platform-experience
Scenario: Create a pipeline with Decoder Processor returns "OK" response
Given new "CreateLogsPipeline" request
And body with value {"filter": {"query": "source:python"}, "name": "testDecoderProcessor", "processors": [{"type": "decoder-processor", "is_enabled": true, "name": "test_decoder", "source": "encoded.field", "target": "decoded.field", "binary_to_text_encoding": "base16", "input_representation": "utf_8"}], "tags": []}
When the request is sent
Then the response status is 200 OK

@team:DataDog/event-platform-experience
Scenario: Create a pipeline with Span Id Remapper returns "OK" response
Given new "CreateLogsPipeline" request
Expand Down
4 changes: 4 additions & 0 deletions packages/datadog-api-client-v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@ export { LogsCategoryProcessorType } from "./models/LogsCategoryProcessorType";
export { LogsDailyLimitReset } from "./models/LogsDailyLimitReset";
export { LogsDateRemapper } from "./models/LogsDateRemapper";
export { LogsDateRemapperType } from "./models/LogsDateRemapperType";
export { LogsDecoderProcessor } from "./models/LogsDecoderProcessor";
export { LogsDecoderProcessorBinaryToTextEncoding } from "./models/LogsDecoderProcessorBinaryToTextEncoding";
export { LogsDecoderProcessorInputRepresentation } from "./models/LogsDecoderProcessorInputRepresentation";
export { LogsDecoderProcessorType } from "./models/LogsDecoderProcessorType";
export { LogsExclusion } from "./models/LogsExclusion";
export { LogsExclusionFilter } from "./models/LogsExclusionFilter";
export { LogsFilter } from "./models/LogsFilter";
Expand Down
110 changes: 110 additions & 0 deletions packages/datadog-api-client-v1/models/LogsDecoderProcessor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { LogsDecoderProcessorBinaryToTextEncoding } from "./LogsDecoderProcessorBinaryToTextEncoding";
import { LogsDecoderProcessorInputRepresentation } from "./LogsDecoderProcessorInputRepresentation";
import { LogsDecoderProcessorType } from "./LogsDecoderProcessorType";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* The decoder processor decodes any source attribute containing a
* base64/base16-encoded UTF-8/ASCII string back to its original value, storing the
* result in a target attribute.
*/
export class LogsDecoderProcessor {
/**
* The encoding used to represent the binary data.
*/
"binaryToTextEncoding": LogsDecoderProcessorBinaryToTextEncoding;
/**
* The original representation of input string.
*/
"inputRepresentation": LogsDecoderProcessorInputRepresentation;
/**
* Whether the processor is enabled.
*/
"isEnabled"?: boolean;
/**
* Name of the processor.
*/
"name"?: string;
/**
* Name of the log attribute with the encoded data.
*/
"source": string;
/**
* Name of the log attribute that contains the decoded data.
*/
"target": string;
/**
* Type of logs decoder processor.
*/
"type": LogsDecoderProcessorType;

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
binaryToTextEncoding: {
baseName: "binary_to_text_encoding",
type: "LogsDecoderProcessorBinaryToTextEncoding",
required: true,
},
inputRepresentation: {
baseName: "input_representation",
type: "LogsDecoderProcessorInputRepresentation",
required: true,
},
isEnabled: {
baseName: "is_enabled",
type: "boolean",
},
name: {
baseName: "name",
type: "string",
},
source: {
baseName: "source",
type: "string",
required: true,
},
target: {
baseName: "target",
type: "string",
required: true,
},
type: {
baseName: "type",
type: "LogsDecoderProcessorType",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "any",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return LogsDecoderProcessor.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* The encoding used to represent the binary data.
*/

export type LogsDecoderProcessorBinaryToTextEncoding =
| typeof BASE64
| typeof BASE16
| UnparsedObject;
export const BASE64 = "base64";
export const BASE16 = "base16";
Loading