Class: Temporalio::Internal::Worker::WorkflowInstance::ReplaySafeMetric

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb

Overview

Wrapper for a metric that does not log on replay.

Defined Under Namespace

Classes: Meter

Instance Method Summary collapse

Instance Method Details

#record(value, additional_attributes: nil) ⇒ Object

[View source]

11
12
13
14
15
# File 'lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb', line 11

def record(value, additional_attributes: nil)
  return if Temporalio::Workflow.in_workflow? && Temporalio::Workflow::Unsafe.replaying?

  super
end

#with_additional_attributes(additional_attributes) ⇒ Object

[View source]

17
18
19
# File 'lib/temporalio/internal/worker/workflow_instance/replay_safe_metric.rb', line 17

def with_additional_attributes(additional_attributes)
  ReplaySafeMetric.new(super)
end