Skip to content
Open
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
123 changes: 123 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63949,6 +63949,7 @@ components:
- $ref: "#/components/schemas/ObservabilityPipelineSplunkTcpSource"
- $ref: "#/components/schemas/ObservabilityPipelineSumoLogicSource"
- $ref: "#/components/schemas/ObservabilityPipelineSyslogNgSource"
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSource"
- $ref: "#/components/schemas/ObservabilityPipelineOpentelemetrySource"
ObservabilityPipelineCrowdStrikeNextGenSiemDestination:
description: |-
Expand Down Expand Up @@ -68605,6 +68606,128 @@ components:
required:
- crt_file
type: object
ObservabilityPipelineWebsocketSource:
description: |-
The `websocket` source ingests logs from a WebSocket server using the `ws://` or `wss://` protocol.

**Supported pipeline types:** logs.
properties:
auth_strategy:
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceAuthStrategy"
custom_key:
description: Name of the environment variable or secret that holds the custom authorization header value. Used when `auth_strategy` is `custom`.
example: WS_AUTH_CUSTOM_HEADER
type: string
decoding:
$ref: "#/components/schemas/ObservabilityPipelineDecoding"
id:
description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components).
example: websocket-source
type: string
password_key:
description: Name of the environment variable or secret that holds the password. Used when `auth_strategy` is `basic`.
example: WS_AUTH_PASSWORD
type: string
tls:
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTls"
token_key:
description: Name of the environment variable or secret that holds the bearer token. Used when `auth_strategy` is `bearer`.
example: WS_BEARER_TOKEN
type: string
type:
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceType"
uri_key:
description: Name of the environment variable or secret that holds the WebSocket server URI (`ws://` or `wss://`).
example: WS_URI
type: string
username_key:
description: Name of the environment variable or secret that holds the username. Used when `auth_strategy` is `basic`.
example: WS_AUTH_USERNAME
type: string
required:
- id
- type
- decoding
- auth_strategy
type: object
x-pipeline-types: [logs]
ObservabilityPipelineWebsocketSourceAuthStrategy:
description: Authentication strategy for the WebSocket source connection.
enum:
- none
- basic
- bearer
- custom
example: bearer
type: string
x-enum-varnames:
- NONE
- BASIC
- BEARER
- CUSTOM
ObservabilityPipelineWebsocketSourceTls:
description: TLS configuration for the WebSocket source. Use `enabled` for standard `wss://` connections, or `with_client_cert` to present a client certificate for mutual TLS.
oneOf:
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsEnabled"
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsWithClientCert"
ObservabilityPipelineWebsocketSourceTlsEnabled:
description: TLS configuration that enables encryption without a client certificate. Use this for standard `wss://` connections that do not require mutual TLS.
properties:
mode:
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsEnabledMode"
required:
- mode
type: object
ObservabilityPipelineWebsocketSourceTlsEnabledMode:
description: TLS mode. Must be `enabled`.
enum:
- enabled
example: enabled
type: string
x-enum-varnames:
- ENABLED
ObservabilityPipelineWebsocketSourceTlsWithClientCert:
description: TLS configuration that enables encryption and presents a client certificate for mutual TLS authentication.
properties:
ca_file:
description: Path to the Certificate Authority (CA) file used to validate the remote server's TLS certificate.
example: /path/to/ca.crt
type: string
crt_file:
description: Path to the TLS client certificate file used to identify this source to the remote server.
example: /path/to/client.crt
type: string
key_file:
description: Path to the private key file associated with the client certificate.
example: /path/to/client.key
type: string
key_pass_key:
description: Name of the environment variable or secret that holds the passphrase for the private key file.
example: WS_TLS_KEY_PASSPHRASE
type: string
mode:
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsWithClientCertMode"
required:
- mode
- crt_file
type: object
ObservabilityPipelineWebsocketSourceTlsWithClientCertMode:
description: TLS mode. Must be `with_client_cert`.
enum:
- with_client_cert
example: with_client_cert
type: string
x-enum-varnames:
- WITH_CLIENT_CERT
ObservabilityPipelineWebsocketSourceType:
default: websocket
description: The source type. The value should always be `websocket`.
enum:
- websocket
example: websocket
type: string
x-enum-varnames:
- WEBSOCKET
OktaAPIToken:
description: The definition of the `OktaAPIToken` object.
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-06-22T19:51:31.598Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Validate an observability pipeline with websocket source bearer auth returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ObservabilityPipelinesAPI.new

body = DatadogAPIClient::V2::ObservabilityPipelineSpec.new({
data: DatadogAPIClient::V2::ObservabilityPipelineSpecData.new({
attributes: DatadogAPIClient::V2::ObservabilityPipelineDataAttributes.new({
config: DatadogAPIClient::V2::ObservabilityPipelineConfig.new({
destinations: [
DatadogAPIClient::V2::ObservabilityPipelineDatadogLogsDestination.new({
id: "datadog-logs-destination",
inputs: [
"my-processor-group",
],
type: DatadogAPIClient::V2::ObservabilityPipelineDatadogLogsDestinationType::DATADOG_LOGS,
}),
],
processor_groups: [
DatadogAPIClient::V2::ObservabilityPipelineConfigProcessorGroup.new({
enabled: true,
id: "my-processor-group",
include: "service:my-service",
inputs: [
"websocket-source",
],
processors: [
DatadogAPIClient::V2::ObservabilityPipelineFilterProcessor.new({
enabled: true,
id: "filter-processor",
include: "status:error",
type: DatadogAPIClient::V2::ObservabilityPipelineFilterProcessorType::FILTER,
}),
],
}),
],
sources: [
DatadogAPIClient::V2::ObservabilityPipelineWebsocketSource.new({
id: "websocket-source",
type: DatadogAPIClient::V2::ObservabilityPipelineWebsocketSourceType::WEBSOCKET,
decoding: DatadogAPIClient::V2::ObservabilityPipelineDecoding::DECODE_JSON,
auth_strategy: DatadogAPIClient::V2::ObservabilityPipelineWebsocketSourceAuthStrategy::BEARER,
token_key: "WS_BEARER_TOKEN",
uri_key: "WS_URI",
tls: DatadogAPIClient::V2::ObservabilityPipelineWebsocketSourceTlsEnabled.new({
mode: DatadogAPIClient::V2::ObservabilityPipelineWebsocketSourceTlsEnabledMode::ENABLED,
}),
}),
],
}),
name: "Pipeline with WebSocket Source",
}),
type: "pipelines",
}),
})
p api_instance.validate_pipeline(body)
8 changes: 8 additions & 0 deletions features/v2/observability_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,11 @@ Feature: Observability Pipelines
When the request is sent
Then the response status is 200 OK
And the response "errors" has length 0

@team:DataDog/observability-pipelines
Scenario: Validate an observability pipeline with websocket source bearer auth returns "OK" response
Given new "ValidatePipeline" request
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["websocket-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "websocket-source", "type": "websocket", "decoding": "json", "auth_strategy": "bearer", "token_key": "WS_BEARER_TOKEN", "uri_key": "WS_URI", "tls": {"mode": "enabled"}}]}, "name": "Pipeline with WebSocket Source"}, "type": "pipelines"}}
When the request is sent
Then the response status is 200 OK
And the response "errors" has length 0
8 changes: 8 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5182,6 +5182,14 @@ def overrides
"v2.observability_pipeline_throttle_processor" => "ObservabilityPipelineThrottleProcessor",
"v2.observability_pipeline_throttle_processor_type" => "ObservabilityPipelineThrottleProcessorType",
"v2.observability_pipeline_tls" => "ObservabilityPipelineTls",
"v2.observability_pipeline_websocket_source" => "ObservabilityPipelineWebsocketSource",
"v2.observability_pipeline_websocket_source_auth_strategy" => "ObservabilityPipelineWebsocketSourceAuthStrategy",
"v2.observability_pipeline_websocket_source_tls" => "ObservabilityPipelineWebsocketSourceTls",
"v2.observability_pipeline_websocket_source_tls_enabled" => "ObservabilityPipelineWebsocketSourceTlsEnabled",
"v2.observability_pipeline_websocket_source_tls_enabled_mode" => "ObservabilityPipelineWebsocketSourceTlsEnabledMode",
"v2.observability_pipeline_websocket_source_tls_with_client_cert" => "ObservabilityPipelineWebsocketSourceTlsWithClientCert",
"v2.observability_pipeline_websocket_source_tls_with_client_cert_mode" => "ObservabilityPipelineWebsocketSourceTlsWithClientCertMode",
"v2.observability_pipeline_websocket_source_type" => "ObservabilityPipelineWebsocketSourceType",
"v2.oci_config" => "OCIConfig",
"v2.oci_config_attributes" => "OCIConfigAttributes",
"v2.oci_configs_response" => "OCIConfigsResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def openapi_one_of
:'ObservabilityPipelineSplunkTcpSource',
:'ObservabilityPipelineSumoLogicSource',
:'ObservabilityPipelineSyslogNgSource',
:'ObservabilityPipelineWebsocketSource',
:'ObservabilityPipelineOpentelemetrySource'
]
end
Expand Down
Loading
Loading