Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 0e5f67c

Browse files
authored
fix unit test failures on Windows (#361)
1 parent dbfc325 commit 0e5f67c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

opencensus/stats/exporters/stackdriver_exporter.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,8 @@ def get_task_value():
427427
def namespaced_view_name(view_name, metric_prefix):
428428
""" create string to be used as metric type
429429
"""
430-
if metric_prefix == "":
431-
return os.path.join("custom.googleapis.com", "opencensus", view_name)
432-
return os.path.join(metric_prefix, view_name)
430+
metric_prefix = metric_prefix or "custom.googleapis.com/opencensus"
431+
return os.path.join(metric_prefix, view_name).replace('\\', '/')
433432

434433

435434
def new_label_descriptors(defaults, keys):

0 commit comments

Comments
 (0)