Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for span id remapper in logs pipelines processors #27730

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-21 08:02:09.923530",
"spec_repo_commit": "8f2d39c3"
"regenerated": "2025-02-21 18:18:14.103443",
"spec_repo_commit": "5de91bd6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-21 08:02:18.314729",
"spec_repo_commit": "8f2d39c3"
"regenerated": "2025-02-21 18:18:22.362127",
"spec_repo_commit": "5de91bd6"
}
}
}
12 changes: 6 additions & 6 deletions content/en/api/v1/logs-pipelines/examples.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"filter": {
"query": "source:python"
},
"name": "testPipeline",
"processors": [
{
"type": "span-id-remapper",
"is_enabled": true,
"name": "test_filter",
"sources": [
"dd.span_id"
]
}
],
"tags": []
}
7 changes: 7 additions & 0 deletions data/api/v1/CodeExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,13 @@
"description": "Send logs returns \"Response from server (always 200 empty JSON).\" response"
}
],
"CreateLogsPipeline": [
{
"group": "logs_pipelines",
"suffix": "_2707101123",
"description": "Create a pipeline with Span Id Remapper returns \"OK\" response"
}
],
"SubmitDistributionPoints": [
{
"group": "metrics",
Expand Down
40 changes: 39 additions & 1 deletion data/api/v1/full_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6156,6 +6156,7 @@ components:
- $ref: '#/components/schemas/LogsLookupProcessor'
- $ref: '#/components/schemas/ReferenceTableLogsLookupProcessor'
- $ref: '#/components/schemas/LogsTraceRemapper'
- $ref: '#/components/schemas/LogsSpanRemapper'
LogsQueryCompute:
description: Define computation for a log query.
properties:
Expand Down Expand Up @@ -6267,6 +6268,43 @@ components:
x-enum-varnames:
- TIME_ASCENDING
- TIME_DESCENDING
LogsSpanRemapper:
description: "There are two ways to define correlation between application spans
and logs:\n\n 1. Follow the documentation on [how to inject a span ID in
the application logs](https://docs.datadoghq.com/tracing/connect_logs_and_traces).\n
\ Log integrations automatically handle all remaining setup steps by default.\n\n
\ 2. Use the span remapper processor to define a log attribute as its associated
span ID."
properties:
is_enabled:
default: false
description: Whether or not the processor is enabled.
type: boolean
name:
description: Name of the processor.
type: string
sources:
default:
- dd.span_id
description: Array of source attributes.
items:
description: Attribute to extract the span ID from.
type: string
type: array
type:
$ref: '#/components/schemas/LogsSpanRemapperType'
required:
- type
type: object
LogsSpanRemapperType:
default: span-id-remapper
description: Type of logs span remapper.
enum:
- span-id-remapper
example: span-id-remapper
type: string
x-enum-varnames:
- SPAN_ID_REMAPPER
LogsStatusRemapper:
description: "Use this Processor if you want to assign some attributes as the
official status.\n\nEach incoming status value is mapped as follows.\n\n -
Expand Down Expand Up @@ -6382,7 +6420,7 @@ components:
- dd.trace_id
description: Array of source attributes.
items:
description: Attribute to extract the Trace ID from.
description: Attribute to extract the trace ID from.
type: string
type: array
type:
Expand Down
Loading
Loading