grpc.go ×9

Frontier kind: Code frontier

unlabeled · c_d904e08421d0

5 tests · 1175 LOC · 50 files · introduces 0 tests · 44 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges44 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
110 ranges1175 lines · 50 files · Browse complete extent
All tests (intent)
5 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

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 native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationfx.go ×1 · 4 introduced LOCfx.go ×1collector.go ×7 · 33 introduced LOCcollector.go ×7data_store_factory.go ×29 · 703 introduced LOCdata_store_factory.go ×2…grpc.go ×1 · 7 introduced LOCgrpc.go ×1grpc.go ×1 · 3 introduced LOCgrpc.go ×1annotate_span_with_workflow_tags · 0 introduced LOCannotate_span_with_workf…grpc.go ×2 · 13 introduced LOCgrpc.go ×2workflow_service_server_gen.go ×1 · 2 introduced LOCworkflow_service_server_…grpc.go ×1 · 6 introduced LOCgrpc.go ×1workflow_service_server_gen.go ×1 · 5 introduced LOCworkflow_service_server_…workflow_service_server_gen.go ×1 · 4 introduced LOCworkflow_service_server_…workflow_tags.go ×1 · 1 introduced LOCworkflow_tags.go ×1workflow_tags.go ×1 · 2 introduced LOCworkflow_tags.go ×1grpc.go ×1 · 2 introduced LOCgrpc.go ×1workflow_tags.go ×1 · 6 introduced LOCworkflow_tags.go ×1config.go ×1 · 3 introduced LOCconfig.go ×1grpc.go ×1 · 4 introduced LOCgrpc.go ×1serializer.go ×1 · 3 introduced LOCserializer.go ×1tags.go ×1 · 3 introduced LOCtags.go ×1tags.go ×1 · 3 introduced LOCtags.go ×1service.pb.go ×2 · 342 introduced LOCservice.pb.go ×2message.pb.go ×2 · 442 introduced LOCmessage.pb.go ×2zap_tag.go ×1 · 7 introduced LOCzap_tag.go ×1zap_tag.go ×1 · 3 introduced LOCzap_tag.go ×1tags.go ×9 · 37 introduced LOCtags.go ×9message.pb.go ×2 · 49 introduced LOCmessage.pb.go ×2cluster.pb.go ×2 · 200 introduced LOCcluster.pb.go ×2message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/api/adminservice/v1/request_response.pb.go · 6661 LOCv1/request_response.pb.g…go.temporal.io/server/api/adminservice/v1/service.pb.go · 297 LOCv1/service.pb.gogo.temporal.io/server/api/clock/v1/message.pb.go · 217 LOCv1/message.pb.gogo.temporal.io/server/api/cluster/v1/message.pb.go · 366 LOCv1/message.pb.gogo.temporal.io/server/api/common/v1/api_category.pb.go · 230 LOCv1/api_category.pb.gogo.temporal.io/server/api/common/v1/dlq.pb.go · 319 LOCv1/dlq.pb.gogo.temporal.io/server/api/deployment/v1/message.pb.go · 4650 LOCv1/message.pb.gogo.temporal.io/server/api/enums/v1/cluster.pb.go · 233 LOCv1/cluster.pb.gogo.temporal.io/server/api/enums/v1/common.pb.go · 288 LOCv1/common.pb.gogo.temporal.io/server/api/enums/v1/dlq.pb.go · 211 LOCv1/dlq.pb.gogo.temporal.io/server/api/enums/v1/fairness_state.pb.go · 147 LOCv1/fairness_state.pb.gogo.temporal.io/server/api/enums/v1/nexus.pb.go · 182 LOCv1/nexus.pb.gogo.temporal.io/server/api/enums/v1/predicate.pb.go · 194 LOCv1/predicate.pb.gogo.temporal.io/server/api/enums/v1/replication.pb.go · 338 LOCv1/replication.pb.gogo.temporal.io/server/api/enums/v1/task.pb.go · 480 LOCv1/task.pb.gogo.temporal.io/server/api/enums/v1/workflow.pb.go · 299 LOCv1/workflow.pb.gogo.temporal.io/server/api/enums/v1/workflow_task_type.pb.go · 148 LOCv1/workflow_task_type.pb…go.temporal.io/server/api/health/v1/message.pb.go · 324 LOCv1/message.pb.gogo.temporal.io/server/api/history/v1/message.pb.go · 522 LOCv1/message.pb.gogo.temporal.io/server/api/historyservice/v1/request_response.pb.go · 12003 LOCv1/request_response.pb.g…go.temporal.io/server/api/historyservice/v1/service.pb.go · 452 LOCv1/service.pb.gogo.temporal.io/server/api/matchingservice/v1/request_response.pb.go · 6878 LOCv1/request_response.pb.g…go.temporal.io/server/api/matchingservice/v1/service.pb.go · 274 LOCv1/service.pb.gogo.temporal.io/server/api/namespace/v1/message.pb.go · 138 LOCv1/message.pb.gogo.temporal.io/server/api/persistence/v1/chasm.pb.go · 1215 LOCv1/chasm.pb.gogo.temporal.io/server/api/persistence/v1/chasm_visibility.pb.go · 170 LOCv1/chasm_visibility.pb.g…go.temporal.io/server/api/persistence/v1/cluster_metadata.pb.go · 313 LOCv1/cluster_metadata.pb.g…go.temporal.io/server/api/persistence/v1/executions.pb.go · 5768 LOCv1/executions.pb.gogo.temporal.io/server/api/persistence/v1/history_tree.pb.go · 298 LOCv1/history_tree.pb.gogo.temporal.io/server/api/persistence/v1/hsm.pb.go · 929 LOCv1/hsm.pb.gogo.temporal.io/server/api/persistence/v1/namespaces.pb.go · 560 LOCv1/namespaces.pb.gogo.temporal.io/server/api/persistence/v1/nexus.pb.go · 509 LOCv1/nexus.pb.gogo.temporal.io/server/api/persistence/v1/predicates.pb.go · 864 LOCv1/predicates.pb.gogo.temporal.io/server/api/persistence/v1/queue_metadata.pb.go · 129 LOCv1/queue_metadata.pb.gogo.temporal.io/server/api/persistence/v1/queues.pb.go · 641 LOCv1/queues.pb.gogo.temporal.io/server/api/persistence/v1/task_queues.pb.go · 924 LOCv1/task_queues.pb.gogo.temporal.io/server/api/persistence/v1/tasks.pb.go · 870 LOCv1/tasks.pb.gogo.temporal.io/server/api/persistence/v1/update.pb.go · 455 LOCv1/update.pb.gogo.temporal.io/server/api/persistence/v1/workflow_mutable_state.pb.go · 560 LOCv1/workflow_mutable_stat…go.temporal.io/server/api/replication/v1/message.pb.go · 2481 LOCv1/message.pb.gogo.temporal.io/server/api/taskqueue/v1/message.pb.go · 1363 LOCv1/message.pb.gogo.temporal.io/server/api/token/v1/message.pb.go · 809 LOCv1/message.pb.gogo.temporal.io/server/api/workflow/v1/message.pb.go · 302 LOCv1/message.pb.gogo.temporal.io/server/common/log/tag/tags.go · 1039 LOCtag/tags.gogo.temporal.io/server/common/log/tag/zap_tag.go · 242 LOCtag/zap_tag.gogo.temporal.io/server/common/persistence/client/fx.go · 241 LOCclient/fx.gogo.temporal.io/server/common/persistence/telemetry/cluster_metadata_store_gen.go · 314 LOCtelemetry/cluster_metada…go.temporal.io/server/common/persistence/telemetry/data_store_factory.go · 140 LOCtelemetry/data_store_fac…go.temporal.io/server/common/persistence/telemetry/execution_store_gen.go · 986 LOCtelemetry/execution_stor…go.temporal.io/server/common/persistence/telemetry/nexus_endpoint_store_gen.go · 195 LOCtelemetry/nexus_endpoint…go.temporal.io/server/common/persistence/telemetry/queue_gen.go · 483 LOCtelemetry/queue_gen.gogo.temporal.io/server/common/persistence/telemetry/queue_v2_gen.go · 251 LOCtelemetry/queue_v2_gen.g…go.temporal.io/server/common/persistence/telemetry/shard_store_gen.go · 342 LOCtelemetry/shard_store_ge…go.temporal.io/server/common/persistence/telemetry/shared_store_gen.go · 153 LOCtelemetry/shared_store_g…go.temporal.io/server/common/persistence/telemetry/task_store_gen.go · 566 LOCtelemetry/task_store_gen…go.temporal.io/server/common/resource/fx.go · 533 LOCresource/fx.gogo.temporal.io/server/common/rpc/interceptor/logtags/admin_service_server_gen.go · 231 LOClogtags/admin_service_se…go.temporal.io/server/common/rpc/interceptor/logtags/history_service_server_gen.go · 486 LOClogtags/history_service_…go.temporal.io/server/common/rpc/interceptor/logtags/matching_service_server_gen.go · 198 LOClogtags/matching_service…go.temporal.io/server/common/rpc/interceptor/logtags/workflow_service_server_gen.go · 663 LOClogtags/workflow_service…go.temporal.io/server/common/rpc/interceptor/logtags/workflow_tags.go · 63 LOClogtags/workflow_tags.gogo.temporal.io/server/common/tasktoken/serializer.go · 58 LOCtasktoken/serializer.gogo.temporal.io/server/common/telemetry/config.go · 422 LOCtelemetry/config.gogo.temporal.io/server/common/telemetry/grpc.go · 197 LOCtelemetry/grpc.gogo.temporal.io/server/common/testing/testtelemetry/collector.go · 72 LOCtesttelemetry/collector.…go.temporal.io/server/service/frontend/fx.go · 1057 LOCfrontend/fx.gogo.temporal.io/server/service/fx.go · 180 LOCservice/fx.gogo.temporal.io/server/service/history/queues/executable.go · 979 LOCqueues/executable.gogo.temporal.io/server/temporal/fx.go · 1273 LOCtemporal/fx.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…response_payload_in_debug_mode · introduced test · go.temporal.io/server/common/telemetry/Test_ServerStatsHandler/annotate_span_with_request/response_payload_in_debug_moderesponse_payload_in_debu…annotate_span_with_response_error_payload_in_debug_mode · introduced test · go.temporal.io/server/common/telemetry/Test_ServerStatsHandler/annotate_span_with_response_error_payload_in_debug_modeannotate_span_with_respo…annotate_span_with_workflow_tags · introduced test · go.temporal.io/server/common/telemetry/Test_ServerStatsHandler/annotate_span_with_workflow_tagsannotate_span_with_workf…with_OTEL_Collector_running · introduced test · go.temporal.io/server/temporal/TestNewServerWithOTEL/with_OTEL_Collector_runningwith_OTEL_Collector_runn…without_OTEL_Collector_running · introduced test · go.temporal.io/server/temporal/TestNewServerWithOTEL/without_OTEL_Collector_runningwithout_OTEL_Collector_r…Focused concept · grpc.go ×9 · 44 introduced LOCgrpc.go ×9

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 44 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/telemetry/grpc.go 44 introduced LOC · 9 ranges

Open complete file

49 }
50
51 > return newCustomServerStatsHandler( grpc.go
52 > otelgrpc.NewServerHandler(
53 > otelgrpc.WithPropagators(tmp),
54 > otelgrpc.WithTracerProvider(tp),
55 > ),
56 > logger)
57 }
58
78 handler stats.Handler,
79 logger log.Logger,
80 > ) *customServerStatsHandler { grpc.go
81 > return &customServerStatsHandler{
82 > wrapped: handler,
83 > isDebug: DebugMode(),
84 > tags: logtags.NewWorkflowTags(tasktoken.NewSerializer(), logger),
85 > }
86 > }
87
88 > func (c *customServerStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context { grpc.go
89 > return c.wrapped.TagRPC(
90 > context.WithValue(ctx, methodNameKey{}, info.FullMethodName),
91 > info)
92 > }
93
94 > func (c *customServerStatsHandler) HandleRPC(ctx context.Context, stat stats.RPCStats) { grpc.go
95 > // handling `End` before wrapped stats.Handler since it closes the span
96 > switch s := stat.(type) {
97 > case *stats.End:
98 > // annotate with gRPC error payload
99 > if c.isDebug {
100 span := trace.SpanFromContext(ctx)
101
109 }
110
111 > c.wrapped.HandleRPC(ctx, stat) grpc.go
112 >
113 > switch s := stat.(type) {
114 case *stats.InHeader:
115 if c.isDebug {
123 }
124 }
125 > case *stats.InPayload: grpc.go
126 > span := trace.SpanFromContext(ctx)
127 > c.annotateTags(ctx, span, s.Payload)
128 >
129 > // annotate with gRPC request payload
130 > if c.isDebug {
131 //revive:disable-next-line:unchecked-type-assertion
132 reqMsg := s.Payload.(proto.Message)
163 span trace.Span,
164 payload any,
165 > ) { grpc.go
166 > methodName, ok := ctx.Value(methodNameKey{}).(string)
167 > if !ok {
168 methodName = "unknown"
169 }
170
171 // annotate span with workflow tags (same ones the Temporal SDKs use)
172 > for _, logTag := range c.tags.Extract(payload, methodName) { grpc.go
173 > var k string
174 > switch logTag.Key() {
175 > case tag.WorkflowIDKey:
176 > k = WorkflowIDKey
177 > case tag.WorkflowRunIDKey:
178 > k = RunIDKey
179 default:
180 continue
181 }
182 > span.SetAttributes(attribute.Key(k).String(logTag.Value().(string))) grpc.go
183 }
184 }