持久提交与审计证据保全
原能力
持久保存审计证据、签名、更正链及保全状态,审计投影不得反写业务账。(合同附件 R7 23.7)
首选项目
Temporal Python SDK(MIT,限 SDK)。 Temporal Python SDK
匹配范围
持久提交历史、账分录和链路关联。
源码
Temporal Python SDK · def get_workflow_handle(
temporalio/client/_client.py · 868–881 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def get_workflow_handle(
self,
workflow_id: str,
*,
run_id: str | None = None,
first_execution_run_id: str | None = None,
result_type: type | None = None,
) -> WorkflowHandle[Any, Any]:
"""Get a workflow handle to an existing workflow by its ID.
Args:
workflow_id: Workflow ID to get a handle to.
run_id: Run ID that will be used for all calls.
first_execution_run_id: First execution run ID used for cancellation
Formance Ledger · func (s *Server) handleCreateTransaction(
internal/adapter/http/handlers_create_transaction.go · 13–26 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
func (s *Server) handleCreateTransaction(w http.ResponseWriter, r *http.Request) {
ledgerName, ok := requireLedgerName(w, r)
if !ok {
return
}
// Decode request body into protobuf CreateTransactionPayload.
// The custom UnmarshalJSON in service.pb.json.go drives field naming
// from the public camelCase contract (scriptReference, accountMetadata,
// …) — the default protoc-gen-go tags are snake_case and would silently
// drop multi-word keys (#452).
req := &servicepb.CreateTransactionPayload{}
err := json.UnmarshalRead(r.Body, req)
OpenTelemetry Python · def start_span(
opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py · 1219–1232 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def start_span( # pylint: disable=too-many-locals
self,
name: str,
context: context_api.Context | None = None,
kind: trace_api.SpanKind = trace_api.SpanKind.INTERNAL,
attributes: types.Attributes = None,
links: Sequence[trace_api.Link] | None = (),
start_time: int | None = None,
record_exception: bool = True,
set_status_on_exception: bool = True,
) -> trace_api.Span:
links = links or ()
parent_span_context = trace_api.get_current_span(context).get_span_context()
- # Copyright The OpenTelemetry Authors
- # SPDX-License-Identifier: Apache-2.0
实现与验收要点
权威审计、证据保全、写权限、长期保留与防篡改。