diff --git a/.golangci.yml b/.golangci.yml index 09998af3dc0..11949076e9a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,4 +14,4 @@ linters-settings: #ignore-words: # - someword goimports: - local-prefixes: github.com/open-telemetry/opentelemetry-go \ No newline at end of file + local-prefixes: go.opentelemetry.io diff --git a/api/core/doc.go b/api/core/doc.go new file mode 100644 index 00000000000..c758e06ab38 --- /dev/null +++ b/api/core/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package core // import "go.opentelemetry.io/api/core" diff --git a/api/event/doc.go b/api/event/doc.go new file mode 100644 index 00000000000..4e7131bef85 --- /dev/null +++ b/api/event/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package event // import "go.opentelemetry.io/api/event" diff --git a/api/key/doc.go b/api/key/doc.go new file mode 100644 index 00000000000..4b3539df213 --- /dev/null +++ b/api/key/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package key // import "go.opentelemetry.io/api/key" diff --git a/api/metric/doc.go b/api/metric/doc.go new file mode 100644 index 00000000000..4b0b6346fc5 --- /dev/null +++ b/api/metric/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package metric // import "go.opentelemetry.io/api/metric" diff --git a/api/registry/doc.go b/api/registry/doc.go new file mode 100644 index 00000000000..01132607942 --- /dev/null +++ b/api/registry/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package registry // import "go.opentelemetry.io/api/registry" diff --git a/api/stats/doc.go b/api/stats/doc.go new file mode 100644 index 00000000000..81f0ad0ed87 --- /dev/null +++ b/api/stats/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package stats // import "go.opentelemetry.io/api/stats" diff --git a/api/tag/doc.go b/api/tag/doc.go new file mode 100644 index 00000000000..62f127a1795 --- /dev/null +++ b/api/tag/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package tag // import "go.opentelemetry.io/api/tag" diff --git a/api/trace/always_sampler_test.go b/api/trace/always_sampler_test.go index e9fc7ee27e5..c41b552d9da 100644 --- a/api/trace/always_sampler_test.go +++ b/api/trace/always_sampler_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "go.opentelemetry.io/api/core" ) diff --git a/api/trace/doc.go b/api/trace/doc.go new file mode 100644 index 00000000000..30c745c11ce --- /dev/null +++ b/api/trace/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package trace // import "go.opentelemetry.io/api/trace" diff --git a/api/trace/never_sampler_test.go b/api/trace/never_sampler_test.go index 3f1e7598f7b..6c8c4a7b349 100644 --- a/api/trace/never_sampler_test.go +++ b/api/trace/never_sampler_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "go.opentelemetry.io/api/core" ) diff --git a/api/unit/doc.go b/api/unit/doc.go new file mode 100644 index 00000000000..8eb9bcf3db6 --- /dev/null +++ b/api/unit/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package unit // import "go.opentelemetry.io/api/unit" diff --git a/experimental/streaming/exporter/buffer/doc.go b/experimental/streaming/exporter/buffer/doc.go new file mode 100644 index 00000000000..163e34b0887 --- /dev/null +++ b/experimental/streaming/exporter/buffer/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package buffer // import "go.opentelemetry.io/experimental/streaming/exporter/buffer" diff --git a/experimental/streaming/exporter/loader/doc.go b/experimental/streaming/exporter/loader/doc.go new file mode 100644 index 00000000000..281d8cd169d --- /dev/null +++ b/experimental/streaming/exporter/loader/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package loader // import "go.opentelemetry.io/experimental/streaming/exporter/loader" diff --git a/experimental/streaming/exporter/observer/doc.go b/experimental/streaming/exporter/observer/doc.go new file mode 100644 index 00000000000..1cec1ad3f10 --- /dev/null +++ b/experimental/streaming/exporter/observer/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package observer // import "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/reader/doc.go b/experimental/streaming/exporter/reader/doc.go new file mode 100644 index 00000000000..a112b2ec6c9 --- /dev/null +++ b/experimental/streaming/exporter/reader/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package reader // import "go.opentelemetry.io/experimental/streaming/exporter/reader" diff --git a/experimental/streaming/exporter/spandata/doc.go b/experimental/streaming/exporter/spandata/doc.go new file mode 100644 index 00000000000..4238a89248d --- /dev/null +++ b/experimental/streaming/exporter/spandata/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package spandata // import "go.opentelemetry.io/experimental/streaming/exporter/spandata" diff --git a/experimental/streaming/exporter/spandata/format/doc.go b/experimental/streaming/exporter/spandata/format/doc.go new file mode 100644 index 00000000000..acf11aea098 --- /dev/null +++ b/experimental/streaming/exporter/spandata/format/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package format // import "go.opentelemetry.io/experimental/streaming/exporter/spandata/format" diff --git a/experimental/streaming/exporter/spanlog/doc.go b/experimental/streaming/exporter/spanlog/doc.go new file mode 100644 index 00000000000..96e6e77350c --- /dev/null +++ b/experimental/streaming/exporter/spanlog/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019, OpenTelemetry Authors +// +// 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 +// +// http://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. + +package spanlog // import "go.opentelemetry.io/experimental/streaming/exporter/spanlog" diff --git a/experimental/streaming/exporter/spanlog/install/package.go b/experimental/streaming/exporter/spanlog/install/package.go index c70b29be055..f7f9621cd3b 100644 --- a/experimental/streaming/exporter/spanlog/install/package.go +++ b/experimental/streaming/exporter/spanlog/install/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package install +package install // import "go.opentelemetry.io/experimental/streaming/exporter/spanlog/install" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/spanlog/plugin/package.go b/experimental/streaming/exporter/spanlog/plugin/package.go index 13bb3e07f7b..4b71ca215cc 100644 --- a/experimental/streaming/exporter/spanlog/plugin/package.go +++ b/experimental/streaming/exporter/spanlog/plugin/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package main +package main // import "go.opentelemetry.io/experimental/streaming/exporter/spanlog/plugin" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/stderr/install/package.go b/experimental/streaming/exporter/stderr/install/package.go index 4c04fd3466e..7039a6c86a5 100644 --- a/experimental/streaming/exporter/stderr/install/package.go +++ b/experimental/streaming/exporter/stderr/install/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package install +package install // import "go.opentelemetry.io/experimental/streaming/exporter/stderr/install" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/stderr/plugin/package.go b/experimental/streaming/exporter/stderr/plugin/package.go index 649a6b7b05c..52d3eb3c0bd 100644 --- a/experimental/streaming/exporter/stderr/plugin/package.go +++ b/experimental/streaming/exporter/stderr/plugin/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package main +package main // "go.opentelemetry.io/experimental/streaming/exporter/stderr/plugin" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/stderr/stderr.go b/experimental/streaming/exporter/stderr/stderr.go index bd8ffa2f6af..9d7a3b18a62 100644 --- a/experimental/streaming/exporter/stderr/stderr.go +++ b/experimental/streaming/exporter/stderr/stderr.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package stderr +package stderr // import "go.opentelemetry.io/experimental/streaming/exporter/stderr" import ( "os" diff --git a/experimental/streaming/exporter/stdout/install/package.go b/experimental/streaming/exporter/stdout/install/package.go index b2b9bd69b45..b4b294f371b 100644 --- a/experimental/streaming/exporter/stdout/install/package.go +++ b/experimental/streaming/exporter/stdout/install/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package install +package install // import "go.opentelemetry.io/experimental/streaming/exporter/stdout/install" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/stdout/plugin/package.go b/experimental/streaming/exporter/stdout/plugin/package.go index ba09e8972fe..b398c100798 100644 --- a/experimental/streaming/exporter/stdout/plugin/package.go +++ b/experimental/streaming/exporter/stdout/plugin/package.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package main +package main // import "go.opentelemetry.io/experimental/streaming/exporter/stdout/plugin" import ( "go.opentelemetry.io/experimental/streaming/exporter/observer" diff --git a/experimental/streaming/exporter/stdout/stdout.go b/experimental/streaming/exporter/stdout/stdout.go index c1caf80aa15..0c587b63b7b 100644 --- a/experimental/streaming/exporter/stdout/stdout.go +++ b/experimental/streaming/exporter/stdout/stdout.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package stdout +package stdout // import "go.opentelemetry.io/experimental/streaming/exporter/stdout" import ( "os" diff --git a/sdk/trace/export.go b/sdk/trace/export.go index 52292dc4641..cacacb0989c 100644 --- a/sdk/trace/export.go +++ b/sdk/trace/export.go @@ -19,8 +19,9 @@ import ( "sync/atomic" "time" - "go.opentelemetry.io/api/core" "google.golang.org/grpc/codes" + + "go.opentelemetry.io/api/core" ) // Exporter is a type for functions that receive sampled trace spans. diff --git a/sdk/trace/span.go b/sdk/trace/span.go index fa0b50becc7..5ad85081caf 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -19,12 +19,13 @@ import ( "sync" "time" + "google.golang.org/grpc/codes" + "go.opentelemetry.io/api/core" apievent "go.opentelemetry.io/api/event" apitag "go.opentelemetry.io/api/tag" apitrace "go.opentelemetry.io/api/trace" "go.opentelemetry.io/sdk/internal" - "google.golang.org/grpc/codes" ) // span implements apitrace.Span interface. diff --git a/sdk/trace/trace_test.go b/sdk/trace/trace_test.go index 7c84a6b2527..ce69970017b 100644 --- a/sdk/trace/trace_test.go +++ b/sdk/trace/trace_test.go @@ -22,10 +22,11 @@ import ( "time" "github.com/google/go-cmp/cmp" + "google.golang.org/grpc/codes" + "go.opentelemetry.io/api/core" "go.opentelemetry.io/api/key" apitrace "go.opentelemetry.io/api/trace" - "google.golang.org/grpc/codes" ) var (