Skip to content

Commit 35fbeee

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add decoder processor to public api (#2538)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 686e823 commit 35fbeee

12 files changed

+462
-3
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "04d09cb",
3-
"generated": "2025-07-23 09:22:24.045"
2+
"spec_repo_commit": "4727afe",
3+
"generated": "2025-07-23 15:36:20.048"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5547,6 +5547,72 @@ components:
55475547
type: string
55485548
x-enum-varnames:
55495549
- DATE_REMAPPER
5550+
LogsDecoderProcessor:
5551+
description: 'The decoder processor decodes any source attribute containing
5552+
a
5553+
5554+
base64/base16-encoded UTF-8/ASCII string back to its original value, storing
5555+
the
5556+
5557+
result in a target attribute.'
5558+
properties:
5559+
binary_to_text_encoding:
5560+
$ref: '#/components/schemas/LogsDecoderProcessorBinaryToTextEncoding'
5561+
input_representation:
5562+
$ref: '#/components/schemas/LogsDecoderProcessorInputRepresentation'
5563+
is_enabled:
5564+
default: false
5565+
description: Whether the processor is enabled.
5566+
type: boolean
5567+
name:
5568+
description: Name of the processor.
5569+
type: string
5570+
source:
5571+
description: Name of the log attribute with the encoded data.
5572+
example: encoded.field
5573+
type: string
5574+
target:
5575+
description: Name of the log attribute that contains the decoded data.
5576+
example: decoded.field
5577+
type: string
5578+
type:
5579+
$ref: '#/components/schemas/LogsDecoderProcessorType'
5580+
required:
5581+
- source
5582+
- target
5583+
- binary_to_text_encoding
5584+
- input_representation
5585+
- type
5586+
type: object
5587+
LogsDecoderProcessorBinaryToTextEncoding:
5588+
description: The encoding used to represent the binary data.
5589+
enum:
5590+
- base64
5591+
- base16
5592+
example: base64
5593+
type: string
5594+
x-enum-varnames:
5595+
- BASE64
5596+
- BASE16
5597+
LogsDecoderProcessorInputRepresentation:
5598+
description: The original representation of input string.
5599+
enum:
5600+
- utf_8
5601+
- integer
5602+
example: utf_8
5603+
type: string
5604+
x-enum-varnames:
5605+
- UTF_8
5606+
- INTEGER
5607+
LogsDecoderProcessorType:
5608+
default: decoder-processor
5609+
description: Type of logs decoder processor.
5610+
enum:
5611+
- decoder-processor
5612+
example: decoder-processor
5613+
type: string
5614+
x-enum-varnames:
5615+
- DECODER_PROCESSOR
55505616
LogsExclusion:
55515617
description: Represents the index exclusion filter object from configuration
55525618
API.
@@ -6215,6 +6281,7 @@ components:
62156281
- $ref: '#/components/schemas/LogsTraceRemapper'
62166282
- $ref: '#/components/schemas/LogsSpanRemapper'
62176283
- $ref: '#/components/schemas/LogsArrayProcessor'
6284+
- $ref: '#/components/schemas/LogsDecoderProcessor'
62186285
LogsQueryCompute:
62196286
description: Define computation for a log query.
62206287
properties:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-07-22T13:27:59.975Z

cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-Decoder-Processor-returns-OK-response.yml

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Create a pipeline with Decoder Processor returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::LogsPipelinesAPI.new
5+
6+
body = DatadogAPIClient::V1::LogsPipeline.new({
7+
filter: DatadogAPIClient::V1::LogsFilter.new({
8+
query: "source:python",
9+
}),
10+
name: "testDecoderProcessor",
11+
processors: [
12+
DatadogAPIClient::V1::LogsDecoderProcessor.new({
13+
type: DatadogAPIClient::V1::LogsDecoderProcessorType::DECODER_PROCESSOR,
14+
is_enabled: true,
15+
name: "test_decoder",
16+
source: "encoded.field",
17+
target: "decoded.field",
18+
binary_to_text_encoding: DatadogAPIClient::V1::LogsDecoderProcessorBinaryToTextEncoding::BASE16,
19+
input_representation: DatadogAPIClient::V1::LogsDecoderProcessorInputRepresentation::UTF_8,
20+
}),
21+
],
22+
tags: [],
23+
})
24+
p api_instance.create_logs_pipeline(body)

features/v1/logs_pipelines.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ Feature: Logs Pipelines
7070
When the request is sent
7171
Then the response status is 200 OK
7272

73+
@team:DataDog/event-platform-experience
74+
Scenario: Create a pipeline with Decoder Processor returns "OK" response
75+
Given new "CreateLogsPipeline" request
76+
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": []}
77+
When the request is sent
78+
Then the response status is 200 OK
79+
7380
@team:DataDog/event-platform-experience
7481
Scenario: Create a pipeline with Span Id Remapper returns "OK" response
7582
Given new "CreateLogsPipeline" request

lib/datadog_api_client/inflector.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ def overrides
248248
"v1.logs_daily_limit_reset" => "LogsDailyLimitReset",
249249
"v1.logs_date_remapper" => "LogsDateRemapper",
250250
"v1.logs_date_remapper_type" => "LogsDateRemapperType",
251+
"v1.logs_decoder_processor" => "LogsDecoderProcessor",
252+
"v1.logs_decoder_processor_binary_to_text_encoding" => "LogsDecoderProcessorBinaryToTextEncoding",
253+
"v1.logs_decoder_processor_input_representation" => "LogsDecoderProcessorInputRepresentation",
254+
"v1.logs_decoder_processor_type" => "LogsDecoderProcessorType",
251255
"v1.logs_exclusion" => "LogsExclusion",
252256
"v1.logs_exclusion_filter" => "LogsExclusionFilter",
253257
"v1.logs_filter" => "LogsFilter",

0 commit comments

Comments
 (0)