-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4788 from axw/backport/7.x/pr-4660
[7.x] Vendor go.opentelemetry.io/collector (#4660)
- Loading branch information
Showing
1,038 changed files
with
150,034 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4281,7 +4281,7 @@ Version: v0.17.0 | |
Licence type (autodetected): Apache-2.0 | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/[email protected]/LICENSE: | ||
Contents of probable licence file LICENSE: | ||
|
||
|
||
Apache License | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
internal/.otel_collector_mixin/receiver/otlpreceiver/mixin.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright The 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 otlpreceiver | ||
|
||
import ( | ||
"context" | ||
|
||
gatewayruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
collectorlog "go.opentelemetry.io/collector/internal/data/opentelemetry-proto-gen/collector/logs/v1" | ||
collectormetrics "go.opentelemetry.io/collector/internal/data/opentelemetry-proto-gen/collector/metrics/v1" | ||
collectortrace "go.opentelemetry.io/collector/internal/data/opentelemetry-proto-gen/collector/trace/v1" | ||
"go.opentelemetry.io/collector/receiver/otlpreceiver/logs" | ||
"go.opentelemetry.io/collector/receiver/otlpreceiver/metrics" | ||
"go.opentelemetry.io/collector/receiver/otlpreceiver/trace" | ||
) | ||
|
||
// RegisterTraceReceiver registers the trace receiver with a gRPC server and/or grpc-gateway mux, if non-nil. | ||
func RegisterTraceReceiver(ctx context.Context, receiver *trace.Receiver, serverGRPC *grpc.Server, gatewayMux *gatewayruntime.ServeMux) error { | ||
if serverGRPC != nil { | ||
collectortrace.RegisterTraceServiceServer(serverGRPC, receiver) | ||
} | ||
if gatewayMux != nil { | ||
err := collectortrace.RegisterTraceServiceHandlerServer(ctx, gatewayMux, receiver) | ||
if err != nil { | ||
return err | ||
} | ||
// Also register an alias handler. This fixes bug https://github.com/open-telemetry/opentelemetry-collector/issues/1968 | ||
return collectortrace.RegisterTraceServiceHandlerServerAlias(ctx, gatewayMux, receiver) | ||
} | ||
return nil | ||
} | ||
|
||
// RegisterMetricsReceiver registers the metrics receiver with a gRPC server and/or grpc-gateway mux, if non-nil. | ||
func RegisterMetricsReceiver(ctx context.Context, receiver *metrics.Receiver, serverGRPC *grpc.Server, gatewayMux *gatewayruntime.ServeMux) error { | ||
if serverGRPC != nil { | ||
collectormetrics.RegisterMetricsServiceServer(serverGRPC, receiver) | ||
} | ||
if gatewayMux != nil { | ||
return collectormetrics.RegisterMetricsServiceHandlerServer(ctx, gatewayMux, receiver) | ||
} | ||
return nil | ||
} | ||
|
||
// RegisterLogsReceiver registers the logs receiver with a gRPC server and/or grpc-gateway mux, if non-nil. | ||
func RegisterLogsReceiver(ctx context.Context, receiver *logs.Receiver, serverGRPC *grpc.Server, gatewayMux *gatewayruntime.ServeMux) error { | ||
if serverGRPC != nil { | ||
collectorlog.RegisterLogsServiceServer(serverGRPC, receiver) | ||
} | ||
if gatewayMux != nil { | ||
return collectorlog.RegisterLogsServiceHandlerServer(ctx, gatewayMux, receiver) | ||
} | ||
return nil | ||
} |
26 changes: 26 additions & 0 deletions
26
internal/.otel_collector_mixin/service/defaultcomponents/defaults.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright The 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 defaultcomponents composes the default set of components used by the otel service | ||
package defaultcomponents | ||
|
||
import ( | ||
"go.opentelemetry.io/collector/component" | ||
) | ||
|
||
// Components returns the default set of components used by the | ||
// OpenTelemetry collector. | ||
func Components() (component.Factories, error) { | ||
return component.Factories{}, nil | ||
} |
Oops, something went wrong.