go.temporal.io/server/common/metrics/defs.go

76 LOC · 47 covered · 29 uncovered · 9 ranges · 23629 concepts · 5 introducers · 11564 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filego.temporal.io/server/api/metrics/v1/message.pb.go · 128 LOCv1/message.pb.gogo.temporal.io/server/common/build/build.go · 56 LOCbuild/build.gogo.temporal.io/server/common/metrics/defs_base.go · 30 LOCmetrics/defs_base.gogo.temporal.io/server/common/metrics/noop_impl.go · 58 LOCmetrics/noop_impl.gogo.temporal.io/server/common/metrics/option.go · 21 LOCmetrics/option.gogo.temporal.io/server/common/metrics/registry.go · 75 LOCmetrics/registry.goengine_mock.go ×2 · 22 introduced LOCengine_mock.go ×2api.go ×1 · 5 introduced LOCapi.go ×1executable_task.go ×17 · 102 introduced LOCexecutable_task.go ×17stream_receiver.go ×2 · 5 introduced LOCstream_receiver.go ×2executable_backfill_history_events_task.go ×1 · 13 introduced LOCexecutable_backfill_hist…executable_delete_execution_task.go ×1 · 14 introduced LOCexecutable_delete_execut…activity.go ×12 · 72 introduced LOCactivity.go ×12executable_task.go ×3 · 16 introduced LOCexecutable_task.go ×3engine_mock.go ×2 · 25 introduced LOCengine_mock.go ×2executable_verify_versioned_transition_task.go ×1 · 13 introduced LOCexecutable_verify_versio…stream_sender.go ×1 · 3 introduced LOCstream_sender.go ×1executable_workflow_state_task.go ×1 · 13 introduced LOCexecutable_workflow_stat…executable_sync_hsm_task.go ×1 · 13 introduced LOCexecutable_sync_hsm_task…executable_activity_state_task.go ×1 · 13 introduced LOCexecutable_activity_stat…executable_task.go ×5 · 31 introduced LOCexecutable_task.go ×5registry.go ×3 · 7 introduced LOCregistry.go ×3invariants.go ×3 · 14 introduced LOCinvariants.go ×3invariants.go ×2 · 8 introduced LOCinvariants.go ×2eager_namespace_refresher.go ×1 · 3 introduced LOCeager_namespace_refreshe…batchable_task_mock.go ×2 · 14 introduced LOCbatchable_task_mock.go ×…history_archiver.go ×2 · 6 introduced LOChistory_archiver.go ×2noop_impl.go ×1 · 3 introduced LOCnoop_impl.go ×1ExampleHandler · 0 introduced LOCExampleHandlercapture_handler.go ×1 · 2 introduced LOCcapture_handler.go ×1defs.go ×1 · 3 introduced LOCdefs.go ×1defs.go ×1 · 3 introduced LOCdefs.go ×1defs.go ×1 · 3 introduced LOCdefs.go ×1defs.go ×1 · 3 introduced LOCdefs.go ×1defs.go ×5 · 91 introduced LOCdefs.go ×5TestUpdateStartedActivityExecutionOptionsDoesNotBumpStartedStamp · introduced test · go.temporal.io/server/chasm/lib/activity/TestUpdateStartedActivityExecutionOptionsDoesNotBumpStartedStampTestUpdateStartedActivit…TestArchive_Success · introduced test · go.temporal.io/server/common/archiver/gcloud/TestHistoryArchiverSuite/TestArchive_SuccessTestArchive_SuccessExampleHandler · introduced test · go.temporal.io/server/common/metrics/ExampleHandlerExampleHandlerTestMutexMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestMutexMapBaggageTestMutexMapBaggageTestSyncMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestSyncMapBaggageTestSyncMapBaggageTestWatchInitialRefreshPaginationError · introduced test · go.temporal.io/server/common/namespace/nsregistry/TestRegistryWatchSuite/TestWatchInitialRefreshPaginationErrorTestWatchInitialRefreshP…Test_CacheRefreshRequired_ReturnCacheStaleError · introduced test · go.temporal.io/server/service/history/api/respondactivitytaskfailed/TestWorkflowSuite/Test_CacheRefreshRequired_ReturnCacheStaleErrorTest_CacheRefreshRequire…TestAck_AckIndividualTasks · introduced test · go.temporal.io/server/service/history/replication/TestBatchedTaskSuite/TestAck_AckIndividualTasksTestAck_AckIndividualTas…TestSyncNamespaceFromSourceCluster_NamespaceNotBelongsToCurrentCluster · introduced test · go.temporal.io/server/service/history/replication/TestEagerNamespaceRefresherSuite/TestSyncNamespaceFromSourceCluster_NamespaceNotBelongsToCurrentClusterTestSyncNamespaceFromSou…TestExecute_Skip_Namespace · introduced test · go.temporal.io/server/service/history/replication/TestExecutableActivityStateTaskSuite/TestExecute_Skip_NamespaceTestExecute_Skip_Namespa…TestExecute_Skip_Namespace · introduced test · go.temporal.io/server/service/history/replication/TestExecutableBackfillHistoryEventsTaskSuite/TestExecute_Skip_NamespaceTestExecute_Skip_Namespa…TestExecute_CurrentClusterActive_SkipsTask · introduced test · go.temporal.io/server/service/history/replication/TestExecutableDeleteExecutionTaskSuite/TestExecute_CurrentClusterActive_SkipsTaskTestExecute_CurrentClust…TestExecute_Skip_Namespace · introduced test · go.temporal.io/server/service/history/replication/TestExecutableSyncHSMTaskSuite/TestExecute_Skip_NamespaceTestExecute_Skip_Namespa…TestBackFillEvents_Success · introduced test · go.temporal.io/server/service/history/replication/TestExecutableTaskSuite/TestBackFillEvents_SuccessTestBackFillEvents_Succe…TestNackStateAttempt · introduced test · go.temporal.io/server/service/history/replication/TestExecutableTaskSuite/TestNackStateAttemptTestNackStateAttemptTestExecute_Skip_Namespace · introduced test · go.temporal.io/server/service/history/replication/TestExecutableVerifyVersionedTransitionTaskSuite/TestExecute_Skip_NamespaceTestExecute_Skip_Namespa…TestExecute_Skip_Namespace · introduced test · go.temporal.io/server/service/history/replication/TestExecutableWorkflowStateTaskSuite/TestExecute_Skip_NamespaceTestExecute_Skip_Namespa…TestSendEventLoop_Panic_Captured · introduced test · go.temporal.io/server/service/history/replication/TestStreamReceiverSuite/TestSendEventLoop_Panic_CapturedTestSendEventLoop_Panic_…TestRecvEventLoop_Panic_ShouldCaptureAsError · introduced test · go.temporal.io/server/service/history/replication/TestStreamSenderSuite/TestRecvEventLoop_Panic_ShouldCaptureAsErrorTestRecvEventLoop_Panic_…TestSendEventLoop_Panic_ShouldCaptureAsError · introduced test · go.temporal.io/server/service/history/replication/TestStreamSenderSuite/TestSendEventLoop_Panic_ShouldCaptureAsErrorTestSendEventLoop_Panic_…TestHandleSyncShardStatus_Success · introduced test · go.temporal.io/server/service/history/replication/TestTaskProcessorSuite/TestHandleSyncShardStatus_SuccessTestHandleSyncShardStatu…TestRunOverdueScan_ContinuesPastPerNamespaceErrors · introduced test · go.temporal.io/server/service/worker/scanner/scheduleinvariants/TestRunOverdueScan_ContinuesPastPerNamespaceErrorsTestRunOverdueScan_Conti…TestRunOverdueScan_StopsAtPerNamespaceCap · introduced test · go.temporal.io/server/service/worker/scanner/scheduleinvariants/TestRunOverdueScan_StopsAtPerNamespaceCapTestRunOverdueScan_Stops…Focused file · go.temporal.io/server/common/metrics/defs.go · 76 LOCmetrics/defs.go

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 package metrics
2
3 // types used/defined by the package
4 type (
5 histogramDefinition struct {
6 metricDefinition
7 }
8
9 counterDefinition struct {
10 metricDefinition
11 }
12
13 gaugeDefinition struct {
14 metricDefinition
15 }
16
17 timerDefinition struct {
18 metricDefinition
19 }
20 )
21
22 > func NewTimerDef(name string, opts ...Option) timerDefinition { defs.go ×5
23 > // This line cannot be combined with others!
24 > // This ensures the stack trace has information of the caller.
25 > def := newMetricDefinition(name, opts...)
26 > globalRegistry.register(def)
27 > return timerDefinition{def}
28 > }
29
30 > func NewBytesHistogramDef(name string, opts ...Option) histogramDefinition { defs.go ×5
31 > // This line cannot be combined with others!
32 > // This ensures the stack trace has information of the caller.
33 > def := newMetricDefinition(name, append(opts, WithUnit(Bytes))...)
34 > globalRegistry.register(def)
35 > return histogramDefinition{def}
36 > }
37
38 > func NewDimensionlessHistogramDef(name string, opts ...Option) histogramDefinition { defs.go ×5
39 > // This line cannot be combined with others!
40 > // This ensures the stack trace has information of the caller.
41 > def := newMetricDefinition(name, append(opts, WithUnit(Dimensionless))...)
42 > globalRegistry.register(def)
43 > return histogramDefinition{def}
44 > }
45
46 > func NewCounterDef(name string, opts ...Option) counterDefinition { defs.go ×5
47 > // This line cannot be combined with others!
48 > // This ensures the stack trace has information of the caller.
49 > def := newMetricDefinition(name, opts...)
50 > globalRegistry.register(def)
51 > return counterDefinition{def}
52 > }
53
54 > func NewGaugeDef(name string, opts ...Option) gaugeDefinition { defs.go ×5
55 > // This line cannot be combined with others!
56 > // This ensures the stack trace has information of the caller.
57 > def := newMetricDefinition(name, opts...)
58 > globalRegistry.register(def)
59 > return gaugeDefinition{def}
60 > }
61
62 > func (d histogramDefinition) With(handler Handler) HistogramIface { defs.go ×1
63 > return handler.Histogram(d.name, d.unit)
64 > }
65
66 > func (d counterDefinition) With(handler Handler) CounterIface { defs.go ×1
67 > return handler.Counter(d.name)
68 > }
69
70 > func (d gaugeDefinition) With(handler Handler) GaugeIface { defs.go ×1
71 > return handler.Gauge(d.name)
72 > }
73
74 > func (d timerDefinition) With(handler Handler) TimerIface { defs.go ×1
75 > return handler.Timer(d.name)
76 > }