This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Merged
Changes from all commits
Commits
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
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,41 @@ | ||
# Copyright 2018, OpenCensus 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(default_visibility = ["//visibility:public"]) | ||
|
||
load("@org_pubref_rules_protobuf//go:rules.bzl", "go_proto_library") | ||
|
||
proto_library( | ||
name = "resource_proto", | ||
srcs = ["resource.proto"], | ||
) | ||
|
||
cc_proto_library( | ||
name = "resource_proto_cc", | ||
deps = [":resource_proto"], | ||
) | ||
|
||
java_proto_library( | ||
name = "resource_proto_java", | ||
deps = [":resource_proto"], | ||
) | ||
|
||
go_proto_library( | ||
name = "resource_proto_go", | ||
protos = ["resource.proto"], | ||
pb_options = [ | ||
# omit the go_package declared in proto files to make bazel works as expect | ||
"paths=source_relative", | ||
], | ||
) |
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,33 @@ | ||
// Copyright 2018, OpenCensus 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 opencensus.proto.resource.v1; | ||
|
||
option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.opencensus.proto.resource.v1"; | ||
option java_outer_classname = "ResourceProto"; | ||
|
||
// Resource information. | ||
message Resource { | ||
|
||
// Type identifier for the resource. | ||
string type = 1; | ||
|
||
// Set of labels that describe the resource. | ||
map<string,string> labels = 2; | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One intention for these protocol is to be used for example when collect data from multiple nodes on the same RPC stream:
{App1, App2} -> oc-agent1 -> oc-agent2
Let's say oc-agent1 receives:
Then oc-agent1 sends to oc-agent2:
Based on the current description Metrics2 will be Resource1 which is not correct.
Couple of suggestions:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreeing with 1) – empty resource seems fine. I can't see any case where we'd want to distinguish an unset and an empty resource.
Suggestion 2. concerns me a bit, e.g. in particular this case:
1)
app1 -> {node1, metrics1, resource1}2)
app2 -> {node2, metrics2, resource2}3..999)
without app1 appearing1000)
app1 -> {node1, metrics3, empty/unset}It seems awkward to jump back to using
resource1
in step 1000. For long streams with lots of senders, this could become rather hard to reason about during debugging. It also requires the cache of a single connection to grow linearly with the number of apps multiplexed over it.That's probably not a problem in most use cases, but certainly an easy way to DDoS the agent.
Would it make sense to slightly alter this to: "A change in
Node
always resets the most recentResource
"?Effectively, changing the node requires the resource to be changed too (or be considered empty after). This way, the node and resource cache of a connection have a constant size of 1 as well.