Skip to content
View on GitHub

Discover connected features in a utility network using connected, subnetwork, upstream, and downstream traces.

Image of trace utility network

Use case

You can use a trace to visualize and validate the network topology of a utility network for quality assurance. Subnetwork traces are used for validating whether subnetworks, such as circuits or zones, are defined or edited appropriately.

How to use the sample

Tap on one or more features while 'Add starting locations' or 'Add barriers' is selected. When a junction feature is identified, you may be prompted to select a terminal. When an edge feature is identified, the distance from the tapped location to the beginning of the edge feature will be computed. Select the type of trace using the drop down menu. Tap 'Trace' to initiate a trace on the network. Tap 'Reset' to clear the trace parameters and start over.

How it works

  1. Create an ArcGISMapView and listen for onTap event.
  2. Create an ArcGISMap with the given portal item, and set the map to the ArcGISMapView.
  3. Get the only UtilityNetwork from the map.
  4. Get and load the ServiceGeodatabase associated with the utility network.
  5. Get the FeatureLayer(s) created from the ServiceGeodatabase's tables.
  6. Add a GraphicsOverlay with symbology that distinguishes starting locations from barriers.
  7. Identify features on the map and add a Graphic that represents its purpose (starting location or barrier) at the tapped location.
  8. Create a UtilityElement for the identified feature.
  9. Determine the type of this element using its UtilityNetworkSource.SourceType property.
  10. If the element is a junction with more than one terminal, display a terminal picker. Then set the junction's UtilityTerminal property with the selected terminal.
  11. If an edge, set its fractionAlongEdge property using GeometryEngine.fractionAlong.
  12. Add this UtilityElement to a collection of starting locations or barriers.
  13. Create UtilityTraceParameters with the selected trace type along with the collected starting locations and barriers (if applicable).
  14. Set the UtilityTraceParameters.TraceConfiguration with the tier's UtilityTier.getDefaultTraceConfiguration() result.
  15. Run a UtilityNetwork.trace() with the specified parameters.
  16. For every FeatureLayer in the map, select the features returned with getFeaturesForElements from the elements matching their UtilityNetworkSource.FeatureTable with the layer's FeatureTable.

Relevant API

  • GeometryEngine.fractionAlong
  • ServiceGeodatabase
  • UtilityAssetType
  • UtilityDomainNetwork
  • UtilityElement
  • UtilityElementTraceResult
  • UtilityNetwork
  • UtilityNetworkDefinition
  • UtilityNetworkSource
  • UtilityTerminal
  • UtilityTier
  • UtilityTraceConfiguration
  • UtilityTraceParameters
  • UtilityTraceResult
  • UtilityTraceType
  • UtilityTraversability

About the data

The Naperville electrical network feature service contains a utility network used to run the subnetwork-based trace shown in this sample. Authentication is required and handled within the sample code.

Additional information

Using utility network on ArcGIS Enterprise 10.8 requires an ArcGIS Enterprise member account licensed with the Utility Network user type extension. Please refer to the utility network services documentation.

Tags

condition barriers, downstream trace, network analysis, subnetwork trace, toolkit, trace configuration, traversability, upstream trace, utility network, validate consistency

Sample Code

trace_utility_network.dart
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
//
// Copyright 2025 Esri
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import 'package:arcgis_maps/arcgis_maps.dart';
import 'package:arcgis_maps_sdk_flutter_samples/common/common.dart';
import 'package:arcgis_maps_sdk_flutter_samples/common/token_challenger_handler.dart';
import 'package:flutter/material.dart';

class TraceUtilityNetwork extends StatefulWidget {
  const TraceUtilityNetwork({super.key});

  @override
  State<TraceUtilityNetwork> createState() => _TraceUtilityNetworkState();
}

class _TraceUtilityNetworkState extends State<TraceUtilityNetwork>
    with SampleStateSupport {
  // Create a controller for the map view.
  final _mapViewController = ArcGISMapView.createController();

  // A flag for when the map view is ready and controls can be used.
  var _ready = false;

  // The message to display to the user.
  var _message = 'Loading Utility Network...';

  // The utility network used for tracing.
  late UtilityNetwork _utilityNetwork;

  // The medium voltage tier used for the electric distribution domain network.
  UtilityTier? _mediumVoltageTier;

  // Create lists for starting locations and barriers.
  final _startingLocations = <UtilityElement>[];
  final _barriers = <UtilityElement>[];

  // Graphics overlay for the starting locations and barrier graphics.
  late GraphicsOverlay _graphicsOverlay;

  // Symbols for starting points and barriers.
  final _startingPointSymbol = SimpleMarkerSymbol(
    style: SimpleMarkerSymbolStyle.cross,
    color: Colors.lightGreen,
    size: 20,
  );
  final _barrierPointSymbol = SimpleMarkerSymbol(
    style: SimpleMarkerSymbolStyle.x,
    color: Colors.red,
    size: 20,
  );

  // The unique value renderer for the electrical distribution layer.
  late UniqueValueRenderer _electricalDistributionUvr;

  // UI state variables.
  var _isAddingStartingLocations = true;
  var _selectedTraceType = UtilityTraceType.connected;
  final _traceTypes = [
    UtilityTraceType.connected,
    UtilityTraceType.subnetwork,
    UtilityTraceType.upstream,
    UtilityTraceType.downstream,
  ];

  @override
  void initState() {
    super.initState();

    // Set up authentication for the sample server.
    // Note: Never hardcode login information in a production application.
    // This is done solely for the sake of the sample.
    ArcGISEnvironment
        .authenticationManager
        .arcGISAuthenticationChallengeHandler = TokenChallengeHandler(
      'viewer01',
      'I68VGU^nMurF',
    );

    _initElectricalDistributionRenderer();
  }

  @override
  void dispose() {
    // Remove the TokenChallengeHandler and erase any credentials that were generated.
    ArcGISEnvironment
            .authenticationManager
            .arcGISAuthenticationChallengeHandler =
        null;
    ArcGISEnvironment.authenticationManager.arcGISCredentialStore.removeAll();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        top: false,
        left: false,
        right: false,
        child: Stack(
          children: [
            Column(
              children: [
                Expanded(
                  child: ArcGISMapView(
                    controllerProvider: () => _mapViewController,
                    onMapViewReady: _onMapViewReady,
                    onTap: _onTap,
                  ),
                ),
                // Control panel.
                Container(
                  padding: const EdgeInsets.fromLTRB(10, 5, 10, 5),
                  child: Column(
                    children: [
                      // Add starting locations or barriers radio buttons.
                      Row(
                        children: [
                          Expanded(
                            child: ListTile(
                              leading: Icon(
                                _isAddingStartingLocations
                                    ? Icons.radio_button_checked
                                    : Icons.radio_button_unchecked,
                                color: _ready ? null : Colors.grey,
                              ),
                              title: const Text('Add starting location(s)'),
                              dense: true,
                              onTap: _ready
                                  ? () => setState(
                                      () => _isAddingStartingLocations = true,
                                    )
                                  : null,
                            ),
                          ),
                          Expanded(
                            child: ListTile(
                              leading: Icon(
                                !_isAddingStartingLocations
                                    ? Icons.radio_button_checked
                                    : Icons.radio_button_unchecked,
                                color: _ready ? null : Colors.grey,
                              ),
                              title: const Text('Add barriers'),
                              dense: true,
                              onTap: _ready
                                  ? () => setState(
                                      () => _isAddingStartingLocations = false,
                                    )
                                  : null,
                            ),
                          ),
                        ],
                      ),
                      // Trace type dropdown.
                      Row(
                        children: [
                          const SizedBox(width: 10),
                          const Text('Trace Type: '),
                          const SizedBox(width: 10),
                          DropdownButton(
                            value: _selectedTraceType,
                            onChanged: (value) => setState(
                              () => _selectedTraceType =
                                  value ?? UtilityTraceType.connected,
                            ),
                            items: _traceTypes.map((type) {
                              return DropdownMenuItem(
                                value: type,
                                child: Text(
                                  _getTraceTypeName(type),
                                  style: Theme.of(context).textTheme.bodyMedium,
                                ),
                              );
                            }).toList(),
                          ),
                          const SizedBox(width: 10),
                        ],
                      ),
                      // Action Reset and Trace buttons.
                      Row(
                        children: [
                          Expanded(
                            child: ElevatedButton(
                              onPressed: _ready ? _onReset : null,
                              child: const Text('Reset'),
                            ),
                          ),
                          const SizedBox(width: 8),
                          Expanded(
                            child: ElevatedButton(
                              onPressed: _ready && _startingLocations.isNotEmpty
                                  ? _onTrace
                                  : null,
                              child: const Text('Trace'),
                            ),
                          ),
                        ],
                      ),
                      const SizedBox(height: 4),
                    ],
                  ),
                ),
              ],
            ),
            // Loading indicator.
            LoadingIndicator(visible: !_ready),
            // Display a banner with instructions at the top.
            SafeArea(
              left: false,
              right: false,
              child: IgnorePointer(
                child: Container(
                  padding: const EdgeInsets.all(5),
                  color: Colors.white.withValues(alpha: 0.7),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      FittedBox(
                        fit: BoxFit.scaleDown,
                        child: Text(
                          _message,
                          textAlign: TextAlign.center,
                          style: Theme.of(context).textTheme.labelMedium,
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }

  Future<void> _onMapViewReady() async {
    final portalItem = PortalItem.withPortalAndItemId(
      portal: Portal(
        Uri.parse('https://sampleserver7.arcgisonline.com/portal/'),
        connection: PortalConnection.authenticated,
      ),
      itemId: 'be0e4637620a453584118107931f718b',
    );
    // Create a map with a dark vector basemap.
    final map = ArcGISMap.withItem(portalItem);
    await map.load();

    // Set initial viewpoint in the utility network area.
    map.initialViewpoint = Viewpoint.fromTargetExtent(
      Envelope.fromPoints(
        ArcGISPoint(
          x: -9813547.35557238,
          y: 5129980.36635111,
          spatialReference: SpatialReference.webMercator,
        ),
        ArcGISPoint(
          x: -9813185.0602376,
          y: 5130215.41254146,
          spatialReference: SpatialReference.webMercator,
        ),
      ),
    );
    // Set the map on the controller.
    _mapViewController.arcGISMap = map;

    // Get the utility network.
    _utilityNetwork = map.utilityNetworks.first;
    await _utilityNetwork.load();
    // Get the service geodatabase.
    final serviceGeodatabase = _utilityNetwork.serviceGeodatabase;
    await serviceGeodatabase?.load();

    // Set selection color.
    _mapViewController.selectionProperties = SelectionProperties(
      color: Colors.yellow,
    );

    // Get the utility tier used for traces.
    final electricDistribution = _utilityNetwork.definition!.getDomainNetwork(
      'ElectricDistribution',
    );
    _mediumVoltageTier = electricDistribution?.getTier('Medium Voltage Radial');

    // Create graphics overlay.
    _graphicsOverlay = GraphicsOverlay();
    _mapViewController.graphicsOverlays.add(_graphicsOverlay);

    // Find the electric distribution line with the layer ID 3 and reset its renderer.
    final table = serviceGeodatabase?.getTable(layerId: 3);
    if (table != null && table.layer is FeatureLayer) {
      final layer = table.layer! as FeatureLayer;
      layer.renderer = _electricalDistributionUvr;
    }

    setState(() {
      _ready = true;
      _message = 'Tap on the network lines or points to add a utility element.';
    });
  }

  // Create renderer for line feature layer with different symbols for voltage levels.
  void _initElectricalDistributionRenderer() {
    final lowVoltageValue = UniqueValue(
      description: 'Low voltage',
      label: 'Low voltage',
      symbol: SimpleLineSymbol(
        style: SimpleLineSymbolStyle.dash,
        color: const Color(0xFF008C8C), // DarkCyan
        width: 3,
      ),
      values: [3],
    );

    final mediumVoltageValue = UniqueValue(
      description: 'Medium voltage',
      label: 'Medium voltage',
      symbol: SimpleLineSymbol(
        color: const Color(0xFF008C8C), // DarkCyan
        width: 3,
      ),
      values: [5],
    );

    _electricalDistributionUvr = UniqueValueRenderer(
      fieldNames: ['ASSETGROUP'],
      uniqueValues: [mediumVoltageValue, lowVoltageValue],
    );
  }

  // Callback when the map view is tapped.
  Future<void> _onTap(Offset localPosition) async {
    if (!_ready) return;

    // Identify the feature to be used.
    final identifyResults = await _mapViewController.identifyLayers(
      screenPoint: localPosition,
      tolerance: 10,
    );
    // Check if there are features identified.
    if (identifyResults.isEmpty) {
      _updateHintMessage('No utility element(s) identified.');
    } else {
      final point = _mapViewController.screenToLocation(screen: localPosition);
      final result = identifyResults.first;
      if (result.geoElements.isNotEmpty) {
        final feature = result.geoElements.first as ArcGISFeature;
        addUtilityElement(feature, point!);
      }
    }
  }

  // Identify the utility element associated with the selected feature.
  void addUtilityElement(ArcGISFeature feature, ArcGISPoint point) {
    // Get the network source of the identified feature.
    final networkSource = _utilityNetwork.definition?.networkSources.firstWhere(
      (source) {
        return source.featureTable.tableName == feature.featureTable?.tableName;
      },
    );
    if (networkSource == null) {
      _updateHintMessage(
        'Selected feature does not contain a Utility Network Source.',
      );
      return;
    }
    // Create UtilityElement by its source type.
    if (networkSource.sourceType == UtilityNetworkSourceType.junction) {
      // If the source type is a junction.
      _createJunctionElement(feature, networkSource).ignore();
    } else if (networkSource.sourceType == UtilityNetworkSourceType.edge) {
      // If the source type is an edge.
      _createEdgeJunctionElement(feature, point);
    }
  }

  // Add the identified utility element to the starting locations or barriers array.
  Future<void> _createJunctionElement(
    ArcGISFeature feature,
    UtilityNetworkSource source,
  ) async {
    // Find the code matching the asset group name in the feature's attributes.
    final assetGroupCode = feature.attributes['assetgroup'] as int;
    // Find the network source's UtilityAssetGroup with the matching code.
    final assetGroup = source.assetGroups.firstWhere(
      (group) => group.code == assetGroupCode,
    );
    // Find the UtilityAssetType.
    final assetType = assetGroup.assetTypes.firstWhere(
      (type) => type.code == feature.attributes['assettype'] as int,
    );
    // Get the list of terminals for the feature.
    final terminals = assetType.terminalConfiguration?.terminals;
    if (terminals == null || terminals.isEmpty) {
      setState(() => _message = 'Error retrieving terminal configuration');
      return;
    }
    // If there is only one terminal, use it to create a utility element.
    if (terminals.length == 1) {
      final element = _utilityNetwork.createElement(
        arcGISFeature: feature,
        terminal: terminals.first,
      );
      _addUtilityElement(feature, element, feature.geometry! as ArcGISPoint);
      // If there is more than one terminal, ask the user to select one.
    } else {
      final selectedTerminal = await _showTerminalSelect(terminals);
      if (selectedTerminal != null) {
        final element = _utilityNetwork.createElement(
          arcGISFeature: feature,
          terminal: selectedTerminal,
        );
        _addUtilityElement(feature, element, feature.geometry! as ArcGISPoint);
      }
    }
  }

  // Show a dialog to select a UtilityTerminal.
  Future<UtilityTerminal?> _showTerminalSelect(
    List<UtilityTerminal> terminals,
  ) {
    return showDialog<UtilityTerminal>(
      context: context,
      barrierDismissible: false,
      builder: (context) {
        var selectedTerminal = terminals.first;

        return StatefulBuilder(
          builder: (context, setState) {
            return AlertDialog(
              title: const Text('Select Terminal'),
              content: Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  const Text('Select the terminal for this junction.'),
                  const SizedBox(height: 16),
                  DropdownButton(
                    value: selectedTerminal,
                    onChanged: (value) {
                      setState(() {
                        selectedTerminal = value!;
                      });
                    },
                    items: terminals.map((terminal) {
                      return DropdownMenuItem(
                        value: terminal,
                        child: Text(terminal.name),
                      );
                    }).toList(),
                  ),
                ],
              ),
              actions: [
                TextButton(
                  onPressed: () => Navigator.of(context).pop(),
                  child: const Text('Cancel'),
                ),
                TextButton(
                  onPressed: () => Navigator.of(context).pop(selectedTerminal),
                  child: const Text('OK'),
                ),
              ],
            );
          },
        );
      },
    );
  }

  // Add the identified utility element to the starting locations or barriers array.
  void _createEdgeJunctionElement(ArcGISFeature feature, ArcGISPoint point) {
    // Create a utility element with the identified feature.
    final element = _utilityNetwork.createElement(arcGISFeature: feature);
    if (feature.geometry?.geometryType == GeometryType.polyline) {
      final line = GeometryEngine.removeZ(feature.geometry!) as Polyline;
      // Compute how far tapped location is along the edge feature.
      element.fractionAlongEdge = GeometryEngine.fractionAlong(
        line: line,
        point: point,
        tolerance: -1,
      );
      _addUtilityElement(feature, element, point);
      // Update the hint text.
      _updateHintMessage(
        'Fraction along the edge: ${element.fractionAlongEdge}',
      );
    }
  }

  // Add an element to either the starting locations or barriers array.
  void _addUtilityElement(
    ArcGISFeature feature,
    UtilityElement element,
    ArcGISPoint mapPoint,
  ) {
    final graphicPoint = GeometryEngine.nearestCoordinate(
      geometry: feature.geometry!,
      point: mapPoint,
    )?.coordinate;
    final graphic = Graphic(geometry: graphicPoint);

    if (_isAddingStartingLocations) {
      // Add the element to the starting locations.
      _startingLocations.add(element);
      graphic.symbol = _startingPointSymbol;
    } else {
      // Add the element to the barriers.
      _barriers.add(element);
      graphic.symbol = _barrierPointSymbol;
    }
    _graphicsOverlay.graphics.add(graphic);

    _updateHintMessage('Terminal: ${element.terminal?.name}');
  }

  // Clear up the previous trace result.
  void _onReset() {
    setState(() {
      _message = 'Tap on the network lines or points to add a utility element.';
      _selectedTraceType = UtilityTraceType.connected;
    });

    // Clear collections of starting locations and barriers.
    _startingLocations.clear();
    _barriers.clear();

    // Clear the map of any locations, barriers, and trace results.
    _graphicsOverlay.graphics.clear();
    // Clear the selections on the feature layers.
    _mapViewController.arcGISMap?.operationalLayers.forEach((layer) {
      if (layer is FeatureLayer) {
        layer.clearSelection();
      }
    });
  }

  // Trace the utility network and show the network tracing result.
  Future<void> _onTrace() async {
    if (_startingLocations.isEmpty) return;

    try {
      setState(() {
        _ready = false;
        _message =
            'Running ${_getTraceTypeName(_selectedTraceType).toLowerCase()} trace...';
      });

      // Clear previous selection from the layers.
      for (final layer in _mapViewController.arcGISMap!.operationalLayers) {
        if (layer is FeatureLayer) {
          layer.clearSelection();
        }
      }

      // Build trace parameters.
      final parameters = UtilityTraceParameters(
        _selectedTraceType,
        startingLocations: _startingLocations,
      );

      // Add barriers.
      parameters.barriers.addAll(_barriers);

      // Set the trace configuration using the tier from the utility domain network.
      if (_mediumVoltageTier != null) {
        parameters.traceConfiguration = _mediumVoltageTier!
            .getDefaultTraceConfiguration();
      }

      // Get the trace result from the utility network.
      final traceResults = await _utilityNetwork.trace(parameters);

      if (traceResults.isNotEmpty) {
        final elementTraceResult =
            traceResults.first as UtilityElementTraceResult?;

        // Check if there are any elements in the result.
        if (elementTraceResult?.elements.isNotEmpty ?? false) {
          for (final layer in _mapViewController.arcGISMap!.operationalLayers) {
            if (layer is FeatureLayer) {
              final elements = elementTraceResult!.elements
                  .where(
                    (element) =>
                        element.networkSource.featureTable ==
                        layer.featureTable,
                  )
                  .toList();

              if (elements.isNotEmpty) {
                final features = await _utilityNetwork.getFeaturesForElements(
                  elements,
                );
                layer.selectFeatures(features);
              }
            }
          }
        }
      }

      _updateHintMessage('Trace completed.');
    } on Exception catch (e) {
      _updateHintMessage('Trace failed: $e');
    } finally {
      setState(() => _ready = true);
    }
  }

  // Update the hint message.
  void _updateHintMessage(String message) {
    setState(() => _message = message);
  }

  // Get the trace type name.
  String _getTraceTypeName(UtilityTraceType traceType) {
    switch (traceType) {
      case UtilityTraceType.connected:
        return 'Connected';
      case UtilityTraceType.subnetwork:
        return 'Subnetwork';
      case UtilityTraceType.upstream:
        return 'Upstream';
      case UtilityTraceType.downstream:
        return 'Downstream';
      default:
        return traceType.toString();
    }
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.