-
Notifications
You must be signed in to change notification settings - Fork 865
[otlp] Remove the Google.Protobuf / Grpc packages, and replace the logs and metrics with the new implementation #6005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
CodeBlanch
merged 10 commits into
open-telemetry:main
from
rajkumar-rangaraj:rajrang/otlprenameLogs
Dec 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1f551af
Replace logs with new impl
rajkumar-rangaraj 9aa77bc
Remove package reference, remove proto files, replace logs and metrics
rajkumar-rangaraj cb52d26
Update Benchmarks
rajkumar-rangaraj d7b7797
Test updates
rajkumar-rangaraj 8a0beb9
Lint fixes
rajkumar-rangaraj 0599950
Cleanup proto README.
CodeBlanch bf4becd
Tweaks.
CodeBlanch d07f706
Lint.
CodeBlanch 41dc362
Clean up.
CodeBlanch c54a555
nits
rajkumar-rangaraj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update Benchmarks
- Loading branch information
commit cb52d26ccd284bae73a8bb88de74c7c901c6b73b
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
37 changes: 37 additions & 0 deletions
37
test/Benchmarks/Implementation/google/rpc/error_details.proto
This file contains hidden or 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,37 @@ | ||
| // Copyright 2022 Google LLC | ||
| // | ||
| // 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. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package google.rpc; | ||
|
|
||
| import "google/protobuf/duration.proto"; | ||
|
|
||
| // Describes when the clients can retry a failed request. Clients could ignore | ||
| // the recommendation here or retry when this information is missing from error | ||
| // responses. | ||
| // | ||
| // It's always recommended that clients should use exponential backoff when | ||
| // retrying. | ||
| // | ||
| // Clients should wait until `retry_delay` amount of time has passed since | ||
| // receiving the error response before retrying. If retrying requests also | ||
| // fail, clients should use an exponential backoff scheme to gradually increase | ||
| // the delay between retries based on `retry_delay`, until either a maximum | ||
| // number of retries have been reached or a maximum retry delay cap has been | ||
| // reached. | ||
| message RetryInfo { | ||
| // Clients should wait at least this long between retrying the same request. | ||
| google.protobuf.Duration retry_delay = 1; | ||
| } |
This file contains hidden or 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,42 @@ | ||
| // Copyright 2022 Google LLC | ||
| // | ||
| // 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. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package google.rpc; | ||
|
|
||
| import "google/protobuf/any.proto"; | ||
|
|
||
| // The `Status` type defines a logical error model that is suitable for | ||
| // different programming environments, including REST APIs and RPC APIs. It is | ||
| // used by [gRPC](https://github.com/grpc). Each `Status` message contains | ||
| // three pieces of data: error code, error message, and error details. | ||
| // | ||
| // You can find out more about this error model and how to work with it in the | ||
| // [API Design Guide](https://cloud.google.com/apis/design/errors). | ||
| message Status { | ||
| // The status code, which should be an enum value of | ||
| // [google.rpc.Code][google.rpc.Code]. | ||
| int32 code = 1; | ||
|
|
||
| // A developer-facing error message, which should be in English. Any | ||
| // user-facing error message should be localized and sent in the | ||
| // [google.rpc.Status.details][google.rpc.Status.details] field, or localized | ||
| // by the client. | ||
| string message = 2; | ||
|
|
||
| // A list of messages that carry the error details. There is a common set of | ||
| // message types for APIs to use. | ||
| repeated google.protobuf.Any details = 3; | ||
| } |
10 changes: 10 additions & 0 deletions
10
test/Benchmarks/Implementation/opentelemetry/proto/collector/README.md
This file contains hidden or 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,10 @@ | ||
| # OpenTelemetry Collector Proto | ||
|
|
||
| This package describes the OpenTelemetry collector protocol. | ||
|
|
||
| ## Packages | ||
|
|
||
| 1. `common` package contains the common messages shared between different services. | ||
| 2. `trace` package contains the Trace Service protos. | ||
| 3. `metrics` package contains the Metrics Service protos. | ||
| 4. `logs` package contains the Logs Service protos. |
79 changes: 79 additions & 0 deletions
79
test/Benchmarks/Implementation/opentelemetry/proto/collector/logs/v1/logs_service.proto
This file contains hidden or 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,79 @@ | ||
| // Copyright 2020, 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. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package opentelemetry.proto.collector.logs.v1; | ||
|
|
||
| import "opentelemetry/proto/logs/v1/logs.proto"; | ||
|
|
||
| option csharp_namespace = "OpenTelemetry.Proto.Collector.Logs.V1"; | ||
| option java_multiple_files = true; | ||
| option java_package = "io.opentelemetry.proto.collector.logs.v1"; | ||
| option java_outer_classname = "LogsServiceProto"; | ||
| option go_package = "go.opentelemetry.io/proto/otlp/collector/logs/v1"; | ||
|
|
||
| // Service that can be used to push logs between one Application instrumented with | ||
| // OpenTelemetry and an collector, or between an collector and a central collector (in this | ||
| // case logs are sent/received to/from multiple Applications). | ||
| service LogsService { | ||
| // For performance reasons, it is recommended to keep this RPC | ||
| // alive for the entire life of the application. | ||
| rpc Export(ExportLogsServiceRequest) returns (ExportLogsServiceResponse) {} | ||
| } | ||
|
|
||
| message ExportLogsServiceRequest { | ||
| // An array of ResourceLogs. | ||
| // For data coming from a single resource this array will typically contain one | ||
| // element. Intermediary nodes (such as OpenTelemetry Collector) that receive | ||
| // data from multiple origins typically batch the data before forwarding further and | ||
| // in that case this array will contain multiple elements. | ||
| repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1; | ||
| } | ||
|
|
||
| message ExportLogsServiceResponse { | ||
| // The details of a partially successful export request. | ||
| // | ||
| // If the request is only partially accepted | ||
| // (i.e. when the server accepts only parts of the data and rejects the rest) | ||
| // the server MUST initialize the `partial_success` field and MUST | ||
| // set the `rejected_<signal>` with the number of items it rejected. | ||
| // | ||
| // Servers MAY also make use of the `partial_success` field to convey | ||
| // warnings/suggestions to senders even when the request was fully accepted. | ||
| // In such cases, the `rejected_<signal>` MUST have a value of `0` and | ||
| // the `error_message` MUST be non-empty. | ||
| // | ||
| // A `partial_success` message with an empty value (rejected_<signal> = 0 and | ||
| // `error_message` = "") is equivalent to it not being set/present. Senders | ||
| // SHOULD interpret it the same way as in the full success case. | ||
| ExportLogsPartialSuccess partial_success = 1; | ||
| } | ||
|
|
||
| message ExportLogsPartialSuccess { | ||
| // The number of rejected log records. | ||
| // | ||
| // A `rejected_<signal>` field holding a `0` value indicates that the | ||
| // request was fully accepted. | ||
| int64 rejected_log_records = 1; | ||
|
|
||
| // A developer-facing human-readable message in English. It should be used | ||
| // either to explain why the server rejected parts of the data during a partial | ||
| // success or to convey warnings/suggestions during a full success. The message | ||
| // should offer guidance on how users can address such issues. | ||
| // | ||
| // error_message is an optional field. An error_message with an empty value | ||
| // is equivalent to it not being set. | ||
| string error_message = 2; | ||
| } |
9 changes: 9 additions & 0 deletions
9
test/Benchmarks/Implementation/opentelemetry/proto/collector/logs/v1/logs_service_http.yaml
This file contains hidden or 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,9 @@ | ||
| # This is an API configuration to generate an HTTP/JSON -> gRPC gateway for the | ||
| # OpenTelemetry service using github.com/grpc-ecosystem/grpc-gateway. | ||
| type: google.api.Service | ||
| config_version: 3 | ||
| http: | ||
| rules: | ||
| - selector: opentelemetry.proto.collector.logs.v1.LogsService.Export | ||
| post: /v1/logs | ||
| body: "*" |
79 changes: 79 additions & 0 deletions
79
.../Benchmarks/Implementation/opentelemetry/proto/collector/metrics/v1/metrics_service.proto
This file contains hidden or 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,79 @@ | ||
| // 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. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package opentelemetry.proto.collector.metrics.v1; | ||
|
|
||
| import "opentelemetry/proto/metrics/v1/metrics.proto"; | ||
|
|
||
| option csharp_namespace = "OpenTelemetry.Proto.Collector.Metrics.V1"; | ||
| option java_multiple_files = true; | ||
| option java_package = "io.opentelemetry.proto.collector.metrics.v1"; | ||
| option java_outer_classname = "MetricsServiceProto"; | ||
| option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1"; | ||
|
|
||
| // Service that can be used to push metrics between one Application | ||
| // instrumented with OpenTelemetry and a collector, or between a collector and a | ||
| // central collector. | ||
| service MetricsService { | ||
| // For performance reasons, it is recommended to keep this RPC | ||
| // alive for the entire life of the application. | ||
| rpc Export(ExportMetricsServiceRequest) returns (ExportMetricsServiceResponse) {} | ||
| } | ||
|
|
||
| message ExportMetricsServiceRequest { | ||
| // An array of ResourceMetrics. | ||
| // For data coming from a single resource this array will typically contain one | ||
| // element. Intermediary nodes (such as OpenTelemetry Collector) that receive | ||
| // data from multiple origins typically batch the data before forwarding further and | ||
| // in that case this array will contain multiple elements. | ||
| repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1; | ||
| } | ||
|
|
||
| message ExportMetricsServiceResponse { | ||
| // The details of a partially successful export request. | ||
| // | ||
| // If the request is only partially accepted | ||
| // (i.e. when the server accepts only parts of the data and rejects the rest) | ||
| // the server MUST initialize the `partial_success` field and MUST | ||
| // set the `rejected_<signal>` with the number of items it rejected. | ||
| // | ||
| // Servers MAY also make use of the `partial_success` field to convey | ||
| // warnings/suggestions to senders even when the request was fully accepted. | ||
| // In such cases, the `rejected_<signal>` MUST have a value of `0` and | ||
| // the `error_message` MUST be non-empty. | ||
| // | ||
| // A `partial_success` message with an empty value (rejected_<signal> = 0 and | ||
| // `error_message` = "") is equivalent to it not being set/present. Senders | ||
| // SHOULD interpret it the same way as in the full success case. | ||
| ExportMetricsPartialSuccess partial_success = 1; | ||
| } | ||
|
|
||
| message ExportMetricsPartialSuccess { | ||
| // The number of rejected data points. | ||
| // | ||
| // A `rejected_<signal>` field holding a `0` value indicates that the | ||
| // request was fully accepted. | ||
| int64 rejected_data_points = 1; | ||
|
|
||
| // A developer-facing human-readable message in English. It should be used | ||
| // either to explain why the server rejected parts of the data during a partial | ||
| // success or to convey warnings/suggestions during a full success. The message | ||
| // should offer guidance on how users can address such issues. | ||
| // | ||
| // error_message is an optional field. An error_message with an empty value | ||
| // is equivalent to it not being set. | ||
| string error_message = 2; | ||
| } |
9 changes: 9 additions & 0 deletions
9
...chmarks/Implementation/opentelemetry/proto/collector/metrics/v1/metrics_service_http.yaml
This file contains hidden or 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,9 @@ | ||
| # This is an API configuration to generate an HTTP/JSON -> gRPC gateway for the | ||
| # OpenTelemetry service using github.com/grpc-ecosystem/grpc-gateway. | ||
| type: google.api.Service | ||
| config_version: 3 | ||
| http: | ||
| rules: | ||
| - selector: opentelemetry.proto.collector.metrics.v1.MetricsService.Export | ||
| post: /v1/metrics | ||
| body: "*" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.