-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pdata: deprecate funcs working with InternalRep
This PR tries to respect the rules 100%, but the need to keep the deprecated public funcs is unclear since they should not/ cannot be used externally. Signed-off-by: Bogdan Drutu <[email protected]>
- Loading branch information
1 parent
6898a92
commit b61993c
Showing
19 changed files
with
142 additions
and
153 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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 pdata // import "go.opentelemetry.io/collector/model/internal" | ||
|
||
import ( | ||
otlplogs "go.opentelemetry.io/collector/model/internal/data/protogen/logs/v1" | ||
otlpmetrics "go.opentelemetry.io/collector/model/internal/data/protogen/metrics/v1" | ||
otlptrace "go.opentelemetry.io/collector/model/internal/data/protogen/trace/v1" | ||
) | ||
|
||
// MetricsToOtlp internal helper to convert Metrics to protobuf representation. | ||
func MetricsToOtlp(mw Metrics) *otlpmetrics.MetricsData { | ||
return mw.orig | ||
} | ||
|
||
// MetricsFromOtlp internal helper to convert protobuf representation to Metrics. | ||
func MetricsFromOtlp(orig *otlpmetrics.MetricsData) Metrics { | ||
return Metrics{orig: orig} | ||
} | ||
|
||
// TracesToOtlp internal helper to convert Traces to protobuf representation. | ||
func TracesToOtlp(mw Traces) *otlptrace.TracesData { | ||
return mw.orig | ||
} | ||
|
||
// TracesFromOtlp internal helper to convert protobuf representation to Traces. | ||
func TracesFromOtlp(orig *otlptrace.TracesData) Traces { | ||
return Traces{orig: orig} | ||
} | ||
|
||
// LogsToOtlp internal helper to convert Logs to protobuf representation. | ||
func LogsToOtlp(l Logs) *otlplogs.LogsData { | ||
return l.orig | ||
} | ||
|
||
// LogsFromOtlp internal helper to convert protobuf representation to Logs. | ||
func LogsFromOtlp(orig *otlplogs.LogsData) Logs { | ||
return Logs{orig: orig} | ||
} |
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
Oops, something went wrong.