config.go ×21

Frontier kind: Joint frontier

unlabeled · c_215fe4080b16

1 test · 1213 LOC · 46 files · introduces 1 test · 90 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
21 ranges90 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
118 ranges1213 lines · 46 files · Browse complete extent
All tests (intent)
1 testBrowse 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 specializationconfig.go ×4 · 15 introduced LOCconfig.go ×4config.go ×3 · 14 introduced LOCconfig.go ×3config.go ×2 · 4 introduced LOCconfig.go ×2service.pb.go ×2 · 342 introduced LOCservice.pb.go ×2message.pb.go ×2 · 442 introduced LOCmessage.pb.go ×2tags.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/telemetry/config.go · 422 LOCtelemetry/config.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestExportersWithSharedConn · introduced test · go.temporal.io/server/common/telemetry/TestExportersWithSharedConnTestExportersWithSharedC…TestOTLPTraceGRPC · introduced test · go.temporal.io/server/common/telemetry/TestOTLPTraceGRPCTestOTLPTraceGRPCTestSharedConn · introduced test · go.temporal.io/server/common/telemetry/TestSharedConnTestSharedConnFocused concept · config.go ×21 · 90 introduced LOCconfig.go ×21

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.

1 test introduced at this concept.

Introduced code

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

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

go.temporal.io/server/common/telemetry/config.go 90 introduced LOC · 21 ranges

Open complete file

175 }
176
177 > func (g *grpcconn) dialOpts() []grpc.DialOption { config.go
178 > out := []grpc.DialOption{
179 > grpc.WithReadBufferSize(cmp.Or(g.ReadBufferSize, defaultReadBufferSize)),
180 > grpc.WithWriteBufferSize(cmp.Or(g.WriteBufferSize, defaultWriteBufferSize)),
181 > grpc.WithUserAgent(g.UserAgent),
182 > grpc.WithConnectParams(grpc.ConnectParams{
183 > MinConnectTimeout: cmp.Or(g.ConnectParams.MinConnectTimeout, defaultMinConnectTimeout),
184 > Backoff: backoff.Config{
185 > BaseDelay: cmp.Or(g.ConnectParams.Backoff.BaseDelay, backoff.DefaultConfig.BaseDelay),
186 > MaxDelay: cmp.Or(g.ConnectParams.Backoff.MaxDelay, backoff.DefaultConfig.MaxDelay),
187 > Jitter: cmp.Or(g.ConnectParams.Backoff.Jitter, backoff.DefaultConfig.Jitter),
188 > Multiplier: cmp.Or(g.ConnectParams.Backoff.Multiplier, backoff.DefaultConfig.Multiplier),
189 > },
190 > }),
191 > }
192 > if g.Insecure {
193 out = append(out, grpc.WithTransportCredentials(insecure.NewCredentials()))
194 }
195 > if g.Block { config.go
196 out = append(out, grpc.WithBlock())
197 }
198 > if g.Authority != "" { config.go
199 out = append(out, grpc.WithAuthority(g.Authority))
200 }
201 > return out config.go
202 }
203
208 out := make(map[SpanExporterType]otelsdktrace.SpanExporter, len(ec.Exporters))
209 for _, expcfg := range ec.Exporters {
210 > if !strings.HasPrefix(expcfg.Kind.Signal, "trace") { config.go
211 > continue
212 }
213 > switch spec := expcfg.Spec.(type) { config.go
214 > case *otlpGrpcSpanExporter:
215 > spanexp, err := ec.buildOtlpGrpcSpanExporter(spec)
216 > if err != nil {
217 return nil, err
218 }
219 > out[SpanExporterType(expcfg.Kind.Model)] = spanexp config.go
220 default:
221 return nil, fmt.Errorf("unsupported span exporter type: %T", spec)
225 }
226
227 > func (ec *exportConfig) MetricExporters() ([]metric.Exporter, error) { config.go
228 > out := make([]metric.Exporter, 0, len(ec.Exporters))
229 > for _, expcfg := range ec.Exporters {
230 > if !strings.HasPrefix(expcfg.Kind.Signal, "metric") {
231 > continue
232 }
233 > switch spec := expcfg.Spec.(type) { config.go
234 > case *otlpGrpcMetricExporter:
235 > metricexp, err := ec.buildOtlpGrpcMetricExporter(spec)
236 > if err != nil {
237 return nil, err
238 }
239 > out = append(out, metricexp) config.go
240 default:
241 return nil, fmt.Errorf("unsupported metric exporter type: %T", spec)
242 }
243 }
244 > return out, nil config.go
245
246 }
248 func (ec *exportConfig) buildOtlpGrpcMetricExporter(
249 cfg *otlpGrpcMetricExporter,
250 > ) (metric.Exporter, error) { config.go
251 > dopts := cfg.Connection.dialOpts()
252 > opts := []otlpmetricgrpc.Option{
253 > otlpmetricgrpc.WithEndpoint(cfg.Connection.Endpoint),
254 > otlpmetricgrpc.WithHeaders(cfg.Headers),
255 > otlpmetricgrpc.WithTimeout(cmp.Or(cfg.Timeout, 10*time.Second)),
256 > otlpmetricgrpc.WithDialOption(dopts...),
257 > otlpmetricgrpc.WithRetry(otlpmetricgrpc.RetryConfig{
258 > Enabled: cmp.Or(cfg.Retry.Enabled, retryDefaultEnabled),
259 > InitialInterval: cmp.Or(cfg.Retry.InitialInterval, retryDefaultInitialInterval),
260 > MaxInterval: cmp.Or(cfg.Retry.MaxInterval, retryDefaultMaxInterval),
261 > MaxElapsedTime: cmp.Or(cfg.Retry.MaxElapsedTime, retryDefaultMaxElapsedTime),
262 > }),
263 > }
264 >
265 > // work around https://github.com/open-telemetry/opentelemetry-go/issues/2940
266 > if cfg.Connection.Insecure {
267 opts = append(opts, otlpmetricgrpc.WithInsecure())
268 }
269
270 > if cfg.ConnectionName == "" { config.go
271 return otlpmetricgrpc.New(context.Background(), opts...)
272 }
273
274 > conncfg, ok := ec.findNamedGrpcConnCfg(cfg.ConnectionName) config.go
275 > if !ok {
276 return nil, fmt.Errorf("OTEL exporter connection %q not found", cfg.ConnectionName)
277 }
278 > return &sharedConnMetricExporter{ config.go
279 > baseOpts: opts,
280 > dialer: conncfg,
281 > }, nil
282 }
283
284 func (ec *exportConfig) buildOtlpGrpcSpanExporter(
285 cfg *otlpGrpcSpanExporter,
286 > ) (otelsdktrace.SpanExporter, error) { config.go
287 > opts := []otlptracegrpc.Option{
288 > otlptracegrpc.WithEndpoint(cfg.Connection.Endpoint),
289 > otlptracegrpc.WithHeaders(cfg.Headers),
290 > otlptracegrpc.WithTimeout(cmp.Or(cfg.Timeout, 10*time.Second)),
291 > otlptracegrpc.WithDialOption(cfg.Connection.dialOpts()...),
292 > otlptracegrpc.WithRetry(otlptracegrpc.RetryConfig{
293 > Enabled: cmp.Or(cfg.Retry.Enabled, retryDefaultEnabled),
294 > InitialInterval: cmp.Or(cfg.Retry.InitialInterval, retryDefaultInitialInterval),
295 > MaxInterval: cmp.Or(cfg.Retry.MaxInterval, retryDefaultMaxInterval),
296 > MaxElapsedTime: cmp.Or(cfg.Retry.MaxElapsedTime, retryDefaultMaxElapsedTime),
297 > }),
298 > }
299 >
300 > // work around https://github.com/open-telemetry/opentelemetry-go/issues/2940
301 > if cfg.Connection.Insecure {
302 opts = append(opts, otlptracegrpc.WithInsecure())
303 }
304
305 > if cfg.ConnectionName == "" { config.go
306 return otlptracegrpc.NewUnstarted(opts...), nil
307 }
308
309 > conncfg, ok := ec.findNamedGrpcConnCfg(cfg.ConnectionName) config.go
310 > if !ok {
311 return nil, fmt.Errorf("OTEL exporter connection %q not found", cfg.ConnectionName)
312 }
313 > return &sharedConnSpanExporter{ config.go
314 > baseOpts: opts,
315 > dialer: conncfg,
316 > }, nil
317 }
318
347 }
348
349 > func (ec *exportConfig) findNamedGrpcConnCfg(name string) (*grpcconn, bool) { config.go
350 > if name == "" {
351 return nil, false
352 }
353 > for _, conn := range ec.Connections { config.go
354 > if gconn, ok := conn.Spec.(*grpcconn); ok && conn.Metadata.Name == name {
355 > return gconn, true
356 > }
357 }
358 return nil, false