1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-24 20:14:40 +02:00

Add vanity import name (#107)

* api: add doc.go and vanity custom import name

* experimental/streaming/exporter: add doc.go & vanity custom import name

* experimental/streaming/exporter/*: add vanity custom import name

* golangci.yml: fix local-prefixes to go.opentelemetry.io

* api,sdk: run `goimports -w -local go.opentelemetry.io`
This commit is contained in:
Koichi Shiraishi 2019-08-27 01:41:15 +09:00 committed by rghetia
parent 27bb6c8c7f
commit 887748491b
30 changed files with 257 additions and 12 deletions

View File

@ -14,4 +14,4 @@ linters-settings:
#ignore-words:
# - someword
goimports:
local-prefixes: github.com/open-telemetry/opentelemetry-go
local-prefixes: go.opentelemetry.io

15
api/core/doc.go Normal file
View File

@ -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"

15
api/event/doc.go Normal file
View File

@ -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"

15
api/key/doc.go Normal file
View File

@ -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"

15
api/metric/doc.go Normal file
View File

@ -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"

15
api/registry/doc.go Normal file
View File

@ -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"

15
api/stats/doc.go Normal file
View File

@ -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"

15
api/tag/doc.go Normal file
View File

@ -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"

View File

@ -18,6 +18,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"go.opentelemetry.io/api/core"
)

15
api/trace/doc.go Normal file
View File

@ -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"

View File

@ -18,6 +18,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"go.opentelemetry.io/api/core"
)

15
api/unit/doc.go Normal file
View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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.

View File

@ -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.

View File

@ -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 (