From e9a67ec1839e1f6e5133dbcca2f57bec12fdeda2 Mon Sep 17 00:00:00 2001 From: skiptomylu Date: Thu, 21 Feb 2019 10:12:26 -0800 Subject: [PATCH] Use RWMutex instead of defer/recover to avoid publishing to closed channel in M3 reporter (#90) --- .gitignore | 3 +- Makefile | 2 - example/main.go | 2 +- histogram.go | 2 +- histogram_test.go | 2 +- instrument/call.go | 2 +- instrument/call_test.go | 2 +- instrument/types.go | 2 +- key_gen.go | 2 +- m3/config.go | 2 +- m3/config_test.go | 2 +- .../buffered_read_transport.go | 2 +- .../buffered_read_transport_test.go | 2 +- m3/customtransports/m3_calc_transport.go | 2 +- m3/customtransports/m3_calc_transport_test.go | 2 +- m3/example/local_server.go | 2 +- m3/example/m3_main.go | 2 +- m3/reporter.go | 59 ++++++++++--------- m3/reporter_benchmark_test.go | 14 ++--- m3/reporter_test.go | 20 ++++++- m3/resource_pool.go | 2 +- m3/resource_pool_test.go | 2 +- m3/sanitize.go | 2 +- m3/scope_test.go | 16 +++-- m3/thrift/constants.go | 2 +- m3/thrift/m3.go | 2 +- m3/thrift/ttypes.go | 2 +- m3/thriftudp/multitransport.go | 2 +- m3/thriftudp/multitransport_test.go | 2 +- m3/thriftudp/transport.go | 2 +- m3/thriftudp/transport_test.go | 2 +- multi/reporter.go | 2 +- multi/reporter_test.go | 2 +- pool.go | 2 +- prometheus/config.go | 2 +- prometheus/example/prometheus_main.go | 2 +- prometheus/reporter.go | 2 +- prometheus/reporter_test.go | 2 +- prometheus/sanitize.go | 2 +- reporter.go | 2 +- sanitize.go | 2 +- sanitize_test.go | 2 +- scope.go | 2 +- scope_benchmark_test.go | 2 +- scope_test.go | 2 +- stats.go | 2 +- stats_benchmark_test.go | 2 +- stats_test.go | 2 +- statsd/example/statsd_main.go | 2 +- statsd/reporter.go | 2 +- statsd/reporter_test.go | 2 +- types.go | 2 +- 52 files changed, 112 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index 27ccac90..897c298d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,5 +30,4 @@ _testmain.go .DS_Store node_modules/ - - +.idea/ diff --git a/Makefile b/Makefile index fa1161a1..22911d35 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,6 @@ lint: @gofmt -d -s $(PKG_FILES) 2>&1 | grep -v $(LINT_IGNORE) | tee lint.log @echo "Installing test dependencies for vet..." @go test -i $(PKGS) - @echo "Checking vet..." - @$(foreach dir,$(PKG_FILES),go tool vet $(dir) 2>&1 | grep -v $(LINT_IGNORE) | tee -a lint.log;) @echo "Checking lint..." @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | grep -v $(LINT_IGNORE) | tee -a lint.log;) @echo "Checking for unresolved FIXMEs..." diff --git a/example/main.go b/example/main.go index 98ca9c42..f292e2d4 100644 --- a/example/main.go +++ b/example/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/histogram.go b/histogram.go index c242db09..96198b91 100644 --- a/histogram.go +++ b/histogram.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/histogram_test.go b/histogram_test.go index dd771605..fc9fc4e6 100644 --- a/histogram_test.go +++ b/histogram_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/instrument/call.go b/instrument/call.go index 470b9cb2..039a8239 100644 --- a/instrument/call.go +++ b/instrument/call.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/instrument/call_test.go b/instrument/call_test.go index e64dedb4..bb2a6766 100644 --- a/instrument/call_test.go +++ b/instrument/call_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/instrument/types.go b/instrument/types.go index 4ba2b20e..f71a87db 100644 --- a/instrument/types.go +++ b/instrument/types.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/key_gen.go b/key_gen.go index 4035d8bb..de586e22 100644 --- a/key_gen.go +++ b/key_gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/config.go b/m3/config.go index 2df4e1b4..b7a617b4 100644 --- a/m3/config.go +++ b/m3/config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/config_test.go b/m3/config_test.go index 0a1f6bce..89fd9198 100644 --- a/m3/config_test.go +++ b/m3/config_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/customtransports/buffered_read_transport.go b/m3/customtransports/buffered_read_transport.go index 149734f8..af32972a 100644 --- a/m3/customtransports/buffered_read_transport.go +++ b/m3/customtransports/buffered_read_transport.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/customtransports/buffered_read_transport_test.go b/m3/customtransports/buffered_read_transport_test.go index c88cc659..231cd0f9 100644 --- a/m3/customtransports/buffered_read_transport_test.go +++ b/m3/customtransports/buffered_read_transport_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/customtransports/m3_calc_transport.go b/m3/customtransports/m3_calc_transport.go index 79cc02c3..0c3d42ab 100644 --- a/m3/customtransports/m3_calc_transport.go +++ b/m3/customtransports/m3_calc_transport.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/customtransports/m3_calc_transport_test.go b/m3/customtransports/m3_calc_transport_test.go index 889a46fc..00c45592 100644 --- a/m3/customtransports/m3_calc_transport_test.go +++ b/m3/customtransports/m3_calc_transport_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/example/local_server.go b/m3/example/local_server.go index 221153ba..eb61be23 100644 --- a/m3/example/local_server.go +++ b/m3/example/local_server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/example/m3_main.go b/m3/example/m3_main.go index d9dee173..2694a8e8 100644 --- a/m3/example/m3_main.go +++ b/m3/example/m3_main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/reporter.go b/m3/reporter.go index 52252d2c..37dedcfd 100644 --- a/m3/reporter.go +++ b/m3/reporter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -94,6 +94,7 @@ const ( var ( errNoHostPorts = errors.New("at least one entry for HostPorts is required") errCommonTagSize = errors.New("common tags serialized size exceeds packet size") + errAlreadyClosed = errors.New("reporter already closed") ) // Reporter is an M3 reporter. @@ -119,9 +120,14 @@ type reporter struct { bucketIDTagName string bucketTagName string bucketValFmt string - closeChan chan struct{} - metCh chan sizedMetric + status reporterStatus + metCh chan sizedMetric +} + +type reporterStatus struct { + sync.RWMutex + closed bool } // Options is a set of options for the M3 reporter. @@ -429,41 +435,40 @@ func (r *reporter) reportCopyMetric( copy.MetricValue.Timer = t } - // NB(r): This is to avoid sending on a closed channel, - // it's faster to actually defer/recover than acquire - // a read lock here to ensure we aren't closed: benchmarked - // this with BenchmarkTimer in reporter_benchmark_test.go - defer func() { - recover() - }() - - select { - case r.metCh <- sizedMetric{copy, size}: - default: + r.status.RLock() + if !r.status.closed { + select { + case r.metCh <- sizedMetric{copy, size}: + default: + } } + r.status.RUnlock() } -// Flush implements tally.CachedStatsReporter. +// Flush sends an empty sizedMetric to signal a flush. func (r *reporter) Flush() { - // Avoid send on a closed channel - defer func() { - recover() - }() - - r.metCh <- sizedMetric{} + r.status.RLock() + if !r.status.closed { + r.metCh <- sizedMetric{} + } + r.status.RUnlock() } // Close waits for metrics to be flushed before closing the backend. func (r *reporter) Close() (err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("close error occurred: %v", r) - } - }() + r.status.Lock() + if r.status.closed { + r.status.Unlock() + return errAlreadyClosed + } + r.status.closed = true close(r.metCh) + r.status.Unlock() + r.processors.Wait() - return + + return nil } func (r *reporter) Capabilities() tally.Capabilities { diff --git a/m3/reporter_benchmark_test.go b/m3/reporter_benchmark_test.go index 962bc3d7..a0cba6a1 100644 --- a/m3/reporter_benchmark_test.go +++ b/m3/reporter_benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -72,15 +72,15 @@ func BenchmarkCalulateSize(b *testing.B) { func BenchmarkTimer(b *testing.B) { r, _ := NewReporter(Options{ - HostPorts: []string{"127.0.0.1:9052"}, - Service: "test-service", - CommonTags: defaultCommonTags, + HostPorts: []string{"127.0.0.1:9052"}, + Service: "test-service", + CommonTags: defaultCommonTags, + MaxQueueSize: DefaultMaxQueueSize, }) + defer r.Close() + benchReporter := r.(*reporter) - benchReporter.metCh = make(chan sizedMetric, DefaultMaxQueueSize) - // Close the met ch to end consume metrics loop - defer close(benchReporter.metCh) go func() { resourcePool := benchReporter.resourcePool diff --git a/m3/reporter_test.go b/m3/reporter_test.go index df8ecaa3..d8b84d1b 100644 --- a/m3/reporter_test.go +++ b/m3/reporter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -193,6 +193,24 @@ func TestNewReporterErrors(t *testing.T) { assert.Error(t, err) } +// TestReporterRaceCondition checks if therem is race condition between reporter closing +// and metric reporting, when run with race detector on, this test should pass +func TestReporterRaceCondition(t *testing.T) { + r, err := NewReporter(Options{ + HostPorts: []string{"localhost:8888"}, + Service: "test-service", + CommonTags: defaultCommonTags, + MaxQueueSize: queueSize, + MaxPacketSizeBytes: maxPacketSize, + }) + require.NoError(t, err) + + go func() { + r.AllocateTimer("my-timer", nil).ReportTimer(10 * time.Millisecond) + }() + r.Close() +} + // TestReporterFinalFlush ensures the Reporter emits the last batch of metrics // after close func TestReporterFinalFlush(t *testing.T) { diff --git a/m3/resource_pool.go b/m3/resource_pool.go index d88173da..5d6427e5 100644 --- a/m3/resource_pool.go +++ b/m3/resource_pool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/resource_pool_test.go b/m3/resource_pool_test.go index 9da5cf00..3c8454f8 100644 --- a/m3/resource_pool_test.go +++ b/m3/resource_pool_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/sanitize.go b/m3/sanitize.go index 05fce7b6..a63aa60b 100644 --- a/m3/sanitize.go +++ b/m3/sanitize.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/scope_test.go b/m3/scope_test.go index ce0b0b0d..60290257 100644 --- a/m3/scope_test.go +++ b/m3/scope_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -61,14 +61,12 @@ func newTestReporterScope( assert.NoError(t, closer.Close()) // Ensure reporter is closed too - var open, readStatus bool - select { - case _, open = <-r.(*reporter).metCh: - readStatus = true - default: - } - assert.True(t, readStatus) - assert.False(t, open) + r := r.(*reporter) + r.status.RLock() + closed := r.status.closed + r.status.RUnlock() + + assert.True(t, closed) } } diff --git a/m3/thrift/constants.go b/m3/thrift/constants.go index 3d26ed92..55a262fc 100644 --- a/m3/thrift/constants.go +++ b/m3/thrift/constants.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thrift/m3.go b/m3/thrift/m3.go index bc50a246..83e7e2b4 100644 --- a/m3/thrift/m3.go +++ b/m3/thrift/m3.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thrift/ttypes.go b/m3/thrift/ttypes.go index 726a5de1..9e9ae51f 100644 --- a/m3/thrift/ttypes.go +++ b/m3/thrift/ttypes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thriftudp/multitransport.go b/m3/thriftudp/multitransport.go index a2acb6a9..5068c588 100644 --- a/m3/thriftudp/multitransport.go +++ b/m3/thriftudp/multitransport.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thriftudp/multitransport_test.go b/m3/thriftudp/multitransport_test.go index 718d8cbc..99dcc82e 100644 --- a/m3/thriftudp/multitransport_test.go +++ b/m3/thriftudp/multitransport_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thriftudp/transport.go b/m3/thriftudp/transport.go index 22dcfe7e..4111aa6b 100644 --- a/m3/thriftudp/transport.go +++ b/m3/thriftudp/transport.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/m3/thriftudp/transport_test.go b/m3/thriftudp/transport_test.go index a38bbfc8..2994d4cb 100644 --- a/m3/thriftudp/transport_test.go +++ b/m3/thriftudp/transport_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/multi/reporter.go b/multi/reporter.go index d327a883..d6666697 100644 --- a/multi/reporter.go +++ b/multi/reporter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/multi/reporter_test.go b/multi/reporter_test.go index c5ffe334..65112c3e 100644 --- a/multi/reporter_test.go +++ b/multi/reporter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/pool.go b/pool.go index 7dff0ea9..e95c140f 100644 --- a/pool.go +++ b/pool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/prometheus/config.go b/prometheus/config.go index af7d128e..96e7818f 100644 --- a/prometheus/config.go +++ b/prometheus/config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/prometheus/example/prometheus_main.go b/prometheus/example/prometheus_main.go index 97f114f5..25deff80 100644 --- a/prometheus/example/prometheus_main.go +++ b/prometheus/example/prometheus_main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/prometheus/reporter.go b/prometheus/reporter.go index 4b15636e..8d11a8c7 100644 --- a/prometheus/reporter.go +++ b/prometheus/reporter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/prometheus/reporter_test.go b/prometheus/reporter_test.go index 9c97b957..6a39d9ae 100644 --- a/prometheus/reporter_test.go +++ b/prometheus/reporter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/prometheus/sanitize.go b/prometheus/sanitize.go index 01d55e0c..9a1d4864 100644 --- a/prometheus/sanitize.go +++ b/prometheus/sanitize.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/reporter.go b/reporter.go index a32dd1e0..52e86e39 100644 --- a/reporter.go +++ b/reporter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/sanitize.go b/sanitize.go index 20ea5d32..eb903616 100644 --- a/sanitize.go +++ b/sanitize.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/sanitize_test.go b/sanitize_test.go index e016980d..8a730b9d 100644 --- a/sanitize_test.go +++ b/sanitize_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/scope.go b/scope.go index f8ff2f00..64694586 100644 --- a/scope.go +++ b/scope.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/scope_benchmark_test.go b/scope_benchmark_test.go index b2d6b92d..d25cd59c 100644 --- a/scope_benchmark_test.go +++ b/scope_benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/scope_test.go b/scope_test.go index 98db4f82..a8198403 100644 --- a/scope_test.go +++ b/scope_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/stats.go b/stats.go index 98ac4ba4..aba2f9e8 100644 --- a/stats.go +++ b/stats.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/stats_benchmark_test.go b/stats_benchmark_test.go index 3a75b250..34f0ad70 100644 --- a/stats_benchmark_test.go +++ b/stats_benchmark_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/stats_test.go b/stats_test.go index 8d952dab..96142fe4 100644 --- a/stats_test.go +++ b/stats_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/statsd/example/statsd_main.go b/statsd/example/statsd_main.go index bea171e4..d05e33e4 100644 --- a/statsd/example/statsd_main.go +++ b/statsd/example/statsd_main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/statsd/reporter.go b/statsd/reporter.go index bfbcd401..6489bf29 100644 --- a/statsd/reporter.go +++ b/statsd/reporter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/statsd/reporter_test.go b/statsd/reporter_test.go index 0d9d0e49..2b95f051 100644 --- a/statsd/reporter_test.go +++ b/statsd/reporter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/types.go b/types.go index 12ab0db4..14105c68 100644 --- a/types.go +++ b/types.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal