Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a703de2
feat: Introduce telemetry tracking for sensitive field types
ogabrielluiz Oct 6, 2025
369c9ec
feat: Enhance telemetry payloads with additional fields and serializa…
ogabrielluiz Oct 6, 2025
1dd2398
feat: Implement telemetry input tracking and caching
ogabrielluiz Oct 6, 2025
3978a49
feat: Add logging for component input telemetry
ogabrielluiz Oct 6, 2025
e2ba2f7
feat: Enhance telemetry logging for component execution
ogabrielluiz Oct 6, 2025
cf7710e
feat: Extend telemetry payload tests and enhance serialization
ogabrielluiz Oct 6, 2025
fbaedfc
Merge branch 'main' into per-component-telemetry-payload
ogabrielluiz Oct 13, 2025
53e5f73
fix: Update default telemetry tracking behavior in BaseInputMixin
ogabrielluiz Oct 13, 2025
0b599c7
fix: Update telemetry tracking defaults for input types
ogabrielluiz Oct 13, 2025
ebb39fb
feat: add chunk_index and total_chunks fields to ComponentInputsPayload
ogabrielluiz Oct 13, 2025
a77f14e
refactor: update ComponentInputsPayload to support automatic splittin…
ogabrielluiz Oct 13, 2025
35f70c0
refactor: enhance log_package_component_inputs to handle oversized pa…
ogabrielluiz Oct 13, 2025
0823bdf
refactor: centralize maximum telemetry URL size constant
ogabrielluiz Oct 13, 2025
cbe0739
refactor: update ComponentInputsPayload tests to use dictionary inputs
ogabrielluiz Oct 13, 2025
e2b1f60
test: add integration tests for telemetry service payload splitting
ogabrielluiz Oct 13, 2025
b49b328
test: enhance ComponentInputsPayload tests with additional scenarios
ogabrielluiz Oct 13, 2025
2594e23
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 13, 2025
8098fff
optimize query param encoding
ogabrielluiz Oct 13, 2025
da23b6a
refactor: extract telemetry logging logic into a separate function
ogabrielluiz Oct 13, 2025
4835413
refactor: optimize truncation logic in ComponentInputsPayload
ogabrielluiz Oct 13, 2025
1198b88
refactor: update telemetry tracking logic to respect opt-in flag
ogabrielluiz Oct 13, 2025
735e157
refactor: update tests to use dictionary format for component inputs
ogabrielluiz Oct 13, 2025
d4ffdd7
Merge branch 'main' into per-component-telemetry-payload
ogabrielluiz Oct 13, 2025
2f9a66a
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 13, 2025
fe2933a
refactor: specify type for current_chunk_inputs in ComponentInputsPay…
ogabrielluiz Oct 14, 2025
eed11ca
test: add component_id to ComponentPayload tests
ogabrielluiz Oct 14, 2025
762f4b4
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 14, 2025
fe6156e
feat: add component_id to ComponentPayload in build_vertex function
ogabrielluiz Oct 14, 2025
a58d57c
fix: update MAX_TELEMETRY_URL_SIZE to 2048 and adjust related tests
ogabrielluiz Oct 14, 2025
7e0f690
Merge branch 'main' into per-component-telemetry-payload
ogabrielluiz Oct 24, 2025
fab4857
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 24, 2025
65af5a2
merge main
ogabrielluiz Nov 14, 2025
91d9977
feat(telemetry): add track_in_telemetry field to starter project conf…
ogabrielluiz Nov 14, 2025
61b828e
refactor(telemetry): remove unused blank line in test imports
ogabrielluiz Nov 14, 2025
1187286
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 14, 2025
8014b80
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Nov 14, 2025
8468260
[autofix.ci] apply automated fixes (attempt 3/3)
autofix-ci[bot] Nov 14, 2025
e77495c
merge main
ogabrielluiz Nov 14, 2025
8480e6d
update starter templates
ogabrielluiz Nov 14, 2025
21b924b
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 14, 2025
d8ce0d4
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Nov 14, 2025
cab1687
[autofix.ci] apply automated fixes (attempt 3/3)
autofix-ci[bot] Nov 14, 2025
db6eb6e
Merge branch 'main' into per-component-telemetry-payload
ogabrielluiz Nov 14, 2025
0604d60
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 14, 2025
7a5cfd6
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Nov 14, 2025
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
10 changes: 10 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,16 @@
"line_number": 36,
"is_secret": false
}
],
"src/lfx/src/lfx/inputs/input_mixin.py": [
{
"type": "Secret Keyword",
"filename": "src/lfx/src/lfx/inputs/input_mixin.py",
"hashed_secret": "3442496b96dd01591a8cd44b1eec1368ab728aba",
"is_verified": false,
"line_number": 21,
"is_secret": false
}
]
},
"generated_at": "2025-11-10T17:33:14Z"
Expand Down
37 changes: 36 additions & 1 deletion src/backend/base/langflow/api/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,29 @@
from langflow.services.database.models.flow.model import Flow
from langflow.services.deps import get_chat_service, get_telemetry_service, session_scope
from langflow.services.job_queue.service import JobQueueNotFoundError, JobQueueService
from langflow.services.telemetry.schema import ComponentPayload, PlaygroundPayload
from langflow.services.telemetry.schema import ComponentInputsPayload, ComponentPayload, PlaygroundPayload


def _log_component_input_telemetry(
vertex,
vertex_id: str,
component_run_id: str,
background_tasks: BackgroundTasks,
telemetry_service,
) -> None:
"""Log component input telemetry if available."""
if hasattr(vertex, "custom_component") and vertex.custom_component:
inputs_dict = vertex.custom_component.get_telemetry_input_values()
if inputs_dict:
background_tasks.add_task(
telemetry_service.log_package_component_inputs,
ComponentInputsPayload(
component_run_id=component_run_id,
component_id=vertex_id,
component_name=vertex_id.split("-")[0],
component_inputs=inputs_dict,
),
)


async def start_flow_build(
Expand Down Expand Up @@ -294,6 +316,7 @@ async def _build_vertex(vertex_id: str, graph: Graph, event_manager: EventManage
top_level_vertices = []
start_time = time.perf_counter()
error_message = None

try:
vertex = graph.get_vertex(vertex_id)
try:
Expand Down Expand Up @@ -388,21 +411,33 @@ async def _build_vertex(vertex_id: str, graph: Graph, event_manager: EventManage
id=vertex.id,
data=result_data_response,
)

# Extract and send component input telemetry (separate payload)
_log_component_input_telemetry(vertex, vertex_id, graph.run_id, background_tasks, telemetry_service)

# Send component execution telemetry
background_tasks.add_task(
telemetry_service.log_package_component,
ComponentPayload(
component_name=vertex_id.split("-")[0],
component_id=vertex_id,
component_seconds=int(time.perf_counter() - start_time),
component_success=valid,
component_error_message=error_message,
component_run_id=graph.run_id,
),
)
except Exception as exc:
if "vertex" in locals():
# Extract and send component input telemetry even on error (separate payload)
_log_component_input_telemetry(vertex, vertex_id, graph.run_id, background_tasks, telemetry_service)

# Send component execution telemetry (error case)
background_tasks.add_task(
telemetry_service.log_package_component,
ComponentPayload(
component_name=vertex_id.split("-")[0],
component_id=vertex_id,
component_seconds=int(time.perf_counter() - start_time),
component_success=False,
component_error_message=str(exc),
Expand Down
2 changes: 2 additions & 0 deletions src/backend/base/langflow/api/v1/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ async def build_vertex(
telemetry_service.log_package_component,
ComponentPayload(
component_name=vertex_id.split("-")[0],
component_id=vertex_id,
component_seconds=int(time.perf_counter() - start_time),
component_success=valid,
component_error_message=error_message,
Expand All @@ -407,6 +408,7 @@ async def build_vertex(
telemetry_service.log_package_component,
ComponentPayload(
component_name=vertex_id.split("-")[0],
component_id=vertex_id,
component_seconds=int(time.perf_counter() - start_time),
component_success=False,
component_error_message=str(exc),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -2293,6 +2294,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -2513,6 +2515,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1465,6 +1466,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1685,6 +1687,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1864,6 +1865,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -2084,6 +2086,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1489,6 +1490,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1709,6 +1711,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1120,6 +1121,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1340,6 +1342,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1550,6 +1551,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1770,6 +1772,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1917,6 +1918,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -2137,6 +2139,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2747,6 +2747,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -2890,6 +2891,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -3110,6 +3112,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1179,6 +1180,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1399,6 +1401,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down Expand Up @@ -1256,6 +1257,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": true,
"type": "int",
"value": ""
},
Expand Down Expand Up @@ -1476,6 +1478,7 @@
"title_case": false,
"tool_mode": false,
"trace_as_metadata": true,
"track_in_telemetry": false,
"type": "str",
"value": ""
},
Expand Down
Loading
Loading